Skip to content

fix(runtime): check providers: dict even for resolved provider aliases#13134

Closed
regoo wants to merge 1 commit into
NousResearch:mainfrom
regoo:fix/lmstudio-provider-alias
Closed

fix(runtime): check providers: dict even for resolved provider aliases#13134
regoo wants to merge 1 commit into
NousResearch:mainfrom
regoo:fix/lmstudio-provider-alias

Conversation

@regoo

@regoo regoo commented Apr 20, 2026

Copy link
Copy Markdown

Problem

When resolve_provider() successfully maps an alias like lmstudio to custom, the code was returning None immediately, skipping the user's providers: dict entirely. This meant custom provider definitions under alias names (e.g. providers.lmstudio) were silently ignored, causing fallback to openrouter.

Fix

Continue to check providers: dict regardless of built-in alias resolution, allowing user-defined custom providers to shadow aliases.

Changes

  • hermes_cli/runtime_provider.py: _get_named_custom_provider() now stores the built-in match result in a flag instead of returning early, allowing the providers: dict check to proceed for all non-auto/non-custom requests.

When resolve_provider() successfully maps an alias like 'lmstudio' to
'custom', the code was returning None immediately, skipping the user's
providers: dict entirely. This meant custom provider definitions under
alias names (e.g. providers.lmstudio) were silently ignored, causing
fallback to openrouter.

Fix: continue to check providers: dict regardless of built-in alias
resolution, allowing user-defined custom providers to shadow aliases.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #5956 which also fixes named provider resolution from config.yaml providers: dict.

@teknium1

Copy link
Copy Markdown
Contributor

Closing as superseded by #28882.

Triage notes (high confidence):
hermes_cli/runtime_provider.py:487-502 already falls through to providers: dict when resolve_provider returns a canonical != requested name (alias case). Merged PR #28882 explicitly addressed custom-provider alias handling.

Thanks for the contribution — the underlying problem this PR addresses has been resolved by the linked PR on current main. If you believe this was closed in error, please comment and we'll reopen.

(Bulk-closed during a CLI PR triage sweep.)

@teknium1 teknium1 closed this May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants