Repository navigation
Description
- I have verified this feature I'm about to request hasn't been suggested before.
Summary
I'm an OpenCode Go (Zen) subscriber. I use my Go plan as the provider for Codex desktop (base_url: https://opencode.ai/zen/go/v1, wire_api: responses).
While using Codex, it automatically calls gpt-5.6-luna (a model I never selected) for its internal helper agents (task title generation, thread description refresh). This model name is hardcoded in the Codex binary — there is no config override, so I cannot stop it from the Codex side. Upstream confirms this: openai/codex#28741 (task title generation hardcodes a bare model slug, with no config override unlike memories.extract_model); openai/codex#29942 only adds a fallback when a model is unavailable — but luna returns 200 on the OpenCode Go gateway, so the fallback never triggers.
The core problem: disabling the model in Zen has no effect at the gateway
I disabled gpt-5.6-luna in the Zen dashboard, but:
- Direct API call with my OpenCode Go key:
POST https://opencode.ai/zen/go/v1/responseswithmodel: "gpt-5.6-luna"
→ still returns HTTP 200 and completes normally. - Codex keeps auto-calling luna and billing records keep being generated.
So the Zen toggle only affects the client-side model list (the "enable" direction works, see #17550), but the gateway does not enforce it: calls still succeed and still bill.
Impact
- One billing record (Aug 11, 13:55):
gpt-5.6-luna, ~186,000 tokens, $0.0419. - Each thread-description refresh triggers ~7 sampling requests (
reasoning_effort=low), accumulating to roughly $1/day of unexpected cost. - Zen Usage filtered to
gpt-5.6-luna(Aug 2026), daily cost bars Aug 7–11:
Feature request
Please enforce model enable/disable at the OpenCode Go / Zen gateway:
- When a model is disabled in Zen, API requests for that model should be rejected (e.g. 403/400) for the affected API key and not billed.
- Ideally, support a per-key model allowlist/blocklist (
models_enabled/models_disabled) enforced server-side, instead of only affecting the/modelslist. - Optional safety net: spend/token caps per key.
Because the caller (Codex internal helpers) hardcodes the model and cannot be configured client-side, only server-side enforcement can stop this.
Steps to reproduce
- Subscribe to OpenCode Go; configure provider
base_url: https://opencode.ai/zen/go/v1,wire_api: responses. - Use the provider in Codex desktop (main model, e.g.
deepseek-v4-flash). - Observe logs: internal requests with
model=gpt-5.6-luna, prompt like "Fill the structured description field… / Current title: …",reasoning_effort=low. - In Zen dashboard, disable
gpt-5.6-luna. - Call
/responsesdirectly withgpt-5.6-luna→ still 200; Codex still auto-calls it and billing continues.
Environment
- macOS; Codex desktop (ChatGPT.app bundled
codexbinary; contains migration note "GPT-5.4 Mini is no longer available. Codex now uses GPT-5.6 Luna") - OpenCode Go provider (
zen/go/v1, Responses API)
Relationship to #40560 (not a duplicate)
#40560 is about the TUI model picker / /models catalog: disabled models still appear in the picker (UX/display issue), and selecting one then fails at the gateway.
This issue is about a different, more severe gap: the gateway itself does not reliably reject or stop billing for a disabled model:
- [FEATURE/BUG] OpenCode Zen disabled models still appear in TUI picker (config drift risk) #40560 implies the gateway errors when a disabled model is selected — but in my case the gateway returns HTTP 200 and completes (and bills) for
gpt-5.6-lunaeven after I disabled it in Zen. Enforcement appears inconsistent. - The caller here is Codex's internal helper agents, which hardcode the model slug and cannot be configured client-side, so even a perfect TUI/catalog fix in OpenCode would not help — only server-side rejection + no billing (and ideally a per-key allowlist/blocklist + spend cap) can stop the cost.
Related
- openai/codex#28741 – task title generation hardcodes model, no config override
- openai/codex#29942 – fallback only when model is unavailable
- #17550 – models must be enabled in Zen to appear in
/models(enable direction only) - #32328 – Go plan model visibility
- #6979 / #24832 / #18393 – disable mechanisms not honored
- #40621 – gpt-5.6-luna rejected by region on the same Go plan (related scenario)

Activity
github-actions commentedon Aug 11, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:and the issue body should include the required verification checkbox confirming you've searched for existing issues.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Feature request: Zen model disable toggle is not enforced at the gateway - Codex keeps auto-using gpt-5.6-luna and billing continues[/-][+][FEATURE]: Zen model disable toggle is not enforced at the gateway - Codex keeps auto-using gpt-5.6-luna and billing continues[/+]YiRan0 commentedon Aug 11, 2026
Regarding the duplicate flag for #40560: this is related but not the same issue.
/modelscatalog still shows disabled models (display/UX), and selecting one then fails at the gateway.gpt-5.6-lunain Zen, a directPOST /responseswith that model still returns HTTP 200, completes, and generates billing records. The caller is Codex's internal helper agent, which hardcodes the model slug and cannot be configured client-side.So even a complete fix for #40560 (catalog filtering + picker UX) would not stop the cost in this scenario; only server-side enforcement (reject disabled model + no billing, per-key allowlist/blocklist, spend cap) can. I've also added the
[FEATURE]:prefix and the verification checkbox to comply with the contributing guidelines.github-actions commentedon Aug 11, 2026
Thank you for updating your issue! It now clearly explains the problem, includes steps to reproduce, environment details, and references related issues. Everything looks good — we appreciate the thorough write-up!
sergiopadure commentedon Oct 3, 2026
Same problem on an OpenCode Go subscription, and it goes beyond individual models: disabling the whole provider has no effect either.
On 2026-10-03 I disabled the models I don't use (including
qwen3.8-flash), then every model in the OpenCode Go model list, and finally the OpenCode Go provider entirely. The same Go API key keeps working throughout:opencode run -m opencode-go/qwen3.8-flash "Reply with exactly: OK"exits 0 with an answer fromqwen3.8-flash. I ran it three times between 16:40 and 16:44 UTC, afterqwen3.8-flashwas disabled.qwen3.8-flashreturned HTTP 200 with tokens consumed, at 16:35 and 16:43 UTC.Expected: requests for a disabled model, and every request once the provider is disabled, are rejected (for example HTTP 403) and are not billed.
As it stands, a subscriber has no way to stop a client from using, and being billed for, a model they have switched off, so the toggles give a false sense of control. This looks like a gateway enforcement bug rather than a feature request.
Could someone from the team confirm whether these toggles are meant to be enforced at the gateway, and if so, prioritise the fix?
gustavo-oo commentedon Oct 6, 2026
Adding another confirmation on an OpenCode Go subscription — this time the caller was OpenCode's own subagent, and the model has a small monthly allowance.
Scenario
wrk_01KS5JJ92HP249G45Y7YVT0GPFtasktool), not from an external client. Screenshots of the usage page and the disabled toggle are attached.Direct repro against the Go gateway (today, after the model was disabled)
Result: HTTP 200 with tokens billed:
{"id":"727e4cf4d53bc3ec819ed8979335dcf9","object":"chat.completion","created":1791305279,"model":"kimi-k3","choices":[{"index":0,"finish_reason":"length","message":{"role":"assistant","content":"","reasoning_content":"The user wants me to reply with just"}}],"usage":{"prompt_tokens":92,"completion_tokens":8,"total_tokens":100,"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0,"cache_creation_input_tokens":0,"cache_write_tokens":0},"completion_tokens_details":{}}}Impact
Kimi K3 has a $15/month allowance on Go, so $1.65 is ~11% of that model's allowance spent on a model I had switched off. As the comment above notes, the toggle gives a false sense of control.
Expected
The gateway should reject requests for workspace-disabled models (e.g. HTTP 403 with a
model_disablederror) and not bill them, regardless of which client or subagent sends the request.Environment
opencodejr commentedon Oct 28, 2026
Thanks for the detailed write-up, and for tracking down the Codex side of this.
To restate: you'd like the OpenCode Zen/Go gateway to enforce the Models tab toggle on the server. Requests for a model you've turned off would be rejected and not billed. You'd also like per-key model allow/block lists and spend/token caps as a safety net, because clients like Codex hardcode their helper-agent models and can't be configured to avoid them.
This can't be done in the OpenCode app or with a plugin, because the requests come from Codex and only the gateway can block them. Maintainers will consider it, though there's no commitment on whether or when.
Related issues:
gpt-5.6-lunaIf you'd like the
gpt-5.6-lunacharges reviewed, billing isn't handled in GitHub issues. Please email [email protected] with the details, and keep account and payment information out of this public issue.