Skip to content

fix(providers): register bedrock in HERMES_OVERLAYS so resolve_provider_full succeeds#15361

Closed
alblez wants to merge 1 commit into
NousResearch:mainfrom
alblez:fix/bedrock-provider-resolution
Closed

fix(providers): register bedrock in HERMES_OVERLAYS so resolve_provider_full succeeds#15361
alblez wants to merge 1 commit into
NousResearch:mainfrom
alblez:fix/bedrock-provider-resolution

Conversation

@alblez

@alblez alblez commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

What & Why

Fixes #15358.

hermes doctor emits a false-positive error on valid provider: bedrock configs:

✗ model.provider 'bedrock' is not a recognised provider (known: ..., bedrock, ...)

Root cause: hermes_cli/auth.py::PROVIDER_REGISTRY registers bedrock, but hermes_cli/providers.py::HERMES_OVERLAYS had no entry for it. models.dev publishes this provider under the id amazon-bedrock, not bedrock, so get_provider('bedrock') and therefore resolve_provider_full('bedrock', ...) both returned None. 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.py was missing.

Change

hermes_cli/providers.py: add a minimal HermesOverlay entry for bedrock, mirroring the PROVIDER_REGISTRY metadata:

"bedrock": HermesOverlay(
    transport="bedrock_converse",
    auth_type="aws_sdk",
    extra_env_vars=("AWS_BEARER_TOKEN_BEDROCK", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION"),
    base_url_env_var="BEDROCK_BASE_URL",
),

The existing ALIASES already map aws, aws-bedrock, amazon-bedrock, and amazon to bedrock, so this single entry also makes all aliases resolve correctly.

Tests

Added TestBedrockResolution in tests/hermes_cli/test_api_key_providers.py with three regression tests:

  • bedrock is present in PROVIDER_REGISTRY
  • resolve_provider_full('bedrock', None, []) returns a ProviderDef with transport='bedrock_converse' and auth_type='aws_sdk'
  • All four aliases (aws, aws-bedrock, amazon-bedrock, amazon) resolve to bedrock

How to test

pytest tests/hermes_cli/test_api_key_providers.py::TestBedrockResolution -v
pytest tests/hermes_cli/test_doctor.py -v
pytest tests/agent/test_bedrock_integration.py -v

All pass locally (77 tests across doctor + bedrock integration + new regression tests).

Before the fix, hermes doctor on a provider: bedrock config prints:

✗ model.provider 'bedrock' is not a recognised provider

After the fix, it prints no such error and correctly moves on to API connectivity checks.

Platforms tested

  • macOS 14 (Apple Silicon), Python 3.11.14

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.

…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
@teknium1

Copy link
Copy Markdown
Contributor

Closing as already fixed on main.

Triage notes (high confidence):
hermes_cli/providers.py:210-211 already registers 'bedrock' in HERMES_OVERLAYS with transport='bedrock_converse', aliases at lines 343-346.

If you still see this on the latest version, please reopen with reproduction steps.

(Bulk-closed during a CLI 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 provider/bedrock AWS Bedrock (boto3, IAM) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes doctor: false-positive "model.provider 'bedrock' is not a recognised provider"

3 participants