Repository navigation
Description
Description
After running opencode auth logout minimax, the built-in MiniMax provider entries (both minimax.io and minimaxi.com) continue to appear in the model selector and the models remain fully usable, even though no authentication credential is stored anywhere on disk.
Only one provider (minimaxi.com) was ever added by the user, but two providers are shown. After auth logout the provider list is not cleared, and re-launching opencode still shows both providers with all their models selectable and working.
This is a privacy/state-correction bug: the user has no way to fully disconnect from a built-in provider via the documented auth logout command.
Steps to reproduce
- Start from a clean state — no MiniMax provider configured, no entry in
~/.config/opencode/opencode.jsonor~/.local/share/opencode/auth.json. - Run
opencode auth login minimaxand add a credential for theminimaxi.comendpoint. - Confirm both
MiniMax (minimax.io)andMiniMax (minimaxi.com)show up in the model selector with all models (M2, M2.1, M2.5, M2.5-highspeed, M2.7, M2.7-highspeed, M3). (Only thecomone was actually added by the user.) - Run
opencode auth logout minimaxto remove the credential. - Inspect
~/.local/share/opencode/auth.jsonand~/.local/share/opencode/account.json— confirm there is nominimaxkey remaining. - Inspect
~/.config/opencode/opencode.json— confirm there is nominimaxentry inprovider. - Re-launch
opencodeand open the model selector.
Expected behavior
After opencode auth logout minimax, the MiniMax provider(s) should no longer appear in the model selector at all (or at minimum the user should be able to fully disconnect/remove them). The configured credential is the only thing that should differ between "connected" and "not connected" — model lists must not be hard-coded into the binary in a way that survives credential removal.
Additionally, only the provider the user actually configured (minimaxi.com) should be listed. The duplicate minimax.io entry should not appear unless the user explicitly added it.
Actual behavior
- Both
MiniMax (minimax.io)andMiniMax (minimaxi.com)are still shown in the model selector. - All MiniMax models are still selectable and can be used to send messages successfully.
- There is no way to remove these entries from the UI.
auth logoutonly deletes the credential, but the provider/model list is still being injected from somewhere (likely a built-in provider catalog baked into the binary or a cache that is not invalidated on logout).
Environment
- opencode version: 1.17.3
- OS: Linux (Arch)
- No plugins
- Storage backend: local (
~/.local/share/opencode/) - No MiniMax entry in
~/.config/opencode/opencode.json - No MiniMax entry in
~/.local/share/opencode/auth.jsonafter logout - No MiniMax entry in
~/.local/share/opencode/account.jsonafter logout
Files inspected (post-logout)
~/.local/share/opencode/auth.json contains only: xiaomi-token-plan-cn, deepseek, kimi-for-coding, xai. No minimax key.
~/.local/share/opencode/account.json contains only: xiaomi-token-plan-cn, deepseek, kimi-for-coding, xai. No minimax key.
~/.config/opencode/opencode.json provider block contains only the user-defined ollama entry. No minimax entry.
Despite all three files being clean, the model selector still shows the MiniMax providers.
Screenshot
Model selector after auth logout minimax — both providers are still listed and the user can select any model:
(Attaching the original screenshot from the report; it shows the Select model dialog with MiniMax (minimax.io) and MiniMax (minimaxi.com) both expanded, with MiniMax-M2 under minimaxi.com highlighted as the current selection.)
Suspected cause
The MiniMax provider model catalog appears to be served from a hard-coded list inside the opencode binary (or a persistent cache that is not cleared on auth logout) rather than being driven solely by the entries in auth.json / account.json / opencode.json. auth logout only removes the credential, leaving the model list behind, so the provider appears "still connected" even when it is not.
Related
- Cannot disconnect from provider #10494 — "Cannot disconnect from provider" (similar symptom: provider can't be removed)
- authed provider not show right #10331 — "authed provider not show right" (related auth/provider state issue)
Activity
github-actions commentedon Jun 11, 2026
This issue might be a duplicate of existing issues. Please check:
auth.jsonor config filesIf your issue is distinct from these, please clarify what differentiates it.
sharyuke commentedon Jun 11, 2026
Root cause found — closing as not-a-bug, but documenting for future reference
After further investigation, the real cause of my confusion was an environment variable in my shell, not a config-file issue.
Two things are at play
MINIMAX_API_KEYwas set in my~/.bashrc(line 192,export MINIMAX_API_KEY=...). opencode sees this env var and auto-enables the four built-in MiniMax providers (minimax,minimax-cn,minimax-cn-coding-plan,minimax-coding-plan) on every startup, regardless of what's inauth.json/opencode.json.auth logoutonly removes the credential, it does not clear the env var, so the providers get re-enabled on the next launch.disabled_providersinopencode.jsondoes work for the CLI, but is not honored by the TUI model selector. I verified this against the source:packages/opencode/src/provider/provider.ts:1328,1331-1335,1549-1552— the runtime provider loader buildsdisabled = new Set(cfg.disabled_providers ?? [])and removes matching providers.packages/opencode/test/provider/provider.test.ts— there is even a test"disabled_providers excludes provider"confirming this works.provider.listendpoint (packages/server/src/handlers/provider.ts), which returnscatalog.provider.available()frompackages/core/src/catalog.ts:224-229. That method filters byprovider.enabledonly and does not consultdisabled_providersat all. So even with"disabled_providers": ["minimax", "minimax-cn"]correctly loaded in the resolved config (verified withopencode debug config), the model selector still shows them.This second point is a real bug —
disabled_providersis documented behavior and should be honored end-to-end. It is silently ignored in the TUI.Reproduction (local, v1.17.3)
$ opencode debug v2 Total providers: 9 ... minimax: MiniMax (minimax.io) enabled={'via': 'env', 'name': 'MINIMAX_API_KEY'} minimax-cn: MiniMax (minimaxi.com) enabled={'via': 'env', 'name': 'MINIMAX_API_KEY'} minimax-cn-coding-plan: MiniMax Token Plan (minimaxi.com) enabled={'via': 'env', 'name': 'MINIMAX_API_KEY'} minimax-coding-plan: MiniMax Token Plan (minimax.io) enabled={'via': 'env', 'name': 'MINIMAX_API_KEY'} ...opencode config(andopencode debug config) shows"disabled_providers": ["minimax", "minimax-cn"]in the resolved config, yetprovider.liststill includes the four MiniMax entries.Workaround that works for me
Unset the env var (or remove the
exportline from~/.bashrc) and restart opencode. With the env var gone, the providers are no longer auto-enabled, and the model selector stops listing them:unset MINIMAX_API_KEY MINIMAX_API_BASEKeeping
disabled_providersinopencode.jsonis still a good idea as a belt-and-suspenders measure for when the env var is set.Recommendation
Two follow-ups worth opening as separate issues:
auth logoutshould not leave providers in a zombie state. When the user explicitly removes a credential, the env-var auto-loading should also be disabled, or at minimum the user should be warned that the provider will be re-enabled on next launch. Currently the only way to be sure a provider is gone is to track down every place the env var is set.disabled_providersis not honored by the TUI.CatalogV2.provider.available()should apply the sameisProviderAllowedcheck that the runtime loader uses, so user intent expressed in the config file is respected everywhere.Closing this as not-a-bug on the original report, but the env-var behavior is surprising enough to deserve a UX improvement. Sorry for the noise.
sharyuke commentedon Jun 11, 2026
Closing as not-a-bug — root cause was a stale env var in (see comment below). does work for the CLI but is not honored by the TUI catalog layer; recommend opening that as a separate bug.