721 B
721 B
kind, description
| kind | description |
|---|---|
| upgrade-guide | The DeepSeek streamed content refusal code changes from MALFORMED_RESPONSE to CONTENT_REFUSED. |
DeepSeek content refusal error code
English | 中文
Change
When DeepSeek ends a model stream with stop_reason: "refusal", DSH reports CONTENT_REFUSED in the LLM error finish and in the failed turn's turn/end error. Previously, the adapter reported MALFORMED_RESPONSE for this stop reason.
Migration
- Handle
CONTENT_REFUSEDin code that classifies LLM error finishes orturn/enderrors. Tell the user that the provider refused the request. - Replay a Messages stream ending in
refusaland check that your handler takes the refusal path.