Skip to content

Commit c47a731

Browse files
neominikhk9890
authored andcommitted
Set smallOptions for google models on openrouter (anomalyco#6362)
1 parent e02a035 commit c47a731

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

packages/opencode/src/provider/transform.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -302,22 +302,22 @@ export namespace ProviderTransform {
302302
}
303303

304304
export function smallOptions(model: Provider.Model) {
305-
const options: Record<string, any> = {}
306-
307305
if (model.providerID === "openai" || model.api.id.includes("gpt-5")) {
308306
if (model.api.id.includes("5.")) {
309-
options["reasoningEffort"] = "low"
310-
} else {
311-
options["reasoningEffort"] = "minimal"
307+
return { reasoningEffort: "low" }
312308
}
309+
return { reasoningEffort: "minimal" }
313310
}
314311
if (model.providerID === "google") {
315-
options["thinkingConfig"] = {
316-
thinkingBudget: 0,
312+
return { thinkingConfig: { thinkingBudget: 0 } }
313+
}
314+
if (model.providerID === "openrouter") {
315+
if (model.api.id.includes("google")) {
316+
return { reasoning: { enabled: false } }
317317
}
318+
return { reasoningEffort: "minimal" }
318319
}
319-
320-
return options
320+
return {}
321321
}
322322

323323
export function providerOptions(model: Provider.Model, options: { [x: string]: any }) {

0 commit comments

Comments
 (0)