Skip to content

[Bug] dsv32 encode_messages bug #18125

@whybeyoung

Description

@whybeyoung

Checklist

  • I searched related issues but found no solution.
  • The bug persists in the latest version.
  • Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.
  • If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.
  • Please use English. Otherwise, it will be closed.

Describe the bug

DeepSeek v32 has introduced the encode_messages feature, which results in discrepancies compared with non-3.2 branches when processing array-type messages.content, thereby causing model performance issues.

Reproduction

{
    "model": "xdeepseekv3testbo",
    "messages": [
        {
            "role": "system",
            "content": "You are a personal assistant running inside Clawdbot."
        },
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "A new session was started via /new or /reset. Say hi briefly (1-2 sentences) and ask what the user wants to do next."
                }
            ]
        },
        {
            "role": "assistant",
            "content": [
                {
                    "type": "text",
                    "text": "Hey there! I'm Clawdbot, ready to help you out. What would you like to work on today?"
                }
            ]
        }
    ],
    "stream": false
}

Environment

h20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions