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 99 openRouterDefaultModelInfo ,
1010 PROMPT_CACHING_MODELS ,
1111 OPTIONAL_PROMPT_CACHING_MODELS ,
12+ REASONING_MODELS ,
1213} from "../../shared/api"
1314import { convertToOpenAiMessages } from "../transform/openai-format"
1415import { ApiStreamChunk } from "../transform/stream"
@@ -147,7 +148,7 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH
147148 } ) ,
148149 // This way, the transforms field will only be included in the parameters when openRouterUseMiddleOutTransform is true.
149150 ...( ( this . options . openRouterUseMiddleOutTransform ?? true ) && { transforms : [ "middle-out" ] } ) ,
150- ...( reasoningEffort && { reasoning : { effort : reasoningEffort } } ) ,
151+ ...( REASONING_MODELS . has ( modelId ) && reasoningEffort && { reasoning : { effort : reasoningEffort } } ) ,
151152 }
152153
153154 const stream = await this . client . chat . completions . create ( completionParams )
You can’t perform that action at this time.
0 commit comments