From 1dad07b4a60656465a04442a5cd2227dbac902a2 Mon Sep 17 00:00:00 2001 From: "developing-today[bot]" <5454422+developing-today[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 13:35:20 -0600 Subject: [PATCH] chore(opencode): re-seat openai-codex routes onto openai-plan, retire the provider --- .opencode/opencode.jsonc | 43 +++++++++++++------------- bin/sync-models.mjs | 65 ++-------------------------------------- 2 files changed, 23 insertions(+), 85 deletions(-) diff --git a/.opencode/opencode.jsonc b/.opencode/opencode.jsonc index 2661f0b4ba..540c69d90b 100644 --- a/.opencode/opencode.jsonc +++ b/.opencode/opencode.jsonc @@ -143,7 +143,6 @@ "huggingface", "opencode", "github-copilot", - "openai-codex", "openrouter", "cloudflare-workers-ai", "open-design", @@ -161,8 +160,10 @@ // they are listed here (verified live 2026-11-03 -- with the entries removed // all five reappeared in the running server within minutes). The entries are // the only trace of them left; there are no definitions to flip back on. - // openai-codex was evaluated for the same removal and KEPT whole: live - // model_routes still target openai-codex/* directly. + // openai-codex followed on 2026-11-03: its ten route legs were re-seated + // onto openai-plan (the ChatGPT provider route) and the definition was + // deleted with the rest. It is a custom id with no catalog entry, so -- + // unlike the five tombstones above -- no entry stays for it here. // Default was "claude-code/claude-haiku-5-5" until the 2026-10-27 Claude // pause (see the header note). Workhorse is the fleet's standard tier and // what agent configs already default to; restoring the Haiku default @@ -362,15 +363,10 @@ // "models": maintained by sync-models in the runtime overlay (~/.local/state/opencode/opencode-runtime.jsonc) — see code#4544. }, // "openai": model catalog maintained by sync-models in the runtime overlay (~/.local/state/opencode/opencode-runtime.jsonc) — see code#4544. - "openai-codex": { - "npm": "@ai-sdk/openai-compatible", - "name": "OpenAI Codex CLI (via codex)", - "options": { - "baseURL": "http://127.0.0.1:{env:CODEX_PROXY_PORT:-18744}/v1", - "apiKey": "codex-local" - } - // "models": maintained by sync-models in the runtime overlay (~/.local/state/opencode/opencode-runtime.jsonc) — see code#4544. - }, + // "openai-codex": retired 2026-11-03 -- definition deleted after its + // route legs were re-seated onto openai-plan (see the note at + // disabled_providers). The codex door program (:18744) is untouched; + // its own retirement stays with the #1154 cutover. // NOTE (2026-10-25): design-code proxy block (one of three identical copies) - commented out per Drew; only the direct Open Design cloud provider ("opendesign") stays active. Preserved, not deleted. // "open-design": { // "npm": "@ai-sdk/openai-compatible", @@ -1743,7 +1739,8 @@ // opencode#1413 persona-routes PR; the prompt leads any caller // system text, exactly as the door composed it). Antigravity legs // sit on antigravity-direct (:18751) per the #1409 repoint - // (code#4626); codex legs on openai-codex (:18744). The door's + // (code#4626); gpt legs on openai-plan (re-seated from the + // codex door, 2026-11-03). The door's // keyword fallback for unknown gpt/codex-shaped ids has no route // equivalent and is not carried: unknown ids fail selection // cleanly, as they did at the door (400) via the façade envelope. @@ -1762,7 +1759,7 @@ "name": "GPT-6 Luna (Design Code)", "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ - "openai-codex/gpt-6-luna", + "openai-plan/gpt-6-luna", "antigravity-direct/gemini-3.8-flash" ], "selection": "ordered", @@ -1772,7 +1769,7 @@ "name": "GPT-6.1 Sol (Design Code)", "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ - "openai-codex/gpt-6.1-sol", + "openai-plan/gpt-6.1-sol", "antigravity-direct/gemini-3.8-flash" ], "selection": "ordered", @@ -1783,7 +1780,7 @@ "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ "antigravity-direct/gemini-3.8-flash", - "openai-codex/gpt-5.6-luna" + "openai-plan/gpt-5.6-luna" ], "selection": "ordered", "autonomy": "rules" @@ -1793,7 +1790,7 @@ "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ "antigravity-direct/gemini-3.8-flash", - "openai-codex/gpt-5.6-luna" + "openai-plan/gpt-5.6-luna" ], "selection": "ordered", "autonomy": "rules" @@ -1803,7 +1800,7 @@ "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ "antigravity-direct/gemini-3.8-flash", - "openai-codex/gpt-5.6-luna" + "openai-plan/gpt-5.6-luna" ], "selection": "ordered", "autonomy": "rules" @@ -1813,7 +1810,7 @@ "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ "antigravity-direct/gemini-3.8-flash", - "openai-codex/gpt-5.6-luna" + "openai-plan/gpt-5.6-luna" ], "selection": "ordered", "autonomy": "rules" @@ -1823,7 +1820,7 @@ "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ "antigravity-direct/gemini-3.8-flash", - "openai-codex/gpt-6.1-sol" + "openai-plan/gpt-6.1-sol" ], "selection": "ordered", "autonomy": "rules" @@ -1833,7 +1830,7 @@ "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ "antigravity-direct/gemini-3.8-flash", - "openai-codex/gpt-6.1-sol" + "openai-plan/gpt-6.1-sol" ], "selection": "ordered", "autonomy": "rules" @@ -1843,7 +1840,7 @@ "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ "antigravity-direct/gemini-3.8-flash", - "openai-codex/gpt-5.6-luna" + "openai-plan/gpt-5.6-luna" ], "selection": "ordered", "autonomy": "rules" @@ -1852,7 +1849,7 @@ "name": "Open Design Pro", "system": "You are an elite Code & Systems Design Architect.\nYour core expertise is in software architecture, clean code design, UI/UX design engineering, design tokens, component abstractions, domain-driven design, and maintainable systems patterns. Provide elegant, production-grade architectures and idiomatic design implementations.", "targets": [ - "openai-codex/gpt-6.1-sol", + "openai-plan/gpt-6.1-sol", "antigravity-direct/gemini-3.8-flash" ], "selection": "ordered", diff --git a/bin/sync-models.mjs b/bin/sync-models.mjs index 963d409c84..3d31f6859d 100755 --- a/bin/sync-models.mjs +++ b/bin/sync-models.mjs @@ -51,7 +51,6 @@ const OPENCODE_CONFIG_PATH = ? REPO_CONFIG_PATH : USER_CONFIG_PATH); const POLICY_PATH = path.join(import.meta.dirname, 'sync-models.policy.json'); -const CODEX_CACHE_PATH = path.join(HOME_DIR, '.codex/models_cache.json'); const GEMINI_CACHE_PATH = path.join(HOME_DIR, '.gemini/antigravity_models_cache.json'); const LS_LOG_PATH = path.join(HOME_DIR, '.config/Antigravity/logs/language_server.log'); @@ -177,32 +176,6 @@ async function discoverAntigravityModels() { return discovered; } -// ----------------------------------------------------------------------------- -// 3. Discover Codex Models (via ~/.codex/models_cache.json) -// ----------------------------------------------------------------------------- -function discoverCodexModels() { - console.log('[sync-models] Discovering Codex models...'); - if (!fs.existsSync(CODEX_CACHE_PATH)) { - console.warn(`[sync-models] Codex cache file not found at ${CODEX_CACHE_PATH}`); - return []; - } - try { - const raw = fs.readFileSync(CODEX_CACHE_PATH, 'utf-8'); - const data = JSON.parse(raw); - const models = (data.models || []).map(m => ({ - slug: m.slug, - name: m.display_name || m.name || m.slug, - description: m.description || '', - defaultEffort: m.default_reasoning_effort || 'medium' - })); - console.log(`[sync-models] Discovered ${models.length} models from Codex cache`); - return models; - } catch (err) { - console.warn(`[sync-models] Failed to parse Codex cache: ${err.message}`); - return []; - } -} - // ----------------------------------------------------------------------------- // Model policy (bin/sync-models.policy.json). Per provider, keep only the newest // model in each listed family and drop everything else. Exclusions are applied @@ -463,7 +436,6 @@ function removeJsoncPath(text, keys) { async function run() { const modelsDev = await fetchModelsDev(); const agyModels = await discoverAntigravityModels(); - const codexModels = discoverCodexModels(); const policy = loadPolicy(); if (!fs.existsSync(OPENCODE_CONFIG_PATH)) { @@ -598,40 +570,9 @@ async function run() { } } - // 2. Sync openai-codex - if (codexModels.length > 0 && config.provider['openai-codex']) { - const codexProv = config.provider['openai-codex']; - codexProv.models = codexProv.models || {}; - const modelsPath = ['provider', 'openai-codex', 'models']; - - const codexEfforts = ['low', 'medium', 'high', 'xhigh', 'max', 'ultra']; - const codexVariants = {}; - for (const eff of codexEfforts) { - codexVariants[eff] = { options: { reasoning_effort: eff } }; - } - - for (const m of codexModels) { - if (m.slug === 'codex-auto-review') continue; - const entry = { - name: m.name.includes('(') ? m.name : `${m.name} (Codex CLI)`, - variants: codexVariants, - limit: { context: 1000000, output: 128000 } - }; - - if (!codexProv.models[m.slug]) { - console.log(`[sync-models] + Adding openai-codex/${m.slug}`); - defineValue(codexProv.models, m.slug, entry); - edits.push({ set: [...modelsPath, m.slug], value: entry }); - totalAdded++; - } else { - if (codexProv.models[m.slug].limit?.context !== 1000000) { - codexProv.models[m.slug].limit = { context: 1000000, output: 128000 }; - edits.push({ set: [...modelsPath, m.slug, 'limit'], value: { context: 1000000, output: 128000 } }); - totalUpdated++; - } - } - } - } + // 2. openai-codex: retired 2026-11-03 -- the provider definition was + // deleted (dead-provider retirement ordered by Drew) after its route + // legs were re-seated onto openai-plan, so there is nothing to sync. // 3. Sync models.dev for cloud providers (openai; the google and // cloudflare-gateway syncs were retired 2026-11-03 with their provider definitions)