GeezerVison is showing github.com — fix: ensure gpt-5.2-codex has variants · bpd1069/opencode@b03172d
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/opencode/src/plugin/codex.ts +8-2Lines changed: 8 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import type { Hooks, PluginInput } from "@opencode-ai/plugin" | 2 | 2 | import { Log } from "../util/log" | 3 | 3 | import { OAUTH_DUMMY_KEY } from "../auth" | | 4 | +import { ProviderTransform } from "../provider/transform" | 4 | 5 |
| 5 | 6 | const log = Log.create({ service: "plugin.codex" }) | 6 | 7 |
| @@ -321,7 +322,7 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> { | 321 | 322 | } | 322 | 323 |
| 323 | 324 | if (!provider.models["gpt-5.2-codex"]) { | 324 | | - provider.models["gpt-5.2-codex"] = { | | 325 | + const model = { | 325 | 326 | id: "gpt-5.2-codex", | 326 | 327 | providerID: "openai", | 327 | 328 | api: { | @@ -337,13 +338,18 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> { | 337 | 338 | toolcall: true, | 338 | 339 | input: { text: true, audio: false, image: true, video: false, pdf: false }, | 339 | 340 | output: { text: true, audio: false, image: false, video: false, pdf: false }, | | 341 | + interleaved: false, | 340 | 342 | }, | 341 | 343 | cost: { input: 0, output: 0, cache: { read: 0, write: 0 } }, | 342 | 344 | limit: { context: 400000, output: 128000 }, | 343 | | - status: "active", | | 345 | + status: "active" as const, | 344 | 346 | options: {}, | 345 | 347 | headers: {}, | | 348 | + release_date: "2025-12-18", | | 349 | + variants: {} as Record<string, Record<string, any>>, | 346 | 350 | } | | 351 | + model.variants = ProviderTransform.variants(model) | | 352 | + provider.models["gpt-5.2-codex"] = model | 347 | 353 | } | 348 | 354 |
| 349 | 355 | // Zero out costs for Codex (included with ChatGPT subscription) | |
Collapse file Copy file name to clipboardExpand all lines: packages/opencode/src/provider/transform.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -318,7 +318,7 @@ export namespace ProviderTransform { | 318 | 318 | // https://v5.ai-sdk.dev/providers/ai-sdk-providers/openai | 319 | 319 | if (id === "gpt-5-pro") return {} | 320 | 320 | const openaiEfforts = iife(() => { | 321 | | - if (id.includes("codex")) return WIDELY_SUPPORTED_EFFORTS | | 321 | + if (id.includes("codex") && !id.includes("5.2")) return WIDELY_SUPPORTED_EFFORTS | 322 | 322 | const arr = [...WIDELY_SUPPORTED_EFFORTS] | 323 | 323 | if (id.includes("gpt-5-") || id === "gpt-5") { | 324 | 324 | arr.unshift("minimal") | |
|