fix: custom endpoint provider shows as openrouter in gateway
Three issues caused the gateway to display 'openrouter' instead of 'Custom endpoint' when users configured a custom OAI-compatible endpoint: 1. hermes setup: custom endpoint path saved OPENAI_BASE_URL and OPENAI_API_KEY to .env but never wrote model.provider to config.yaml. All other providers (Codex, z.ai, Kimi, etc.) call _update_config_for_provider() which sets this — custom was the only path that skipped it. Now writes model.provider='custom' and model.base_url to config.yaml. 2. hermes model: custom endpoint set model.provider='auto' in config.yaml. The CLI display had a hack to detect OPENAI_BASE_URL and override to 'custom', but the gateway didn't. Now sets model.provider='custom' directly. 3. gateway /model and /provider commands: defaulted to 'openrouter' and read config.yaml — which had no provider set. Added OPENAI_BASE_URL detection fallback (same pattern the CLI uses) as a defensive catch for existing users who set up before this fix.
This commit is contained in:
parent
a2d0d07109
commit
3b67606c42
4 changed files with 33 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ _PROVIDER_LABELS = {
|
|||
"kimi-coding": "Kimi / Moonshot",
|
||||
"minimax": "MiniMax",
|
||||
"minimax-cn": "MiniMax (China)",
|
||||
"custom": "custom endpoint",
|
||||
"custom": "Custom endpoint",
|
||||
}
|
||||
|
||||
_PROVIDER_ALIASES = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue