Fix: exclude temperature parameter for reasoning-tier models #4
@@ -303,9 +303,12 @@ export async function callLLM(options) {
|
|||||||
const body = {
|
const body = {
|
||||||
model,
|
model,
|
||||||
max_tokens: maxTokens,
|
max_tokens: maxTokens,
|
||||||
temperature,
|
|
||||||
messages: messagesPayload,
|
messages: messagesPayload,
|
||||||
};
|
};
|
||||||
|
// Temperature is not supported for reasoning tier models
|
||||||
|
if (tier !== 'reasoning') {
|
||||||
|
body.temperature = temperature;
|
||||||
|
}
|
||||||
if (system !== undefined) body.system = system;
|
if (system !== undefined) body.system = system;
|
||||||
if (tools && tools.length) body.tools = tools;
|
if (tools && tools.length) body.tools = tools;
|
||||||
if (toolChoice) body.tool_choice = toolChoice;
|
if (toolChoice) body.tool_choice = toolChoice;
|
||||||
|
|||||||
Reference in New Issue
Block a user