fix(deepseek): add more exhaustive sanitation for deepseek-reasoner
Some checks failed
CI / Check (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Formatting (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Release Build (push) Has been cancelled

R1 model does not support presence_penalty, frequency_penalty, logit_bias,
logprobs, or top_logprobs. Added these to the list of stripped parameters.
This commit is contained in:
2026-03-05 17:59:49 +00:00
parent 7efb36029c
commit c7b67d5840

View File

@@ -66,6 +66,11 @@ impl super::Provider for DeepSeekProvider {
obj.remove("tool_choice");
obj.remove("temperature");
obj.remove("top_p");
obj.remove("presence_penalty");
obj.remove("frequency_penalty");
obj.remove("logit_bias");
obj.remove("logprobs");
obj.remove("top_logprobs");
}
}
@@ -129,11 +134,16 @@ impl super::Provider for DeepSeekProvider {
if request.model == "deepseek-reasoner" {
if let Some(obj) = body.as_object_mut() {
obj.remove("stream_options");
// Also does not support tools/temperature/top_p
// Also does not support these parameters
obj.remove("tools");
obj.remove("tool_choice");
obj.remove("temperature");
obj.remove("top_p");
obj.remove("presence_penalty");
obj.remove("frequency_penalty");
obj.remove("logit_bias");
obj.remove("logprobs");
obj.remove("top_logprobs");
}
} else {
// For standard deepseek-chat, keep it clean