CLI tool that automatically fetches and updates OpenCode configuration with the latest models from supported providers.
New models added to provider APIs can take time to appear in models.dev. This tool automatically syncs all available models from your chosen providers and updates opencode.json instantly—enabling you to use any model immediately without waiting.
- Automatically updates all available models from 24 OpenAI-compatible providers
- Updates or creates
~/.config/opencode/opencode.jsonwith latest model data - Supports Windows, Linux, and macOS
- Preserves existing provider configurations during updates
- Creates automatic timestamped backups before each update
- Removes auto-generated provider entries from config with
--remove
npx opencode-model-updater [options]| Option | Default | Description |
|---|---|---|
--provider <name> |
all |
Specific provider(s) to update (comma-separated names or all) |
--remove [names] |
Remove auto-generated provider entries (comma-separated names, or omit to remove all) | |
--version |
Display version number | |
--help |
Show help message | |
--list |
List all available providers |
| Provider | Description |
|---|---|
openrouter |
OpenRouter - Access 600+ LLMs through a single API |
aihubmix |
AIHubMix - Multi-provider model gateway with 600+ models |
ollamacloud |
Ollama Cloud - Run open-source models on your own cloud |
nvidia |
Nvidia - Nvidia NIM models |
abacus |
Abacus - Abacus AI models |
novita-ai |
Novita AI - Fast and affordable AI inference |
chutes |
Chutes AI - AI model infrastructure |
cortecs |
Cortecs AI - AI inference platform |
moark |
Moark - AI model marketplace |
helicone |
Helicone - AI observability and model gateway |
huggingface |
Hugging Face - Open AI model hub |
fastrouter |
FastRouter - Fast AI routing |
inception |
Inception Labs - AI inference |
zenmux |
Zenmux - AI model multiplexing |
ovhcloud |
OVH Cloud - Cloud AI inference |
synthetic |
Synthetic AI - AI model services |
nano-gpt |
NanoGPT - Lightweight GPT models |
requesty |
Requesty - AI request routing |
friendli |
Friendli - AI inference engine |
io-net |
IO.NET - Distributed GPU computing |
modelscope |
ModelScope - AI model hub (China) |
poe |
Poe - AI chatbot platform |
opencode-zen |
OpenCode Zen - OpenCode Zen AI |
deep-infra |
Deep Infra - AI model hosting |
Update configuration with all providers:
npx opencode-model-updaterUpdate only OpenRouter provider:
npx opencode-model-updater --provider openrouterUpdate only AIHubMix provider:
npx opencode-model-updater --provider aihubmixUpdate multiple specific providers:
npx opencode-model-updater --provider openrouter,aihubmixList all available providers:
npx opencode-model-updater --listRemove all auto-generated provider entries from config:
npx opencode-model-updater --removeRemove specific auto-generated providers from config:
npx opencode-model-updater --remove openrouter,aihubmixThe tool creates provider entries in your OpenCode configuration with all available models:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"your-existing-provider": { "..." : "preserved" },
"openrouter-auto-generated": {
"name": "OpenRouter Auto Generated",
"options": {
"baseURL": "https://openrouter.ai/api/v1",
"apiKey": "your-api-key"
},
"models": {
"openai/gpt-4o": { "name": "GPT-4o" },
"anthropic/claude-sonnet-4": { "name": "Claude Sonnet 4" }
}
}
}
}