fix(runtime_provider): use custom provider name instead of hardcoded string#2853
Open
teyrebaz33 wants to merge 1 commit into
Open
fix(runtime_provider): use custom provider name instead of hardcoded string#2853teyrebaz33 wants to merge 1 commit into
teyrebaz33 wants to merge 1 commit into
Conversation
…string
_resolve_named_custom_runtime() was returning 'openrouter' as the
provider label for all named custom providers (e.g. Ollama at a local
endpoint). This caused 'hermes what provider are you using?' to report
'OpenRouter' even when requests were going to a local Ollama instance.
Fix: return custom_provider.get('name', requested_provider) so the
label reflects the actual configured provider name.
Also update the existing test that expected the wrong label, and add
test_named_custom_provider_label to cover this case explicitly.
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.
Fixes #2736 (item 7)
Problem
_resolve_named_custom_runtime()returned"openrouter"as theproviderlabel for all named custom providers. When a user asked "what provider are you using?" with Ollama configured as a custom provider, Hermes reported "OpenRouter" even though requests were going to a local Ollama endpoint.Change
One-line fix in
hermes_cli/runtime_provider.py: returncustom_provider.get("name", requested_provider)instead of the hardcoded"openrouter"string, so the label reflects the actual configured provider name.Tests
test_named_custom_provider_uses_saved_credentialswhich was asserting the wrong labeltest_named_custom_provider_labelcovering a named Ollama provider returning its own name