Repository navigation
Description
Summary
In the dashboard's Shadow call intercept settings, the "Replacement model" dropdown persists the bare model id (gpt-5.6-sol) instead of the full namespaced id (subapi/gpt-5.6-sol) when a routed model is selected. The saved bare id then routes shadow calls to the built-in openai provider, silently breaking interception for users of custom/namespaced providers. On reload the dropdown also "jumps" to the native model with the same id.
Client or integration
Codex Desktop (embedded app-server 0.147.0-alpha.1.2) + Web dashboard (GUI) — macOS
Area
Shadow call intercept / GUI settings
Reproduction
- Open dashboard (
http://localhost:10100) → Shadow call intercept settings. - In "Replacement model", select a namespaced model such as
subapi/gpt-5.6-sol. - Save, then inspect
~/.opencodex/config.json→shadowCallIntercept.modelis"gpt-5.6-sol"(bare), not"subapi/gpt-5.6-sol". - Reload the page: the dropdown no longer shows the selected namespaced model (bare value matches the native OpenAI entry with the same id → UI jumps to a different model).
Expected behavior
Selecting subapi/gpt-5.6-sol should persist shadowCallIntercept.model = "subapi/gpt-5.6-sol" — the full namespaced id. The management API already accepts any string, so this is purely a GUI value/label mismatch.
Actual behavior
shadowCallIntercept.model is saved as the bare id (gpt-5.6-sol), which routes shadow calls to the built-in openai provider (causing 502/429 failures when chatgpt.com is unreachable), and the dropdown visually jumps to the native model with the same id on reload.
Version
- opencodex 2.10.1 (also present in 2.10.0)
- Codex Desktop 26.730.61639 / embedded CLI 0.147.0-alpha.1.2
Operating system
macOS arm64 (Apple Silicon)
Root cause
In the bundled GUI (gui/dist/assets/index-*.js), the shadow-call settings component builds the dropdown as:
options: [{ value: '', label: '—' }, ...c.map(e => ({
value: e.id, // ← bare id
label: `${e.provider}/${e.id}` // ← namespaced label
}))]value uses the bare e.id while label uses the namespaced id, so saving writes the bare id and reload matches the wrong option.
Suggested fix
Use the full namespaced id for the option value, matching the label:
options: [{ value: '', label: '—' }, ...c.map(e => ({
value: `${e.provider}/${e.id}`,
label: `${e.provider}/${e.id}`
}))]Verified locally as a one-line patch on 2.10.1: the dashboard then persists the full subapi/gpt-5.6-sol and interception works correctly.
Workaround
Set shadowCallIntercept.model directly in ~/.opencodex/config.json (the management API accepts any string model id).
Activity
github-actions commentedon Aug 5, 2026
Automated translation bookkeeping — detected language: unknown.
github-actions commentedon Aug 5, 2026
Issue reopened
The report now contains the information required by the automated check. Thanks for updating it.
lidge-jun commentedon Aug 6, 2026
Confirmed at code level — thank you for the precise root cause, which pointed at exactly the right component. Two selects edit
shadowCallIntercept.model:gui/src/pages/Models.tsx:914already uses the canonicalnamespacedvalue from/api/models— correct.gui/src/pages/dashboard-overview-sections.tsx:363builds options inline withvalue: m.id/label: provider/id— this is the bundle snippet you decompiled, and it saves the bare id.One correction to the suggested patch: the fix should use the API's canonical
namespacedfield rather than reconstructing${provider}/${id}. Native OpenAI rows are deliberately bare slugs and routed rows go through a slug codec that encodes inner slashes (src/server/management/model-rows.ts,src/providers/slug-codec.ts), so string concatenation would mint noncanonical ids likeopenai/gpt-5.6-soland bypass encoded aliases.One honest limitation: a previously saved bare id that collides with a native slug (your exact case) is indistinguishable from an intentional native pick, so the fix prevents new corruption but cannot repair old collisions — the workaround you documented (setting the namespaced id directly in config) remains the recovery path for existing configs.
Fix PR with a regression test is in progress against
dev. #1078 is closed as a duplicate of this issue.Merge pull request #1087 from lidge-jun/codex/1075-shadow-call-namesp…
lidge-jun commentedon Aug 6, 2026
Fixed on dev by PR #1087, merge commit bfbc9a4. Both shadow-call selects (dashboard overview and Models page) now save the proxy's canonical namespaced routing id, and an unmatched legacy value stays visible as a fallback option instead of the select jumping. As noted above, a previously saved bare id colliding with a native slug can't be auto-repaired — set the namespaced id once via the fixed dropdown (or config) and it will stick. Thanks again for the exact root cause; it made this a same-day fix. Ships with the next release train.
fix(gui): shadow-call selects save the canonical namespaced model id (l…
fix(gui): shadow-call selects save the canonical namespaced model id (l…
Merge pull request lidge-jun#1087 from lidge-jun/codex/1075-shadow-ca…