File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " roo-cline " : patch
3+ ---
4+
5+ Omit reasoning params for non-reasoning models
Original file line number Diff line number Diff line change 88 openRouterDefaultModelInfo ,
99 PROMPT_CACHING_MODELS ,
1010 OPTIONAL_PROMPT_CACHING_MODELS ,
11+ REASONING_MODELS ,
1112} from "../../shared/api"
1213import { convertToOpenAiMessages } from "../transform/openai-format"
1314import { ApiStreamChunk } from "../transform/stream"
@@ -138,7 +139,7 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH
138139 } ) ,
139140 // This way, the transforms field will only be included in the parameters when openRouterUseMiddleOutTransform is true.
140141 ...( ( this . options . openRouterUseMiddleOutTransform ?? true ) && { transforms : [ "middle-out" ] } ) ,
141- ...( reasoningEffort && { reasoning : { effort : reasoningEffort } } ) ,
142+ ...( REASONING_MODELS . has ( modelId ) && reasoningEffort && { reasoning : { effort : reasoningEffort } } ) ,
142143 }
143144
144145 const stream = await this . client . chat . completions . create ( completionParams )
You can’t perform that action at this time.
0 commit comments