|
|
@@ -1,6 +1,7 @@
|
|
|
import type { Hooks, PluginInput } from "@opencode-ai/plugin"
|
|
|
import { Log } from "../util/log"
|
|
|
import { OAUTH_DUMMY_KEY } from "../auth"
|
|
|
+import { ProviderTransform } from "../provider/transform"
|
|
|
|
|
|
const log = Log.create({ service: "plugin.codex" })
|
|
|
|
|
|
@@ -321,7 +322,7 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> {
|
|
|
}
|
|
|
|
|
|
if (!provider.models["gpt-5.2-codex"]) {
|
|
|
- provider.models["gpt-5.2-codex"] = {
|
|
|
+ const model = {
|
|
|
id: "gpt-5.2-codex",
|
|
|
providerID: "openai",
|
|
|
api: {
|
|
|
@@ -337,13 +338,18 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> {
|
|
|
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: 400000, output: 128000 },
|
|
|
- status: "active",
|
|
|
+ status: "active" as const,
|
|
|
options: {},
|
|
|
headers: {},
|
|
|
+ release_date: "2025-12-18",
|
|
|
+ variants: {} as Record<string, Record<string, any>>,
|
|
|
}
|
|
|
+ model.variants = ProviderTransform.variants(model)
|
|
|
+ provider.models["gpt-5.2-codex"] = model
|
|
|
}
|
|
|
|
|
|
// Zero out costs for Codex (included with ChatGPT subscription)
|