OpenRouter (CC): explicit opt-out for reasoning

ae666c901255b8957503f8fc14218edb32dc4d03

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -4Showing whitespace changes
src/endpoints/backends/chat-completions.js+1 -4
@@ -979,6 +979,7 @@ router.post('/generate', jsonParser, function (request, response) {
979 headers = { ...OPENROUTER_HEADERS };979 headers = { ...OPENROUTER_HEADERS };
980 bodyParams = {980 bodyParams = {
981 'transforms': getOpenRouterTransforms(request),981 'transforms': getOpenRouterTransforms(request),
982 'include_reasoning': Boolean(request.body.include_reasoning),
982 };983 };
983984
984 if (request.body.min_p !== undefined) {985 if (request.body.min_p !== undefined) {
@@ -1004,10 +1005,6 @@ router.post('/generate', jsonParser, function (request, response) {
1004 bodyParams['route'] = 'fallback';1005 bodyParams['route'] = 'fallback';
1005 }1006 }
10061007
1007 if (request.body.include_reasoning) {
1008 bodyParams['include_reasoning'] = true;
1009 }
1010
1011 let cachingAtDepth = getConfigValue('claude.cachingAtDepth', -1);1008 let cachingAtDepth = getConfigValue('claude.cachingAtDepth', -1);
1012 if (Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && request.body.model?.startsWith('anthropic/claude-3')) {1009 if (Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && request.body.model?.startsWith('anthropic/claude-3')) {
1013 cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth);1010 cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth);