Skip to content

fix: detect thinking mode models to pad reasoning_content for all ass…#14

Open
jgbai wants to merge 1 commit into
alexazhou:masterfrom
jgbai:fix/thinking-mode-padding
Open

fix: detect thinking mode models to pad reasoning_content for all ass…#14
jgbai wants to merge 1 commit into
alexazhou:masterfrom
jgbai:fix/thinking-mode-padding

Conversation

@jgbai

@jgbai jgbai commented Jun 2, 2026

Copy link
Copy Markdown

…istant messages

DeepSeek R1/V4 等 thinking mode 模型要求所有 assistant 消息包含 reasoning_content 字段, 否则 API 报 400 错误。两种情况需要补全:

  1. 模型本身是 thinking mode 模型(如 deepseek-v4-pro)
  2. 对话中已存在带 reasoning_content 的 assistant 消息(从 thinking 模型切换过来)

Cherry-picked from c71a1a0, 6bc774e, 82c702d, 7a7637b on dev/fix_display

…istant messages

DeepSeek R1/V4 等 thinking mode 模型要求所有 assistant 消息包含 reasoning_content 字段,
否则 API 报 400 错误。两种情况需要补全:
1. 模型本身是 thinking mode 模型(如 deepseek-v4-pro)
2. 对话中已存在带 reasoning_content 的 assistant 消息(从 thinking 模型切换过来)

Cherry-picked from c71a1a0, 6bc774e, 82c702d, 7a7637b on dev/fix_display
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant