Skip to content

feat: support disabling individual models within a provider #21035

Description

@fpigeonjr

Problem

When configuring a provider like github-copilot, OpenCode always shows the full list of models from models.dev regardless of what's defined in opencode.json. There is currently no way to hide or suppress individual models within a provider — only entire providers can be toggled via enabled_providers / disabled_providers.

This is a real pain point for providers like GitHub Copilot where the available models in the UI depend on the user's subscription tier. For example, a Copilot plan may only include 11 of the 20+ models OpenCode shows, leading to a confusing and noisy model picker full of models that will error when selected.

Proposed Solution

Add support for a disabled: true flag on individual model entries in the provider.models config block:

{
  "provider": {
    "github-copilot": {
      "models": {
        "gpt-5.4": { "disabled": true },
        "gpt-5.3-codex": { "disabled": true }
      }
    }
  }
}

When disabled: true is set on a model, it should be excluded from the model selection list entirely.

Use Case

GitHub Copilot subscribers only have access to a subset of models depending on their plan. Being able to trim the list to only the models actually available on your plan would make the model picker much cleaner and prevent confusion when a selected model returns an error because it's not included in your subscription.

Alternatives Considered

  • Using enabled_providers — only works at the provider level, too coarse
  • Manually maintaining a list and hoping OpenCode respects it — currently no mechanism exists

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions