fix(auth): add kimi-for-coding alias to _PROVIDER_ALIASES#6287
Closed
linxule wants to merge 1 commit into
Closed
Conversation
`HERMES_OVERLAYS` (providers.py) keys Kimi Code as `kimi-for-coding`,
but `PROVIDER_REGISTRY` (auth.py) keys it as `kimi-coding`.
`_PROVIDER_ALIASES` bridges most mismatches but lacks an entry for
`kimi-for-coding`, so any code path that feeds the overlay slug
through `resolve_provider()` fails with:
Error: Could not resolve credentials for provider 'Kimi For Coding':
Unknown provider 'kimi-for-coding'.
The Telegram interactive `/model` picker hits this path: it resolves
the list of available providers via `list_authenticated_providers()`
(which returns overlay slugs), then passes the chosen slug directly to
`resolve_provider()` for credential lookup. Switching to Kimi from the
picker therefore fails even though the provider is enumerated and
`KIMI_API_KEY` is set.
Adds a one-entry alias to mirror the existing `kimi` and `moonshot`
mappings, plus a unit test alongside the other `_PROVIDER_ALIASES`
tests in `TestResolveProvider`.
Related to the alias gap reported in issue NousResearch#5910 (the `model_switch.py`
half of that issue was fixed in NousResearch#5983 via PR NousResearch#5911).
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>
Contributor
|
Merged via PR #7373. Your kimi-for-coding alias fix was included alongside the broader overlay slug resolution. Your authorship is preserved as co-author. Thanks linxule! |
Contributor
Author
|
Closing — this was picked up and landed as part of #7373 by @teknium1, which also fixes the broader overlay provider slug mismatch in the Confirmed working on my Pi gateway (updated to |
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>
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.
Summary
"kimi-for-coding": "kimi-coding"to_PROVIDER_ALIASESinhermes_cli/auth.py, alongside the existing"kimi"and"moonshot"entries/modelpickerTestResolveProviderDetails
Dual-registry mismatch
Kimi Code is keyed differently in the two provider registries:
HERMES_OVERLAYShermes_cli/providers.pykimi-for-codingPROVIDER_REGISTRYhermes_cli/auth.pykimi-coding_PROVIDER_ALIASESinresolve_provider()bridges several such gaps (glm → zai,google → gemini,claude → anthropic, etc.) but has no entry forkimi-for-coding → kimi-coding. Onlykimi → kimi-codingandmoonshot → kimi-codingare present.User-visible symptom
The Telegram interactive
/modelpicker enumerates providers vialist_authenticated_providers(), which returns the overlay slug (kimi-for-coding) for Kimi. When the user selects Kimi from the picker, the handler passes that slug straight intoresolve_provider(), which fails:```
Error: Could not resolve credentials for provider 'Kimi For Coding':
Unknown provider 'kimi-for-coding'. Check 'hermes model' for available
providers, or run 'hermes doctor' to diagnose config issues.
```
The error is confusing because `hermes model` does list Kimi, and `KIMI_API_KEY` is correctly set — the mismatch happens purely because the overlay slug never gets normalized to the canonical provider ID.
Diff
```diff
```
Test plan
Related
This is the follow-up to the alias gap I reported as a comment on #5910 after PR #5911 was filed. The `model_switch.py` half of #5910 shipped upstream as part of #5983 / Hermes v0.8.0 (thanks @teknium1 for the salvage), but the `auth.py` alias was left behind because it was only described in a comment, not a separate PR.
This PR does not close #5910 — another contributor (@vmlinuzx) recently added more Codex-related `/model` bugs to that issue which are out of scope here.
Environment
🤖 Generated with Claude Code