fix(ai): use correct DeepSeek API format to disable thinking
This commit is contained in:
1 parent
87efe469a4
commit
f590a727a0
1 file changed
+5
@@ -1976,6 +1976,11 @@ async fn stream_openai_with_tools(
|
||||
});
|
||||
set_chat_completion_token_limit(&mut body, &request.config, request.max_tokens.unwrap_or(4096));
|
||||
|
||||
// DeepSeek API requires {"thinking": {"type": "disabled"}} to disable thinking
|
||||
if !request.config.enable_thinking && matches!(request.config.provider, AiProvider::Deepseek) {
|
||||
body["thinking"] = json!({ "type": "disabled" });
|
||||
}
|
||||
|
||||
let res = client
|
||||
.post(resolve_endpoint(&request.config))
|
||||
.headers(headers)
|
||||
|
||||
Reference in new issue
Block a user