fix(cli): OAuth providers missing from /model picker — wrong import and key lookup#5945
Closed
iacker wants to merge 1 commit into
Closed
fix(cli): OAuth providers missing from /model picker — wrong import and key lookup#5945iacker wants to merge 1 commit into
iacker wants to merge 1 commit into
Conversation
…nd key lookup
Two issues in list_authenticated_providers() caused OAuth-authenticated
providers (Nous Portal, OpenAI Codex, Copilot) to never appear in the
/model gateway picker:
1. Wrong function name: _read_auth_store does not exist, should be
_load_auth_store. The ImportError was silently caught.
2. Wrong key lookup: _load_auth_store() returns a dict with top-level
keys ('version', 'providers', 'credential_pool', ...), not provider
IDs at the top level. Fixed to check store['providers'] and
store['credential_pool'].
Fixes NousResearch#5910
23 tasks
Contributor
|
Thanks for the detailed root-cause analysis in #5945 — this was a real bug and the diagnosis was correct. This is an automated hermes-sweeper review. The two bugs described (wrong function name
Closing as implemented on main. The investigation that went into this PR was valuable and likely informed those later fixes. |
Collaborator
Collaborator
|
Likely duplicate of #8224 (merged) — same root cause: OAuth providers not appearing in /model picker. |
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
Fixes #5910 — OAuth-authenticated providers (Nous Portal, OpenAI Codex, Copilot) never appear in the
/modelgateway picker becauselist_authenticated_providers()uses a non-existent function and checks the wrong dict keys.Root Cause
Two bugs in
hermes_cli/model_switch.py, section 2 ("Hermes-only providers"):Wrong function name:
_read_auth_storedoes not exist — the correct function is_load_auth_store. TheImportErrorwas silently caught byexcept Exception: pass, so the entire OAuth credential check was skipped.Wrong key lookup:
_load_auth_store()returns a dict with top-level keys (version,providers,credential_pool,active_provider,updated_at), not provider IDs. Sopid in storewas alwaysFalse.Fix
Impact
/modelin gateway now correctly shows OAuth providers (nous, openai-codex, copilot) alongside env-var-based providershermes auth add nouscan switch to Nous models via/modelVerification
_read_auth_store— this function does not exist; only_load_auth_storeis defined inauth.py(line 551)_load_auth_store()return structure matches the fix (providers understore["providers"])