Skip to content

fix: resolve overlay provider slug mismatch in /model picker#7373

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-c7787b3d
Apr 10, 2026
Merged

fix: resolve overlay provider slug mismatch in /model picker#7373
teknium1 merged 1 commit into
mainfrom
hermes/hermes-c7787b3d

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Fixes the interactive /model picker (Telegram/Discord) showing 0 models for overlay providers like Copilot, Kimi, Kilocode, and others where the models.dev key differs from the Hermes provider ID.

Fixes #5223. Salvaged from #6492 (HearthCore) and #6287 (linxule).

Root Cause

HERMES_OVERLAYS keys use models.dev IDs (e.g. "github-copilot") but _PROVIDER_MODELS curated lists and config.yaml use Hermes provider IDs ("copilot"). Section 2 of list_authenticated_providers() was using the overlay key directly for:

Operation Before After
Curated model lookup curated.get("github-copilot")[] curated.get("copilot") → 14 models
is_current check "github-copilot" == "copilot" → False "copilot" == "copilot" → True
Result slug "github-copilot" "copilot"

Affected providers (overlay key ≠ Hermes slug): github-copilotcopilot, kimi-for-codingkimi-coding, kilokilocode, opencodeopencode-zen, vercelai-gateway

Fix

  • model_switch.py: Build reverse mapping from PROVIDER_TO_MODELS_DEV to translate overlay keys to Hermes slugs. Also guards oauth auth store check with if not has_creds and checks both overlay key and Hermes slug in auth store/credential pool lookups.
  • auth.py: Add "kimi-for-coding": "kimi-coding" alias so the picker's returned slug resolves correctly in resolve_provider().

Tests

  • 5 new tests covering copilot slug resolution, no-duplicate check, kimi alias, kimi overlay resolution, kilo overlay resolution
  • All 130 existing model switch tests pass
  • All 10 gateway model tests pass
  • E2E verified: list_authenticated_providers(current_provider="copilot") returns {slug: "copilot", is_current: True, total_models: 14}

Files Changed

File Change
hermes_cli/model_switch.py Reverse-map overlay keys to Hermes slugs in Section 2
hermes_cli/auth.py Add kimi-for-coding alias
tests/hermes_cli/test_overlay_slug_resolution.py New test file (5 tests)

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 teknium1 merged commit 496e378 into main Apr 10, 2026
5 of 6 checks passed
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>
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.

Bug: /model gateway command omits Hermes-overlay providers (e.g. openai-codex)

1 participant