Skip to content

fix(model-picker): exclude providers with empty credential pool entries#15950

Closed
kshitijk4poor wants to merge 1 commit into
NousResearch:mainfrom
kshitijk4poor:fix/ollama-cloud-ghost-cred-in-picker
Closed

fix(model-picker): exclude providers with empty credential pool entries#15950
kshitijk4poor wants to merge 1 commit into
NousResearch:mainfrom
kshitijk4poor:fix/ollama-cloud-ghost-cred-in-picker

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Summary

  • list_authenticated_providers checked slug in credential_pool (key existence) to decide a provider is authenticated, but an empty pool entry is not a credential
  • ollama-cloud had a ghost entry in credential_pool with no actual key, so it appeared as authenticated in the model picker even with no OLLAMA_API_KEY set
  • User selected nemotron-3-super from the Ollama Cloud section → routed to https://ollama.com/v1 → HTTP 400 on every turn
  • Fix: drop pool_store key-existence check from sections 2 and 2b; the load_pool().has_credentials() call that immediately follows already handles legitimate pooled credentials

Test plan

  • tests/hermes_cli/test_ollama_cloud_provider.py — 25 tests pass
  • tests/hermes_cli/test_model_switch_custom_providers.py — 13 tests pass
  • tests/hermes_cli/test_overlay_slug_resolution.py — 5 tests pass
  • Verified locally: ollama-cloud no longer appears in list_authenticated_providers when OLLAMA_API_KEY is unset (even with a ghost pool entry)
  • Verified: providers with real credentials (copilot, openai-codex) still show correctly via pool.has_credentials()

The auth check in list_authenticated_providers used mere key presence in
credential_pool to conclude a provider is authenticated.  An empty entry
(pool_store key with no actual credentials) caused providers like
ollama-cloud to appear as authenticated in the model picker even when no
OLLAMA_API_KEY was set.

The user's picker then offered nemotron-3-super under Ollama Cloud;
selecting it routed every subsequent turn to https://ollama.com/v1, which
rejected the requests with HTTP 400.

Fix: drop the pool_store key-existence check from both section 2
(HERMES_OVERLAYS) and section 2b (CANONICAL_PROVIDERS).  The following
load_pool().has_credentials() call already handles the legitimate pooled-
credential case; checking for an empty key just ahead of it was redundant
and actively harmful.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 26, 2026
@teknium1

teknium1 commented May 4, 2026

Copy link
Copy Markdown
Contributor

Salvaged via #19669 onto current main - your commit authorship was preserved. Thanks!

@teknium1 teknium1 closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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