Skip to content

fix: detect copilot and qwen-oauth providers in /model picker - #9810

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-79989b1d
Apr 14, 2026
Merged

fix: detect copilot and qwen-oauth providers in /model picker#9810
teknium1 merged 2 commits into
mainfrom
hermes/hermes-79989b1d

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Fixes two gaps in /model provider detection where providers with dynamic credential resolution weren't being detected by list_authenticated_providers().

Copilot (cherry-picked from PR #9767 by @Marvae): Users authenticating solely via gh auth token (no env vars set) weren't seeing copilot in the provider picker. Seeds copilot credentials from resolve_copilot_token() in the credential pool's _seed_from_singletons().

Qwen OAuth (new): Same gap pattern. Users authenticating via qwen auth qwen-oauth store tokens in ~/.qwen/oauth_creds.json. The runtime resolver reads this file, but the credential pool had no handler for it. Seeds qwen-oauth credentials from resolve_qwen_runtime_credentials(refresh_if_expiring=False) to avoid network calls during discovery.

Both follow the existing pattern established by anthropic, nous, and openai-codex seeding.

Changes

  • agent/credential_pool.py — Add copilot and qwen-oauth branches in _seed_from_singletons()
  • tests/agent/test_credential_pool.py — 4 new tests (2 per provider: token found → seeded, no token → empty)

Test plan

pytest tests/agent/test_credential_pool.py -v -n0

All 4 new tests pass. 1 pre-existing failure (test_explicit_reset_timestamp_overrides_default_429_ttl) is unrelated and fails on current main.

Closes #9768. Supersedes #9767 (cherry-picked with contributor authorship preserved).

Marvae and others added 2 commits April 14, 2026 11:03
Seed copilot credentials from resolve_copilot_token() in the credential
pool's _seed_from_singletons(), alongside the existing anthropic and
openai-codex seeding logic. This makes copilot appear in the /model
provider picker when the user authenticates solely through gh auth token.

Cherry-picked from PR #9767 by Marvae.
Seed qwen-oauth credentials from resolve_qwen_runtime_credentials() in
_seed_from_singletons(). Users who authenticate via 'qwen auth qwen-oauth'
store tokens in ~/.qwen/oauth_creds.json which the runtime resolver reads
but the credential pool couldn't detect — same gap pattern as copilot.

Uses refresh_if_expiring=False to avoid network calls during discovery.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copilot provider missing from /model picker when using gh auth token

2 participants