# NousResearch/hermes-agent · GitHub Copilot provider auth and token handling fixes

## Open now

- 1 issue, 2 PRs open on GitHub.
- #30624: Copilot model picker falls back to stale list when /copilot_internal token exchange fails but /models is accessible
- PR #25250: fix(copilot): stop using gh auth as token fallback
- PR #45214: fix(models): use get_copilot_api_token fallback for Business/Enterprise accounts

These issues and pull requests concern the integration of a GitHub Copilot provider, with a focus on fixing authentication flows, token exchange failures, and fallback behavior—particularly for Copilot Business and Enterprise accounts.

## TL;DR

- 5 member(s): 1 open issue(s), 1 closed issue(s), 2 open PR(s), 0 merged PR(s), 1 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.34`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Open related issues

- #30624: Copilot model picker falls back to stale list when /copilot_internal token exchange fails but /models is accessible

## Closed / duplicate issues

- #45146: provider: copilot fails for Copilot Business/Enterprise users (404 on internal token exchange)

## Prior & competing PRs

- **#25250: fix(copilot): stop using gh auth as token fallback**. open
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
  - files: `agent/auxiliary_client.py`, `agent/credential_pool.py`, `agent/credential_sources.py`, `hermes_cli/copilot_auth.py`, `hermes_cli/model_setup_flows.py`, `hermes_cli/models.py`, `run_agent.py`, `tests/agent/test_credential_pool.py`, `tests/hermes_cli/test_api_key_providers.py`, `tests/hermes_cli/test_copilot_auth.py`, `tests/hermes_cli/test_copilot_catalog_oauth_fallback.py`, `tests/run_agent/test_run_agent_codex_responses.py`, `tests/test_windows_subprocess_no_window_flags.py`, `website/docs/integrations/providers.md`, `website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/providers.md`
- **#30693: fix(cli): fall back to raw Copilot catalog token**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `66a05e44d`
- **#45214: fix(models): use get_copilot_api_token fallback for Business/Enterprise accounts**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `66a05e44d`
  - files: `hermes_cli/models.py`, `tests/hermes_cli/test_copilot_catalog_oauth_fallback.py`, `tests/hermes_cli/test_copilot_token_exchange.py`

## Fix status

- No merged fix on record.
- Subsystem: `agent`
