fix(doctor): check gh auth status when GITHUB_TOKEN is absent - #16121
Closed
jjjojoj wants to merge 7 commits into
Closed
fix(doctor): check gh auth status when GITHUB_TOKEN is absent#16121jjjojoj wants to merge 7 commits into
jjjojoj wants to merge 7 commits into
Conversation
…esearch#12175) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ousResearch#12176) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2294) build_skills_system_prompt() loaded disabled set AFTER the cache check, so config changes to skills.disabled silently had no effect until restart. Move get_disabled_skill_names() before cache check and add sorted disabled tuple to cache key so any change invalidates the cache.
NousResearch#12064) Background task media delivery unpacked the (path, is_voice) tuple but discarded the is_voice flag, sending all audio via send_document. Now routes voice files through send_voice() when the adapter supports it.
When API keys are stored in ~/.hermes/.env or auth.json but never loaded into os.environ (e.g. post-session-start addition, or ACP entry point missing project_env), _resolve_api_key_provider_secret() returned empty string and broke fallback_providers chains. Fix: add credential_pool (auth.json) as a fallback source after env var checks, using read_credential_pool() to find valid access_token entries. Mirrors the pool.select() path in runtime_provider.py while preserving env var priority. Secondary fix: acp_adapter/entry.py now passes project_env to load_hermes_dotenv(), consistent with all other entry points (main.py, run_agent.py, cli.py). Tests added: - test_credential_pool_fallback.py: 5 cases covering env→pool priority, provider-specific fallback, empty token filtering - test_entry_env_loading.py: verifies project_env is passed to dotenv loader Fixes NousResearch#15914 Fixes NousResearch#15932 (duplicate)
When GITHUB_TOKEN and GH_TOKEN are both unset, doctor showed a warning even when the user had authenticated via 'gh auth login' (token stored in ~/.config/gh/hosts.yml). Now runs 'gh auth status --json authenticated' as a fallback — if gh is authenticated, displays 'GitHub authenticated via gh CLI (full API access)' instead of misleading rate-limit warning. Added TestGitHubTokenCheck with 3 cases covering: - no token + no gh → shows warning - token env present → shows ok - no token + gh authenticated → shows ok via gh fallback Fixes NousResearch#16115
Contributor
Author
|
Retrying with clean branch — had 7 upstream commits mixed in. New PR at #16127 |
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.
What
Two small doctor fixes bundled into one PR:
1. gh auth fallback when GITHUB_TOKEN absent (
#16115)hermes doctorno longer falsely warns "No GITHUB_TOKEN (60 req/hr)" when the user has authenticated viagh auth loginbut has noGITHUB_TOKENenv var. Added_gh_authenticated()helper that runsgh auth status --json authenticated. Falls back to this when env vars are absent.2. Skip MiniMax (China) /v1/models health check (
#16120)MiniMax (China) API does not support the /v1/models endpoint — returns HTTP 404 even though /v1/chat/completions works fine. Set
supports_health_check=Falseso doctor shows "(key configured)" instead of false-positive 404 warning.Test
TestGitHubTokenCheck: 3 cases covering no-token/no-gh to warn, token-env to ok, no-token/gh-authenticated to ok via gh fallbackFixes #16115
Fixes #16120