Skip to content

fix: copilot provider shows 0 models in Telegram/Discord model picker#6492

Closed
HearthCore wants to merge 1 commit into
NousResearch:mainfrom
HearthCore:fix/copilot-model-picker-slug-mismatch
Closed

fix: copilot provider shows 0 models in Telegram/Discord model picker#6492
HearthCore wants to merge 1 commit into
NousResearch:mainfrom
HearthCore:fix/copilot-model-picker-slug-mismatch

Conversation

@HearthCore

@HearthCore HearthCore commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the interactive model picker (Telegram / Discord) showing "GitHub Copilot (0)" instead of listing the 28 available Copilot models.

Related issues: #5910 (remaining slug mismatch after import fix), #5223 (overlay providers omitted from gateway /model), #6455 (companion to GHE Copilot support PR #6468)

Root Cause

list_authenticated_providers() in hermes_cli/model_switch.py has a slug mismatch between three layers:

Layer Key Expected
HERMES_OVERLAYS "github-copilot" (models.dev ID)
_PROVIDER_MODELS curated list "copilot" (Hermes provider ID) ← lookup target
config.yaml provider: "copilot" is_current comparison

In Section 2 of list_authenticated_providers(), the overlay iteration uses pid = "github-copilot" as-is for:

  1. Curated model lookup: curated.get("github-copilot")[] (key is "copilot") → 0 models
  2. Current provider check: "github-copilot" == "copilot"False

This pattern affects all overlay providers where the models.dev key differs from the Hermes slug — confirmed for Copilot, likely also kimi-for-coding vs kimi-coding and others.

Fix

Added a reverse mapping from models.dev IDs back to Hermes provider IDs (PROVIDER_TO_MODELS_DEV inverted), so:

  • "github-copilot" resolves to "copilot" for curated list lookups → 28 models
  • slug is set to "copilot" so is_current matches config → True
  • Credential pool checked under both keys → creds found ✓
  • seen_slugs tracks both the overlay key and Hermes slug to prevent duplicates

Before / After

Before After
Telegram picker GitHub Copilot (0) ✓ GitHub Copilot (28)
is_current False True

Testing

  • Verified with list_authenticated_providers(current_provider="copilot", max_models=50) — returns 28 models with correct slug and is_current=True
  • Manually tested Telegram model picker shows full model list

Platform

Tested on Linux (WSL2/Debian).

Files Changed

File Change
hermes_cli/model_switch.py Reverse-map overlay keys to Hermes provider IDs in Section 2 of list_authenticated_providers()

The Telegram/Discord model picker showed 'GitHub Copilot (0 models)'
because list_authenticated_providers() had a slug mismatch:

- HERMES_OVERLAYS key is 'github-copilot' (models.dev ID)
- Curated model list key is 'copilot' (Hermes provider ID)
- Config uses provider: copilot

This caused:
1. curated.get('github-copilot') -> empty (key is 'copilot')
2. is_current check 'github-copilot' == 'copilot' -> False

Fix: add reverse mapping from models.dev IDs to Hermes provider IDs
so the overlay iteration resolves slugs correctly. Also check
credential pool under both keys.
teknium1 added a commit that referenced this pull request Apr 10, 2026
HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes #5223. Based on work by HearthCore (#6492) and linxule (#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
teknium1 added a commit that referenced this pull request Apr 10, 2026
HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes #5223. Based on work by HearthCore (#6492) and linxule (#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #7373. Your slug-mismatch analysis and reverse-mapping approach were the basis for the fix — cherry-picked the core logic, cleaned up the redundant credential check block, and skipped the model list expansion. Your authorship is preserved as co-author. Thanks HearthCore!

@teknium1 teknium1 closed this Apr 10, 2026
Tommyeds pushed a commit to Tommyeds/hermes-agent that referenced this pull request Apr 12, 2026
…earch#7373)

HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes NousResearch#5223. Based on work by HearthCore (NousResearch#6492) and linxule (NousResearch#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 28, 2026
HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes NousResearch#5223. Based on work by HearthCore (NousResearch#6492) and linxule (NousResearch#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
…earch#7373)

HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes NousResearch#5223. Based on work by HearthCore (NousResearch#6492) and linxule (NousResearch#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…earch#7373)

HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes NousResearch#5223. Based on work by HearthCore (NousResearch#6492) and linxule (NousResearch#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…earch#7373)

HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes NousResearch#5223. Based on work by HearthCore (NousResearch#6492) and linxule (NousResearch#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…earch#7373)

HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes NousResearch#5223. Based on work by HearthCore (NousResearch#6492) and linxule (NousResearch#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…earch#7373)

HERMES_OVERLAYS keys use models.dev IDs (e.g. 'github-copilot') but
_PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs
('copilot'). list_authenticated_providers() Section 2 was using the
overlay key directly for model lookups and is_current checks, causing:
- 0 models shown for copilot, kimi, kilo, opencode, vercel
- is_current never matching the config provider

Fix: build reverse mapping from PROVIDER_TO_MODELS_DEV to translate
overlay keys to Hermes slugs before curated list lookup and result
construction. Also adds 'kimi-for-coding' alias in auth.py so the
picker's returned slug resolves correctly in resolve_provider().

Fixes NousResearch#5223. Based on work by HearthCore (NousResearch#6492) and linxule (NousResearch#6287).

Co-authored-by: HearthCore <HearthCore@users.noreply.github.com>
Co-authored-by: linxule <linxule@users.noreply.github.com>
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.

2 participants