fix(providers): register bedrock in HERMES_OVERLAYS so resolve_provider_full succeeds#15361
Closed
alblez wants to merge 1 commit into
Closed
fix(providers): register bedrock in HERMES_OVERLAYS so resolve_provider_full succeeds#15361alblez wants to merge 1 commit into
alblez wants to merge 1 commit into
Conversation
…er_full succeeds
`hermes_cli/auth.py::PROVIDER_REGISTRY` registers 'bedrock' (auth_type
aws_sdk, transport bedrock_converse), but `hermes_cli/providers.py` was
missing a matching overlay entry. Since models.dev's id is
'amazon-bedrock' (not 'bedrock'), `get_provider('bedrock')` returned None
and so did `resolve_provider_full('bedrock', ...)`.
This caused `hermes doctor` to report a false-positive error on valid
`provider: bedrock` configs:
model.provider 'bedrock' is not a recognised provider
(known: ..., bedrock, ...)
even though the same output listed 'bedrock' as a known provider and the
API Connectivity section succeeded against AWS Bedrock.
Adds a minimal HermesOverlay entry for bedrock mirroring PROVIDER_REGISTRY,
plus regression tests confirming resolve_provider_full and the aws/
aws-bedrock/amazon-bedrock/amazon aliases all resolve.
Fixes NousResearch#15358
Contributor
|
Closing as already fixed on Triage notes (high confidence): If you still see this on the latest version, please reopen with reproduction steps. (Bulk-closed during a CLI triage sweep.) |
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.
What & Why
Fixes #15358.
hermes doctoremits a false-positive error on validprovider: bedrockconfigs:Root cause:
hermes_cli/auth.py::PROVIDER_REGISTRYregistersbedrock, buthermes_cli/providers.py::HERMES_OVERLAYShad no entry for it. models.dev publishes this provider under the idamazon-bedrock, notbedrock, soget_provider('bedrock')and thereforeresolve_provider_full('bedrock', ...)both returnedNone. Doctor then flagged the provider as unknown, contradicting its own "known providers" list.The rest of the agent (runtime resolution, bedrock_converse transport, AWS SDK auth) already works — only provider resolution in
providers.pywas missing.Change
hermes_cli/providers.py: add a minimalHermesOverlayentry forbedrock, mirroring thePROVIDER_REGISTRYmetadata:The existing
ALIASESalready mapaws,aws-bedrock,amazon-bedrock, andamazontobedrock, so this single entry also makes all aliases resolve correctly.Tests
Added
TestBedrockResolutionintests/hermes_cli/test_api_key_providers.pywith three regression tests:bedrockis present inPROVIDER_REGISTRYresolve_provider_full('bedrock', None, [])returns aProviderDefwithtransport='bedrock_converse'andauth_type='aws_sdk'aws,aws-bedrock,amazon-bedrock,amazon) resolve tobedrockHow to test
All pass locally (77 tests across doctor + bedrock integration + new regression tests).
Before the fix,
hermes doctoron aprovider: bedrockconfig prints:After the fix, it prints no such error and correctly moves on to API connectivity checks.
Platforms tested
Scope
One logical change. No behavior change for other providers — the new overlay entry is only consulted when
provider == 'bedrock'(or one of its existing aliases) is passed in.