thinking#
模型是否能开启/关闭thinking,是否能设置thinking的深度,已官方的文档为准。1.
在调用/chat/completions接口的时候,claude的模型开启/关闭thinking的方式,在body中传递thinking参数,如:
{
"model": "claude-opus-4-5",
"max_tokens":2000,
"thinking":{
"type":"enabled"
"budget_tokens": 1000
},
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "你是谁?1+2+3+4+。。。+100=?"
}
]
}
]
}
2.
在调用/chat/completions接口的时候,gemini 开启thinking的方式,传递extra_body参数
{
"model": "gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": "https://xxxx.com/xxxx.mp4"
}
},
{
"type": "text",
"text": "视频的主要内容是啥"
}
]
}
],
"extra_body": {
"google": {
"thinking_config": {
"thinking_level": "low",
"include_thoughts": true
}
}
}
}
3.
通过gemini 或者claude官方的sdk进行调用的时候,按照官方的格式来传递参数
4.
openai的模型。(部分模型只支持responses接口)
/v1/chat/completions 接口, 这个时候通过 "reasoning_effort": "medium", 来设置推理的深度
Modified at 2026-03-13 09:12:26