[bug] openrouter not showing
Hey guys,
since some of the last versions, OpenRouter doesn't show up in the model selection.
Tried using the models.dev toml files in providers/ and also in config:
{ "$schema": "http://opencode.ai/config.json", "theme": "tokyonight", "provider": { "openrouter": { "npm": "@openrouter/ai-sdk-provider", "name": "OpenRouter", "options": {}, "models": { "anthropic/claude-sonnet-4": { "name": "Claude 4 Sonnet", "cost": { "input": 3.0, "output": 15.0, "cache_read": 3.75, "cache_write": 0.3 }, "limit": { "context": 200000 } } } } } }
What version of opencode are you using? I couldn't reproduce the bug with your exact same config file. I'm not even able to run opencode (version 0.1.95) with you config I think it's because the output property (in the limit) is missing.
can you try a simpler config like this
"provider": {
"openrouter": {
"npm": "@openrouter/ai-sdk-provider",
"models": {
"anthropic/claude-sonnet-4": {}
}
}
}
can you try a simpler config like this
"provider": { "openrouter": { "npm": "@openrouter/ai-sdk-provider", "models": { "anthropic/claude-sonnet-4": {} } } }
Gonna try later when I'm back home
@thdxr added output to the config as per @timetravel-1010 and it showed up :) probably that, don't think you changed something drastically in the last version