Summary
hermes debug currently reports API-key status by checking env vars and ~/.hermes/.env entries only. For providers that authenticate via OAuth and store their tokens in auth.json under credential_pool.<provider>[*].access_token — notably Nous Portal, OpenAI Codex, Copilot — the report lists those providers as "not set" even when the user is actively logged in and the CLI is working fine.
This produces misleading debug output:
API Keys Status
Set: gemini, elevenlabs
Not set: openrouter, openai, anthropic, anthropic_token, nous, ...
…even when hermes model shows a healthy Nous Portal login and every inference call is succeeding. A reader of the debug report then wastes time chasing an "auth problem" that isn't real.
Reproduction
- Fresh machine, no
NOUS_API_KEY in env or ~/.hermes/.env.
hermes model → log in to Nous Portal via the OAuth flow. Token lands in auth.json under credential_pool.nous[0].access_token.
- Run a few normal CLI turns — they work.
hermes debug (or /debug from inside the CLI).
- Report lists
nous in the "not set" API keys.
Why this matters
The debug report is the canonical artifact users share when something is broken. Right now it points "auth misconfigured" fingers at whichever provider is being used via OAuth — the exact providers we most want to expose smoothly (Nous Portal is our own). This has already caused at least one instance of the triage workflow spending cycles on "why isn't NOUS_API_KEY set?" before realizing it doesn't need to be.
Proposed fix
In the debug-dump API-keys-status section, before marking a provider as "not set," also check:
credential_pool.<provider>[*].access_token in auth.json (live OAuth tokens)
- Any provider-specific non-env credential paths (Codex uses
~/.hermes/credentials/openai-codex.json or similar; Copilot has its own)
Then emit one of three states per provider:
- Set (env) — found in env var /
.env
- Set (oauth) — found in
credential_pool
- Not set — no credential anywhere
This matches the agent's actual runtime behavior (the provider resolver already checks credential_pool first for these providers) and makes the debug report match reality.
Bonus: surface the provider's credential-resolution status from hermes_cli/providers.py / hermes_cli/auth.py rather than re-walking the filesystem — those modules already know which providers are OAuth-backed and which are key-backed, so the debug dumper shouldn't have to re-implement that logic.
Files likely involved
hermes_cli/debug.py (or wherever the debug dump API-keys section is assembled — owner can confirm)
- Cross-reference:
hermes_cli/auth.py, hermes_cli/providers.py, agent/credential_pool.py
Labels
Suggest: enhancement, debug-tooling, user-experience
Filed off the back of a real debug-report diagnosis where provider=nous + model=deepseek-v4-pro showed both keys as "not set" in the report, even though Nous Portal was authenticated and Portal was routing DeepSeek requests normally.
Summary
hermes debugcurrently reports API-key status by checking env vars and~/.hermes/.enventries only. For providers that authenticate via OAuth and store their tokens inauth.jsonundercredential_pool.<provider>[*].access_token— notably Nous Portal, OpenAI Codex, Copilot — the report lists those providers as "not set" even when the user is actively logged in and the CLI is working fine.This produces misleading debug output:
…even when
hermes modelshows a healthy Nous Portal login and every inference call is succeeding. A reader of the debug report then wastes time chasing an "auth problem" that isn't real.Reproduction
NOUS_API_KEYin env or~/.hermes/.env.hermes model→ log in to Nous Portal via the OAuth flow. Token lands inauth.jsonundercredential_pool.nous[0].access_token.hermes debug(or/debugfrom inside the CLI).nousin the "not set" API keys.Why this matters
The debug report is the canonical artifact users share when something is broken. Right now it points "auth misconfigured" fingers at whichever provider is being used via OAuth — the exact providers we most want to expose smoothly (Nous Portal is our own). This has already caused at least one instance of the triage workflow spending cycles on "why isn't
NOUS_API_KEYset?" before realizing it doesn't need to be.Proposed fix
In the debug-dump API-keys-status section, before marking a provider as "not set," also check:
credential_pool.<provider>[*].access_tokeninauth.json(live OAuth tokens)~/.hermes/credentials/openai-codex.jsonor similar; Copilot has its own)Then emit one of three states per provider:
.envcredential_poolThis matches the agent's actual runtime behavior (the provider resolver already checks credential_pool first for these providers) and makes the debug report match reality.
Bonus: surface the provider's credential-resolution status from
hermes_cli/providers.py/hermes_cli/auth.pyrather than re-walking the filesystem — those modules already know which providers are OAuth-backed and which are key-backed, so the debug dumper shouldn't have to re-implement that logic.Files likely involved
hermes_cli/debug.py(or wherever the debug dump API-keys section is assembled — owner can confirm)hermes_cli/auth.py,hermes_cli/providers.py,agent/credential_pool.pyLabels
Suggest:
enhancement,debug-tooling,user-experienceFiled off the back of a real debug-report diagnosis where provider=
nous+ model=deepseek-v4-proshowed both keys as "not set" in the report, even though Nous Portal was authenticated and Portal was routing DeepSeek requests normally.