anomalyco / anomalyco/opencode

[FEATURE/BUG] OpenCode Zen disabled models still appear in TUI picker (config drift risk)

Open
#40,560 2 comments 0 reactions 1 assignee View on GitHub

@fwang is already working on this.

Since Aug 5, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

When models are disabled in the OpenCode Zen workspace/admin dashboard, they continue to appear in the TUI model picker (/models). Selecting a disabled model results in a gateway error when initiating a prompt, but the TUI model picker provides no indication that the model is disabled or blocked.

Configuration Drift Risk & Developer Experience

Currently, the workaround suggested in closed issues (e.g. #18149) is for users to manually configure a whitelist or blacklist in their local ~/.config/opencode/opencode.json under the opencode provider key.

However, this approach introduces significant configuration drift risks:

  1. Double Maintenance: Workspace admins / users must manage model availability in two separate places (Zen Web Dashboard and local opencode.json files).
  2. Configuration Drift: Whenever workspace admins disable or enable models on the Zen backend, every team member's local opencode.json whitelist/blacklist becomes stale immediately. Users have no automated way to know when their local config is out of sync with workspace policies.
  3. Inconsistent UX: Other integrated providers (e.g., GitHub Copilot) dynamically filter available models according to account/org policies.
Expected Behavior
  1. The OpenCode Zen model catalog endpoint should filter out models disabled for the workspace (or return model metadata with a disabled: true flag).
  2. The TUI model picker should respect the workspace status and automatically omit or disable blocked models without requiring manual sync via local opencode.json.
Steps to Reproduce
  1. Disable specific models in the OpenCode Zen dashboard.
  2. Launch OpenCode TUI and check /models.
  3. Disabled models still show up in the TUI picker.
  4. Selecting and querying a disabled model fails with a gateway error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.