| 控制参数(OpenAI 格式) | 控制参数(Anthropic 格式) | |
|---|---|---|
| 思考模式开关、(1) | **{"thinking": {"type": "enabled/disabled"}}** | |
| 思考强度控制(2)(3) | **{"reasoning_effort": "high/max"}** | **{"output_config": {"effort": "high/max"}}** |
enabledmaxlow、medium 会映射为 high, xhigh 会映射为 maxthinking 参数时,需要将 thinking 参数传入 extra_body 中:response = client.chat.completions.create(
model="deepseek-v4-pro",
reasoning_effort="high",
extra_body={"thinking": {"type": "enabled"}}
)temperature、top_p、presence_penalty、frequency_penalty 参数。请注意,为了兼容已有软件,设置参数不会报错,但也不会生效。reasoning_content 参数返回,与 content 同级。在后续的轮次的拼接中,可以选择性地返回 reasoning_content 给 API:来自: 思考模式 | DeepSeek API Docs