From b5511958183fed28e9658f5210c2a818c028058b Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Thu, 5 Feb 2026 14:53:26 -0600 Subject: [PATCH] tweak: move codex 5.3 model definition to the plugin so that models.dev doesnt have to show unsupported model for others (#12344) --- packages/opencode/src/plugin/codex.ts | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) 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 { } } + 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>, + 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 = {