Merge pull request #482 from alibaba/fix/llms-deepseek-tool-choice

fix(llms): remove tool_choice for deepseek models
This commit is contained in:
Simon
2026-04-27 20:35:37 +08:00
committed by GitHub

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