Skip to content

fix: consolidate provider lists into single CANONICAL_PROVIDERS source of truth#9237

Merged
teknium1 merged 1 commit into
mainfrom
fix/canonical-provider-list
Apr 13, 2026
Merged

fix: consolidate provider lists into single CANONICAL_PROVIDERS source of truth#9237
teknium1 merged 1 commit into
mainfrom
fix/canonical-provider-list

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Problem

Three separate hardcoded provider lists diverged over time:

  • hermes model TUI (main.py) — top_providers + extended_providers
  • /provider command (models.py) — _PROVIDER_ORDER
  • /model gateway (model_switch.py) — dynamic from PROVIDER_TO_MODELS_DEV + HERMES_OVERLAYS

When a provider existed in one list but not the others, it would be invisible in some commands. Reported by arsaboo: ollama not showing in /model despite working with hermes model.

Solution

Single source of truth: CANONICAL_PROVIDERS in hermes_cli/models.py.

  • ProviderEntry named tuple: (slug, label, tier, tui_desc)
  • 22 providers — 7 top-tier, 15 extended
  • All three code paths now derive from this list
  • Added step 2b in list_authenticated_providers() to cross-check canonical list — catches providers with credentials that weren't discovered via models.dev or overlay mappings
  • Added deepseek and xai as first-class providers (were missing from TUI)
  • Added grok/x-ai/x.ai aliases for xai

Testing

244 targeted tests pass (model switching, providers, overlays, gateway model commands, picker tests).

…e of truth

Three separate hardcoded provider lists (/model, /provider, hermes model)
diverged over time, causing providers to be missing from some commands.

- Create CANONICAL_PROVIDERS in hermes_cli/models.py as the single source
  of truth for all provider identity, labels, and TUI ordering
- Derive _PROVIDER_LABELS and list_available_providers() from canonical list
- Add step 2b in list_authenticated_providers() to cross-check canonical
  list — catches providers with credentials that weren't found via
  PROVIDER_TO_MODELS_DEV or HERMES_OVERLAYS mappings
- Derive hermes model TUI provider menus from canonical list
- Add deepseek and xai as first-class providers (were missing from TUI)
- Add grok/x-ai/x.ai aliases for xai provider

Fixes: /model command not showing all providers that hermes model shows
@teknium1 teknium1 merged commit 204e919 into main Apr 13, 2026
5 of 6 checks passed
@teknium1 teknium1 deleted the fix/canonical-provider-list branch April 13, 2026 21:59
ccross2 added a commit to ccross2/hermes-agent that referenced this pull request Apr 14, 2026
Brings ccross2/hermes-agent up to NousResearch/hermes-agent@ac80bd61
(v0.9.0 release "the everywhere release").

Merge highlights from upstream:
- Pluggable Context Engine slot (NousResearch#7464)
- Local web dashboard, Termux/Android, iMessage/WeChat platforms
- Fast Mode (/fast) for OpenAI/Anthropic priority queues
- Background process monitoring (watch_patterns, NousResearch#7635)
- Comprehensive security hardening (Twilio signature, SSRF, path
  traversal, git injection, shell injection in sandbox writes)
- Dead code cleanup (1,784 lines across 77 files, NousResearch#9180)
- CANONICAL_PROVIDERS consolidation (NousResearch#9237)
- gateway /stop no longer resets session (NousResearch#9224)

Conflict resolution summary (7 hunks across 3 files):

1-4. cli.py _build_compact_banner — took upstream.
   Upstream added skin-aware colors + version label + tiny_line for
   narrow terminals. ccross2 had added word-wrapping for narrow
   terminals (commit 5b32504). The skin engine integration is
   foundational (affects several other surfaces); the word-wrapping
   improvement can be re-added as a follow-up on top of skin-aware.

5. cli.py _reset_stream_state — kept BOTH.
   ccross2 added _stream_in_code_fence; upstream added
   _deferred_content. Different features in the same reset hook,
   both needed.

6. tools/transcription_tools.py get_stt_model_from_config — took ccross2.
   ccross2 added provider-aware model resolution (local/groq/openai
   with per-provider model overrides). Upstream restructured but
   didn't provide an equivalent; the function coexists with upstream's
   _load_stt_config() which returns the raw dict.

7. tests/tools/test_transcription_tools.py — took ccross2.
   Tests for the provider-aware function we kept in (6).

Post-merge state: 5 local ccross2 commits preserved on top of
upstream 0.9. Backup of pre-merge state at
ccross2/cc-fusion-09-rebase-backup (Claude Code's rebase attempt
with 4 of the 5 patches, before this proper merge).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
…e of truth (NousResearch#9237)

Three separate hardcoded provider lists (/model, /provider, hermes model)
diverged over time, causing providers to be missing from some commands.

- Create CANONICAL_PROVIDERS in hermes_cli/models.py as the single source
  of truth for all provider identity, labels, and TUI ordering
- Derive _PROVIDER_LABELS and list_available_providers() from canonical list
- Add step 2b in list_authenticated_providers() to cross-check canonical
  list — catches providers with credentials that weren't found via
  PROVIDER_TO_MODELS_DEV or HERMES_OVERLAYS mappings
- Derive hermes model TUI provider menus from canonical list
- Add deepseek and xai as first-class providers (were missing from TUI)
- Add grok/x-ai/x.ai aliases for xai provider

Fixes: /model command not showing all providers that hermes model shows
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
…e of truth (NousResearch#9237)

Three separate hardcoded provider lists (/model, /provider, hermes model)
diverged over time, causing providers to be missing from some commands.

- Create CANONICAL_PROVIDERS in hermes_cli/models.py as the single source
  of truth for all provider identity, labels, and TUI ordering
- Derive _PROVIDER_LABELS and list_available_providers() from canonical list
- Add step 2b in list_authenticated_providers() to cross-check canonical
  list — catches providers with credentials that weren't found via
  PROVIDER_TO_MODELS_DEV or HERMES_OVERLAYS mappings
- Derive hermes model TUI provider menus from canonical list
- Add deepseek and xai as first-class providers (were missing from TUI)
- Add grok/x-ai/x.ai aliases for xai provider

Fixes: /model command not showing all providers that hermes model shows
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…e of truth (NousResearch#9237)

Three separate hardcoded provider lists (/model, /provider, hermes model)
diverged over time, causing providers to be missing from some commands.

- Create CANONICAL_PROVIDERS in hermes_cli/models.py as the single source
  of truth for all provider identity, labels, and TUI ordering
- Derive _PROVIDER_LABELS and list_available_providers() from canonical list
- Add step 2b in list_authenticated_providers() to cross-check canonical
  list — catches providers with credentials that weren't found via
  PROVIDER_TO_MODELS_DEV or HERMES_OVERLAYS mappings
- Derive hermes model TUI provider menus from canonical list
- Add deepseek and xai as first-class providers (were missing from TUI)
- Add grok/x-ai/x.ai aliases for xai provider

Fixes: /model command not showing all providers that hermes model shows
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…e of truth (NousResearch#9237)

Three separate hardcoded provider lists (/model, /provider, hermes model)
diverged over time, causing providers to be missing from some commands.

- Create CANONICAL_PROVIDERS in hermes_cli/models.py as the single source
  of truth for all provider identity, labels, and TUI ordering
- Derive _PROVIDER_LABELS and list_available_providers() from canonical list
- Add step 2b in list_authenticated_providers() to cross-check canonical
  list — catches providers with credentials that weren't found via
  PROVIDER_TO_MODELS_DEV or HERMES_OVERLAYS mappings
- Derive hermes model TUI provider menus from canonical list
- Add deepseek and xai as first-class providers (were missing from TUI)
- Add grok/x-ai/x.ai aliases for xai provider

Fixes: /model command not showing all providers that hermes model shows
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…e of truth (NousResearch#9237)

Three separate hardcoded provider lists (/model, /provider, hermes model)
diverged over time, causing providers to be missing from some commands.

- Create CANONICAL_PROVIDERS in hermes_cli/models.py as the single source
  of truth for all provider identity, labels, and TUI ordering
- Derive _PROVIDER_LABELS and list_available_providers() from canonical list
- Add step 2b in list_authenticated_providers() to cross-check canonical
  list — catches providers with credentials that weren't found via
  PROVIDER_TO_MODELS_DEV or HERMES_OVERLAYS mappings
- Derive hermes model TUI provider menus from canonical list
- Add deepseek and xai as first-class providers (were missing from TUI)
- Add grok/x-ai/x.ai aliases for xai provider

Fixes: /model command not showing all providers that hermes model shows
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.

1 participant