Skip to content

fix(auth): sync missing provider aliases in resolve_provider() - #50129

Closed
ryptotalent wants to merge 1 commit into
NousResearch:mainfrom
ryptotalent:fix/auth-provider-aliases
Closed

fix(auth): sync missing provider aliases in resolve_provider()#50129
ryptotalent wants to merge 1 commit into
NousResearch:mainfrom
ryptotalent:fix/auth-provider-aliases

Conversation

@ryptotalent

Copy link
Copy Markdown
Contributor

Summary

resolve_provider() in hermes_cli/auth.py (line 1493) maintains its own local _PROVIDER_ALIASES dict that was missing 11 aliases present in hermes_cli/models.py. When users set model.provider: dashscope (or any of the other missing aliases) in config.yaml, resolve_provider() failed to normalize it and raised "Unknown provider" instead of resolving to the canonical name.

Root Cause

Three copies of _PROVIDER_ALIASES exist in the codebase:

  1. hermes_cli/models.py — 76 entries (canonical source)
  2. agent/auxiliary_client.py — 30 entries (fixed in fix(auxiliary): sync missing provider aliases from models.py #50116)
  3. hermes_cli/auth.py — 76 entries (this PR)

The auth.py copy drifted from models.py — 11 aliases were missing:

Missing Alias Canonical Impact
dashscope alibaba model.provider: dashscope → "Unknown provider"
aliyun alibaba same
qwen alibaba same
alibaba-cloud alibaba same
deep-seek deepseek model.provider: deep-seek → "Unknown provider"
nim nvidia model.provider: nim → "Unknown provider"
nvidia-nim nvidia same
build-nvidia nvidia same
nemotron nvidia same
novita-ai novita model.provider: novita-ai → "Unknown provider"
novitaai novita same

Fix

Add the 11 missing aliases to auth.py's local _PROVIDER_ALIASES dict. Additive-only — existing aliases are unchanged.

Test Plan

  • Added 10 regression tests in TestResolveProvider covering all newly-added aliases
  • All 48 tests in TestResolveProvider pass (10 new + 38 existing)
  • Verified resolve_provider("dashscope") now returns "alibaba" (was raising AuthError)

Related: #49464, #50116 (same bug class in auxiliary_client.py)

resolve_provider() in hermes_cli/auth.py maintains its own local
_PROVIDER_ALIASES dict that was missing 11 aliases present in
hermes_cli/models.py (dashscope, aliyun, qwen, alibaba-cloud, deep-seek,
nim, nvidia-nim, build-nvidia, nemotron, novita-ai, novitaai).

When users set model.provider: dashscope (or any of the other missing
aliases) in config.yaml, resolve_provider() failed to normalize it to
the canonical name and raised 'Unknown provider' instead of resolving
to alibaba/deepseek/nvidia/novita.

Same bug class as NousResearch#49464 (auxiliary_client.py) but in the main provider
resolution path.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard area/auth Authentication, OAuth, credential pools P2 Medium — degraded but workaround exists labels Jun 21, 2026
@Slobaka

Slobaka commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Closing — the missing aliases have been added to auth.py on main independently (including dashscope, deep-seek, nim, hf, aws, and others), plus a dynamic extension via providers.list_providers(). This PR is now redundant. Thanks!

@Slobaka

Slobaka commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Closing — the missing aliases have already been added to auth.py on main independently (including dashscope, deep-seek, nim, hf, aws, and all others), plus a dynamic extension via providers.list_providers(). This PR is now redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants