fix(models): map openai-api provider slug to openai picker group#3444
fix(models): map openai-api provider slug to openai picker group#3444rodboev wants to merge 2 commits into
Conversation
|
Reviewed the diff at HEAD ( What the fix does# api/config.py (inside _PROVIDER_ALIASES, ~line 792)
"openai-api": "openai",
# hermes_cli/auth.py:183
"openai-api": ProviderConfig(
id="openai-api",So the slug passes through the agent-first lookup unchanged and lands in the WebUI's local table — exactly where this entry belongs. Good call keeping it local rather than expecting the agent to alias its own canonical slug. Cross-repo grouping is consistentOn the agent side, # hermes_cli/models.py:987
"openai": ("OpenAI", "Codex CLI or direct OpenAI API", ["openai-codex", "openai-api"]),The WebUI's Bonus: it also fixes
|
|
Thanks @rodboev — the diagnosis is exactly right (hermes-agent reports its built-in OpenAI provider as the The problem with aliasing
|
|
Verified the send-path regression: Reworked in 19f7f70: dropped the alias, registered Tests rewritten: 6 picker assertions (display registered, models registered, not aliased, canonicalise preserves slug, openai/openai-codex unchanged) plus 2 send-path assertions ( Separately filed NousResearch/hermes-agent#37714 to add |
…ker provider #3443 + MiniMax-M3 #3374) (#3453) * feat: upgrade MiniMax default model to M3 Add MiniMax-M3 as the new default and prune deprecated older versions (M2.5/M2.5-highspeed/M2.1/M2) from the model catalog. M2.7 (and M2.7-highspeed) is retained as the legacy compatible option for users who pin to it. Updated: - api/config.py: _FALLBACK_MODELS adds minimax/MiniMax-M3 (placed before M2.7 so the dropdown surfaces it first) - api/config.py: _PROVIDER_MODELS['minimax'] adds M3 first, removes M2.5/M2.5-highspeed/M2.1 - api/config.py: _PROVIDER_MODELS['minimax-cn'] adds M3 first, removes M2.5/M2.1/M2 - tests/test_minimax_provider.py: updated CN catalog assertions to match the new {M3, M2.7} list API URL and TTS configuration are unchanged. Co-Authored-By: Octopus <liyuan851277048@icloud.com> * fix(models): register openai-api as first-class picker provider * fix(models): detect OPENAI_API_KEY as openai-api, not bare openai (#3443 Codex follow-up) Codex review found #3444 added the openai-api picker entry but the env-detection side still did detected_providers.add('openai') for OPENAI_API_KEY. The agent registry has only openai-api and openai-codex (no bare openai), so a env-only OPENAI_API_KEY setup emitted @openai: picker entries the agent can't resolve on the send path. Detect openai-api to match the registry. Adds a regression test. * docs(changelog): v0.51.223 — re-stamp keep-set (#3443 openai-api + #3374 MiniMax-M3); dropped #3289 + #3264 to hold per Codex --------- Co-authored-by: octo-patch <octo-patch@github.com> Co-authored-by: Octopus <liyuan851277048@icloud.com> Co-authored-by: Rod Boev <rod.boev@gmail.com> Co-authored-by: nesquena-hermes <[email protected]>
|
Shipped in v0.51.223 ✅ — cherry-picked onto release stage-p5 (the reworked first-class-provider version, not the original alias approach that broke the send path). I also added the env-detection fix a review caught: |
Fixes #3443.
Thinking Path
PROVIDER_REGISTRYuses the slugopenai-apifor its built-in OpenAI provider (the one activated byOPENAI_API_KEY/OPENAI_BASE_URLenv vars, distinct fromopenai-codexwhich reads~/.codex/auth.json)._resolve_provider_alias, but_PROVIDER_ALIASEShas no entry foropenai-api. The slug passes through unchanged, doesn't match theopenaikey in_PROVIDER_MODELS, and falls into theelsebranch of the group builder.openai-apiprovider are either silently dropped from the picker or misattributed to OpenRouter (if OR also lists them).z.ai→zai) and bug(local-model): 'Provider local set but no API key' fires after a few turns — auxiliary client (compression/vision) has no 'local' branch #1384 (local→custom): a provider slug mismatch resolved by a one-line alias table entry.What Changed
api/config.py— Added"openai-api": "openai"to_PROVIDER_ALIASESwith a comment explaining the provenance of the slug and referencing BYOK custom provider models not shown in WebUI model dropdown (TUI shows them) #815 and bug(local-model): 'Provider local set but no API key' fires after a few turns — auxiliary client (compression/vision) has no 'local' branch #1384 as precedent.tests/test_openai_api_provider_alias.py— New test file (4 tests) following the pattern oftest_issue1384_local_provider.py:test_openai_api_resolves_to_openai— the alias resolves correctlytest_openai_api_case_insensitive— uppercase and mixed-case variants also resolvetest_alias_table_contains_entry— the raw dict entry exists (guards against accidental removal)test_openai_canonical_unchanged— the canonical slugopenaipasses through unchangedWhy It Matters
Users who configure hermes-agent with
OPENAI_API_KEY+OPENAI_BASE_URL(theopenai-apiprovider path) see their GPT models missing from the WebUI model picker. The models are available to the agent but invisible in the UI.Verification
All 33 tests pass (4 new + 20 existing BYOK + 9 existing #1384).
Manual: configure
OPENAI_API_KEYandOPENAI_BASE_URLin.env, open the model picker, confirm GPT models appear under the OpenAI group.Risks / Follow-ups
openai-codex(auto-discovered from~/.codex/auth.json) is already handled by hermes-agent's own provider registry and doesn't need a WebUI alias, but could be added defensively in a future PR.Model Used
Claude Opus 4.6 via Claude Code CLI