summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-02-05 14:53:26 -0600
committerGitHub <[email protected]>2026-02-05 20:53:26 +0000
commitb5511958183fed28e9658f5210c2a818c028058b (patch)
treee9fc1c9f19905fab35a79ae59398a714a07ef452
parentd7c2d5db3bc261764b415f0e6c50f1d5908a99a6 (diff)
downloadopencode-b5511958183fed28e9658f5210c2a818c028058b.tar.gz
opencode-b5511958183fed28e9658f5210c2a818c028058b.zip
tweak: move codex 5.3 model definition to the plugin so that models.dev doesnt have to show unsupported model for others (#12344)
-rw-r--r--packages/opencode/src/plugin/codex.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/packages/opencode/src/plugin/codex.ts b/packages/opencode/src/plugin/codex.ts
index 7658ad55e..fe9f7d1ab 100644
--- a/packages/opencode/src/plugin/codex.ts
+++ b/packages/opencode/src/plugin/codex.ts
@@ -3,6 +3,7 @@ import { Log } from "../util/log"
import { Installation } from "../installation"
import { Auth, OAUTH_DUMMY_KEY } from "../auth"
import os from "os"
+import { ProviderTransform } from "@/provider/transform"
const log = Log.create({ service: "plugin.codex" })
@@ -370,6 +371,38 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> {
}
}
+ if (!provider.models["gpt-5.3-codex"] || true) {
+ const model = {
+ id: "gpt-5.3-codex",
+ providerID: "openai",
+ api: {
+ id: "gpt-5.3-codex",
+ url: "https://chatgpt.com/backend-api/codex",
+ npm: "@ai-sdk/openai",
+ },
+ name: "GPT-5.3 Codex",
+ capabilities: {
+ temperature: false,
+ reasoning: true,
+ attachment: true,
+ toolcall: true,
+ input: { text: true, audio: false, image: true, video: false, pdf: false },
+ output: { text: true, audio: false, image: false, video: false, pdf: false },
+ interleaved: false,
+ },
+ cost: { input: 0, output: 0, cache: { read: 0, write: 0 } },
+ limit: { context: 400_000, input: 272_000, output: 128_000 },
+ status: "active" as const,
+ options: {},
+ headers: {},
+ release_date: "2026-02-05",
+ variants: {} as Record<string, Record<string, any>>,
+ family: "gpt-codex",
+ }
+ model.variants = ProviderTransform.variants(model)
+ provider.models["gpt-5.3-codex"] = model
+ }
+
// Zero out costs for Codex (included with ChatGPT subscription)
for (const model of Object.values(provider.models)) {
model.cost = {