Make the backend actually send reasoning_effort

d0ebac37c1b2c591bbffbb79793f8c770410a7ed

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +5 -0Ignore whitespace
src/endpoints/backends/chat-completions.js+5 -0
@@ -967,6 +967,11 @@ router.post('/generate', jsonParser, function (request, response) {
967 if (getConfigValue('openai.randomizeUserId', false)) {967 if (getConfigValue('openai.randomizeUserId', false)) {
968 bodyParams['user'] = uuidv4();968 bodyParams['user'] = uuidv4();
969 }969 }
970
971 // A few of OpenAIs reasoning models support reasoning effort
972 if (['o1', 'o3-mini', 'o3-mini-2025-01-31'].includes(request.body.model)) {
973 bodyParams['reasoning_effort'] = request.body.reasoning_effort;
974 }
970 } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENROUTER) {975 } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENROUTER) {
971 apiUrl = 'https://openrouter.ai/api/v1';976 apiUrl = 'https://openrouter.ai/api/v1';
972 apiKey = readSecret(request.user.directories, SECRET_KEYS.OPENROUTER);977 apiKey = readSecret(request.user.directories, SECRET_KEYS.OPENROUTER);