OpenRouter (CC): explicit opt-out for reasoning
| @@ -979,6 +979,7 @@ router.post('/generate', jsonParser, function (request, response) { | ||
| 979 | 979 | headers = { ...OPENROUTER_HEADERS }; |
| 980 | 980 | bodyParams = { |
| 981 | 981 | 'transforms': getOpenRouterTransforms(request), |
| 982 | + 'include_reasoning': Boolean(request.body.include_reasoning), | |
| 982 | 983 | }; |
| 983 | 984 | |
| 984 | 985 | if (request.body.min_p !== undefined) { |
| @@ -1004,10 +1005,6 @@ router.post('/generate', jsonParser, function (request, response) { | ||
| 1004 | 1005 | bodyParams['route'] = 'fallback'; |
| 1005 | 1006 | } |
| 1006 | 1007 | |
| 1007 | - if (request.body.include_reasoning) { | |
| 1008 | - bodyParams['include_reasoning'] = true; | |
| 1009 | - } | |
| 1010 | - | |
| 1011 | 1008 | let cachingAtDepth = getConfigValue('claude.cachingAtDepth', -1); |
| 1012 | 1009 | if (Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && request.body.model?.startsWith('anthropic/claude-3')) { |
| 1013 | 1010 | cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth); |