fix(llms): remove tool_choice for deepseek models

This commit is contained in:
Simon
2026-04-27 20:32:53 +08:00
parent b50abcc4ec
commit 15f3af406c

View File

@@ -93,6 +93,11 @@ export function modelPatch(body: Record<string, any>) {
body.reasoning_effort = 'minimal'
}
if (modelName.startsWith('deepseek')) {
debug('Applying DeepSeek patch: remove tool_choice')
delete body.tool_choice
}
if (modelName.startsWith('minimax')) {
debug('Applying MiniMax patch: clamp temperature to (0, 1]')
// MiniMax API rejects temperature = 0; clamp to a small positive value