diff --git a/packages/llms/src/utils.ts b/packages/llms/src/utils.ts index 7a6c838..042a64d 100644 --- a/packages/llms/src/utils.ts +++ b/packages/llms/src/utils.ts @@ -93,6 +93,11 @@ export function modelPatch(body: Record) { 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