Skip to content

Commit 255c282

Browse files
committed
fix: allow "minimal" reasoning effort to be passed through for OpenRouter
1 parent 98488ab commit 255c282

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/api/transform/__tests__/reasoning.spec.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,8 @@ describe("reasoning.ts", () => {
178178
reasoningEffort: effort,
179179
}
180180
const result = getOpenRouterReasoning(options)
181-
// "minimal" should return undefined for OpenRouter
182-
if (effort === "minimal") {
183-
expect(result).toBeUndefined()
184-
} else {
185-
expect(result).toEqual({ effort })
186-
}
181+
// All effort values including "minimal" should be passed through
182+
expect(result).toEqual({ effort })
187183
})
188184
})
189185

@@ -206,8 +202,8 @@ describe("reasoning.ts", () => {
206202

207203
const result = getOpenRouterReasoning(options)
208204

209-
// "minimal" should return undefined for OpenRouter
210-
expect(result).toBeUndefined()
205+
// "minimal" should be passed through to OpenRouter
206+
expect(result).toEqual({ effort: "minimal" })
211207
})
212208

213209
it("should handle minimal reasoning effort from settings", () => {
@@ -229,8 +225,8 @@ describe("reasoning.ts", () => {
229225

230226
const result = getOpenRouterReasoning(options)
231227

232-
// "minimal" should return undefined for OpenRouter
233-
expect(result).toBeUndefined()
228+
// "minimal" should be passed through to OpenRouter
229+
expect(result).toEqual({ effort: "minimal" })
234230
})
235231

236232
it("should handle zero reasoningBudget", () => {

src/api/transform/reasoning.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const getOpenRouterReasoning = ({
3434
shouldUseReasoningBudget({ model, settings })
3535
? { max_tokens: reasoningBudget }
3636
: shouldUseReasoningEffort({ model, settings })
37-
? reasoningEffort && reasoningEffort !== "minimal"
37+
? reasoningEffort
3838
? { effort: reasoningEffort }
3939
: undefined
4040
: undefined

0 commit comments

Comments
 (0)