Skip to content

[Bug]: v0.13.0 provider plugin systems do not fully integrate with runtime resolution and /model picker #21685

Closed

Description

@lost9999

Summary

The new plugins/model-providers/ plugin architecture (#20324) for custom endpoints has two gaps that prevent it from replacing custom_providers in v0.13.0.

Issue 1 - Empty model list in /model picker

After dropping a plugins/model-providers/<name>/ directory and calling register_provider with a ProviderProfile that sets fallback_models, the provider appears in /model with the correct name (source=canonical), but the model list is empty (total_models=0).

Root cause: list_authenticated_providers Section 2b uses curated.get(_cp.slug, []) which pulls from _PROVIDER_MODELS and OPENROUTER_MODELS. Provider plugins cannot populate these curated lists through the current register_provider() API. The fallback_models field on ProviderProfile is not consulted for populating the model picker.

Issue 2 - Runtime resolution fails

The gateway and auxiliary tasks report Unknown provider '<name>' when the plugin provider is used in config (e.g. provider: ds2api).

Root cause: resolve_runtime_provider in hermes_cli/runtime_provider.py relies on auth.py's PROVIDER_REGISTRY which is populated via ProviderConfig entries. The new plugin registration path (providers/__init__.py register_provider()) does not feed into PROVIDER_REGISTRY, so runtime resolution never sees plugin-defined providers.

Expected behavior

  1. The /model picker should show models from the plugin's fallback_models field (or the /models endpoint) when no _PROVIDER_MODELS entry exists.
  2. resolve_runtime_provider should resolve plugin providers using the ProviderProfile data (base_url, api_key, api_mode) registered via providers/__init__.py.

Reproduction

  1. Create ~/.hermes/plugins/model-providers/ds2api/__init__.py with a valid ProviderProfile calling register_provider.
  2. Set model.provider: ds2api in config.yaml.
  3. Restart gateway, open hermes CLI, and run /model.
  4. Observe empty model list for the provider.
  5. Send a message to trigger an auxiliary task (compression, title) → gateway logs show Unknown provider.

Environment

  • Hermes Agent v0.13.0 (2026.5.7)
  • OS: Linux (WSL2 on Windows 11)
  • Local OpenAI-compatible custom endpoint (DeepSeek-V4 via DS2API)

Activity

  1. added
    type/bugSomething isn't working
    comp/pluginsPlugin system and bundled plugins
    comp/cliCLI entry point, hermes_cli/, setup wizard
    P2Medium — degraded but workaround exists
    on May 8, 2026
  2. dephiros commented on May 14, 2026

    @dephiros

    I ran into this as well trying to add a custom provider.
    Environment: Hermes v0.13.0 (2026.5.7), macOS aarch64, user model-provider plugin at $HERMES_HOME/plugins/model-providers/custom-provider/.

    Symptom: --provider custom-provider via CLI works. Selecting the same provider via the TUI /model picker shows ✗ Unknown provider 'custom-provider'.

    I traced it down to switch_model() in hermes_cli/model_switch.py calling resolve_provider_full() from hermes_cli/providers.py.

    @qWaitCrypto, thank you for #21695, would it make sense to update hermes_cli/model_switch.py#resolve_provider_full() as well?

  3. qWaitCrypto commented on May 15, 2026

    @qWaitCrypto

    I ran into this as well trying to add a custom provider. Environment: Hermes v0.13.0 (2026.5.7), macOS aarch64, user model-provider plugin at $HERMES_HOME/plugins/model-providers/custom-provider/.

    Symptom: --provider custom-provider via CLI works. Selecting the same provider via the TUI /model picker shows ✗ Unknown provider 'custom-provider'.

    I traced it down to switch_model() in hermes_cli/model_switch.py calling resolve_provider_full() from hermes_cli/providers.py.

    @qWaitCrypto, thank you for #21695, would it make sense to update hermes_cli/model_switch.py#resolve_provider_full() as well?

    @dephiros
    Thanks for tracing the switch_model() path.
    I updated #21695 to cover this as well. The branch now also wires plugin-backed API-key ProviderProfiles into resolve_provider_full(), so selecting a plugin provider from /model no longer fails with Unknown provider ''.
    I added a regression test for the exact end-to-end path:
    Plugin provider appears in the picker
    /model --provider goes through switch_model()
    resolve_provider_full() accepts the plugin provider
    Runtime credentials/base_url still resolve through the plugin profile
    So #21695 should now cover both the original runtime/picker gap and this explicit provider-selection gap.

  4. GottZ commented on Jul 29, 2026

    @GottZ

    This was generated by AI during triage.

    Summary

    One PR, #21695, addresses #21685 by adding plugin ProviderProfile integration to runtime credential/API-mode resolution, fallback-model population in the /model picker, and explicit picker-to-switch provider resolution. Its diff covers both reported root causes, but integration with current main still requires validation because the provider registry and canonical picker paths have evolved.

    Related pull requests

    Suggested consolidation

    Merge #21695 after the keep_open review's current-main integration concerns are resolved and the runtime, picker, explicit switch, URL-vs-key handling, and plugin-discovery regression tests pass on the rebased head. It is the only candidate and the best available fix for both #21685 failure paths; there are no duplicate PRs to close.

    Complex graph

    flowchart LR
        classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
        classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
        classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
        classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
        classDef best stroke-width:3px,stroke:#b45309
        classDef target stroke-width:3px,stroke:#4338ca
        I21685(["issue #21685 (open)"])
        P21695["PR #21695 (open)"]
        P21695 -->|best fix| I21685
        class I21685 open
        class I21685 target
        class P21695 open
        class P21695 best
        click I21685 "https://github.com/NousResearch/hermes-agent/issues/21685"
        click P21695 "https://github.com/NousResearch/hermes-agent/pull/21695"
    
    Loading

    Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed or no verify verdict yet (state tag in the node label).

    Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 36 kB of PR diffs, 7 kB of issue/PR text, 4 kB of discussion (4 comments), 2 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

  5. added
    P3Low — cosmetic, nice to have
    and removed
    P2Medium — degraded but workaround exists
    on Jul 29, 2026
  6. teknium1 commented on Sep 20, 2026

    @teknium1
    Collaborator

    Both gaps are fixed on main by the #116408 campaign: (1) the /model picker shows a plugin's fallback_models (or live fetch_models()) via hermes_cli/models.py::_profile_live_catalog — #116552 (main 22beb95427); (2) every registered ProviderProfile is mirrored into PROVIDER_REGISTRY under its declared auth_type, with a re-sync on discovery/miss, so resolve_runtime_provider / gateway / aux no longer say Unknown provider for a plugin — #116553 (main 6621e8aa98). Live: resolve_provider('example-oauth') base AuthError Unknown provider → head resolves; picker row present. Credit #21695 for the early direction.

  7. added a commit that references this issue on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/cliCLI entry point, hermes_cli/, setup wizardcomp/pluginsPlugin system and bundled pluginstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions