Raw <ds_safety> safety metadata tag exposed in model output (DeepSeek V4 Pro)

#201
by mrshadowc - opened

Description
When using the DeepSeek V4 Pro model, the response sometimes contains an unprocessed system safety tag:

<ds_safety>不涉及任何色情,政治敏感或其他违规内容</ds_safety>Safe

This tag appears to be an internal content moderation label that should be stripped from the final output before it reaches the end user. Its presence breaks the expected response format and degrades the user experience.

Steps to reproduce

  1. Send any standard prompt to the DeepSeek V4 Pro model (via API or chat interface).
  2. Observe the model's text response.
  3. The safety tag sometimes appears inline, either at the beginning or end of the output.

Expected behavior
The safety metadata (<ds_safety>...</ds_safety> Safe) should be filtered out automatically and never exposed to the user.

Actual behavior
The raw safety tag is returned as part of the visible model output.

Environment

  • Model: DeepSeek V4 Pro
  • Interface: (e.g., API )

Sign up or log in to comment