diff --git a/src/lib/llm.js b/src/lib/llm.js index 9e69f59..0edea82 100644 --- a/src/lib/llm.js +++ b/src/lib/llm.js @@ -303,9 +303,12 @@ export async function callLLM(options) { const body = { model, max_tokens: maxTokens, - temperature, messages: messagesPayload, }; + // Temperature is not supported for reasoning tier models + if (tier !== 'reasoning') { + body.temperature = temperature; + } if (system !== undefined) body.system = system; if (tools && tools.length) body.tools = tools; if (toolChoice) body.tool_choice = toolChoice;