diff --git a/backend/src/services/mistralClient.js b/backend/src/services/mistralClient.js index e95aefa..0c2fdc3 100644 --- a/backend/src/services/mistralClient.js +++ b/backend/src/services/mistralClient.js @@ -50,6 +50,8 @@ Output format: JSON with fields {proposal, justification, confidence (0-1), depe * Call Mistral AI API */ async function callMistralAPI(messages, options = {}) { + const { maxTokens, ...otherOptions } = options; + const response = await fetch(MISTRAL_API_URL, { method: 'POST', headers: { @@ -60,8 +62,8 @@ async function callMistralAPI(messages, options = {}) { model: options.model || 'mistral-small-latest', messages, temperature: options.temperature || 0.7, - max_tokens: options.maxTokens || 2048, - ...options + max_tokens: maxTokens || 2048, + ...otherOptions }) });