fix(auth): sync missing provider aliases in resolve_provider() - #50129
Closed
ryptotalent wants to merge 1 commit into
Closed
fix(auth): sync missing provider aliases in resolve_provider()#50129ryptotalent wants to merge 1 commit into
ryptotalent wants to merge 1 commit into
Conversation
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.
Contributor
|
Closing — the missing aliases have been added to |
Contributor
|
Closing — the missing aliases have already been added to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolve_provider()inhermes_cli/auth.py(line 1493) maintains its own local_PROVIDER_ALIASESdict that was missing 11 aliases present inhermes_cli/models.py. When users setmodel.provider: dashscope(or any of the other missing aliases) inconfig.yaml,resolve_provider()failed to normalize it and raised "Unknown provider" instead of resolving to the canonical name.Root Cause
Three copies of
_PROVIDER_ALIASESexist in the codebase:hermes_cli/models.py— 76 entries (canonical source)agent/auxiliary_client.py— 30 entries (fixed in fix(auxiliary): sync missing provider aliases from models.py #50116)hermes_cli/auth.py— 76 entries (this PR)The
auth.pycopy drifted frommodels.py— 11 aliases were missing:dashscopealibabamodel.provider: dashscope→ "Unknown provider"aliyunalibabaqwenalibabaalibaba-cloudalibabadeep-seekdeepseekmodel.provider: deep-seek→ "Unknown provider"nimnvidiamodel.provider: nim→ "Unknown provider"nvidia-nimnvidiabuild-nvidianvidianemotronnvidianovita-ainovitamodel.provider: novita-ai→ "Unknown provider"novitaainovitaFix
Add the 11 missing aliases to
auth.py's local_PROVIDER_ALIASESdict. Additive-only — existing aliases are unchanged.Test Plan
TestResolveProvidercovering all newly-added aliasesTestResolveProviderpass (10 new + 38 existing)resolve_provider("dashscope")now returns"alibaba"(was raisingAuthError)Related: #49464, #50116 (same bug class in
auxiliary_client.py)