We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e9c400f + 9bd322e commit cf75d39Copy full SHA for cf75d39
1 file changed
packages/opencode/src/provider/transform.ts
@@ -346,6 +346,13 @@ export namespace ProviderTransform {
346
switch (model.api.npm) {
347
case "@openrouter/ai-sdk-provider":
348
if (!model.id.includes("gpt") && !model.id.includes("gemini-3")) return {}
349
+
350
+ // Following logic for the `@ai-sdk/openai` case
351
+ if (id.includes("codex")) {
352
+ if (id.includes("5.2")) return Object.fromEntries([...WIDELY_SUPPORTED_EFFORTS, "xhigh"].map((effort) => [effort, { reasoning: { effort } }]))
353
+ return Object.fromEntries(WIDELY_SUPPORTED_EFFORTS.map((effort) => [effort, { reasoning: { effort } }]))
354
+ }
355
356
return Object.fromEntries(OPENAI_EFFORTS.map((effort) => [effort, { reasoning: { effort } }]))
357
358
// TODO: YOU CANNOT SET max_tokens if this is set!!!
0 commit comments