Skip to content

fix(auth): treat empty credential pool entries as unauthenticated in /model picker - #28241

Closed
rudi193-cmd wants to merge 1 commit into
NousResearch:mainfrom
rudi193-cmd:fix/empty-credential-pool-auth-check
Closed

fix(auth): treat empty credential pool entries as unauthenticated in /model picker#28241
rudi193-cmd wants to merge 1 commit into
NousResearch:mainfrom
rudi193-cmd:fix/empty-credential-pool-auth-check

Conversation

@rudi193-cmd

Copy link
Copy Markdown
Contributor

Summary

Fixes #28140.

The /model picker checked whether a provider key existed in credential_pool, not whether it had any entries. An empty list ("minimax-cn": []) left after removing an API key from .env still caused the provider to appear as selectable.

hermes_cli/model_switch.py line 1235 — one-line change:

# before — key presence is enough to pass
if store and hermes_id in store.get("credential_pool", {}):

# after — requires at least one non-empty entry
if store and store.get("credential_pool", {}).get(hermes_id):

Test plan

  • Configure a provider via hermes model, then delete its API key from .env
  • Confirm ~/.hermes/auth.json still has "provider-id": [] in credential_pool
  • Run /model — provider should no longer appear as available

🤖 Generated with Claude Code

Loading
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.

Empty credential pool entries cause providers to show as authenticated in /model picker

3 participants