Skip to content

Commit b667224

Browse files
Extend ReasoningEffort to non-o3-mini reasoning models for all providers (RooCodeInc#3036)
It's somehow locked to o3-mini for some providers, and the description, should be updated for all OpenAI o series reasoning models.
1 parent ffbafab commit b667224

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.changeset/nasty-cameras-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": patch
3+
---
4+
5+
Extend ReasoningEffort to non-o3-mini reasoning models for all providers

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
"high"
245245
],
246246
"default": "medium",
247-
"description": "Controls the reasoning effort when using the o3-mini model. Higher values may result in more thorough but slower responses."
247+
"description": "Controls the reasoning effort when using an OpenAI reasoning model. Higher values may result in more thorough but slower responses."
248248
},
249249
"cline.chromeExecutablePath": {
250250
"type": "string",

src/api/providers/requesty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class RequestyHandler implements ApiHandler {
3434

3535
const reasoningEffort = this.options.o3MiniReasoningEffort || "medium"
3636
const reasoning = { reasoning_effort: reasoningEffort }
37-
const reasoningArgs = model.id === "openai/o3-mini" ? reasoning : {}
37+
const reasoningArgs = model.id.startsWith("openai/o") ? reasoning : {}
3838

3939
const thinkingBudget = this.options.thinkingBudgetTokens || 0
4040
const thinking =

src/api/transform/openrouter-stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export async function createOpenRouterStream(
190190
stream_options: { include_usage: true },
191191
transforms: shouldApplyMiddleOutTransform ? ["middle-out"] : undefined,
192192
include_reasoning: true,
193-
...(model.id === "openai/o3-mini" ? { reasoning_effort: o3MiniReasoningEffort || "medium" } : {}),
193+
...(model.id.startsWith("openai/o") ? { reasoning_effort: o3MiniReasoningEffort || "medium" } : {}),
194194
...(reasoning ? { reasoning } : {}),
195195
...(openRouterProviderSorting ? { provider: { sort: openRouterProviderSorting } } : {}),
196196
})

0 commit comments

Comments
 (0)