-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Open
Description
Summary
Currently, opencode supports disabled_providers to disable entire providers, but there's no way to disable specific models within a provider.
Use Case
When using providers like google, many models are listed but not all are actually available:
google/gemini-1.5-*- 404 Not Foundgoogle/gemini-2.0-*- 404 or unsupportedgoogle/*-tts*,*-image*,*-live*,*-embedding*- Not suitable for chat
Out of 26 Google models listed, only 5 are actually usable for chat:
google/gemini-2.5-flashgoogle/gemini-2.5-progoogle/gemini-2.5-flash-litegoogle/gemini-3-flash-previewgoogle/gemini-3-pro-preview
Proposed Solution
Add a disabled_models config option in opencode.json:
```json
{
"disabled_providers": ["poe"],
"disabled_models": [
"google/gemini-1.5-",
"google/gemini-2.0-",
"google/-tts",
"google/-image",
"google/-live",
"google/-embedding"
]
}
```
Features:
- Support glob patterns (e.g.,
google/gemini-1.5-*) - Support exact model IDs (e.g.,
google/gemini-flash-latest) - Hidden models won't appear in
opencode modelsoutput - Hidden models won't be selectable in the UI
Workaround
I've built checkmodel which maintains its own blacklist at ~/.config/checkmodel/checkmodel.json, but this only affects checkmodel's testing - the models still appear in opencode.
Benefits
- Cleaner model list - only show models that actually work
- Prevent user confusion when selecting unavailable models
- Reduce API errors from attempting to use unsupported models
thiagowfx, darcien, Microck, KelvinJRosado and ls-pavel-makhov
Metadata
Metadata
Assignees
Labels
No labels