fix(setup): OpenCode Zen/Go show OpenRouter models instead of their own
After selecting OpenCode Zen or Go as provider in hermes setup, the model selection page showed OpenRouter models because these providers weren't in the list that routes to _setup_provider_model_selection(). They fell through to the else branch which shows the OpenRouter catalog. Users ended up with an OpenCode API key but an OpenRouter model name, causing 'Provider resolver returned an empty API key' on first use. Fix: add opencode-zen and opencode-go to the provider list that uses _setup_provider_model_selection() for live /models detection.
This commit is contained in:
@@ -1714,7 +1714,7 @@ def setup_model_provider(config: dict):
|
||||
model_cfg = _model_config_dict(config)
|
||||
model_cfg["api_mode"] = "chat_completions"
|
||||
config["model"] = model_cfg
|
||||
elif selected_provider in ("copilot", "zai", "kimi-coding", "minimax", "minimax-cn", "kilocode", "ai-gateway"):
|
||||
elif selected_provider in ("copilot", "zai", "kimi-coding", "minimax", "minimax-cn", "kilocode", "ai-gateway", "opencode-zen", "opencode-go"):
|
||||
_setup_provider_model_selection(
|
||||
config, selected_provider, current_model,
|
||||
prompt_choice, prompt,
|
||||
|
||||
Reference in New Issue
Block a user