feat: native AWS Bedrock provider via Converse API#10549
Merged
Conversation
Salvaged from PR #7920 by JiaDe-Wu — cherry-picked Bedrock-specific additions onto current main, skipping stale-branch reverts (293 commits behind). Dual-path architecture: - Claude models → AnthropicBedrock SDK (prompt caching, thinking budgets) - Non-Claude models → Converse API via boto3 (Nova, DeepSeek, Llama, Mistral) Includes: - Core adapter (agent/bedrock_adapter.py, 1098 lines) - Full provider registration (auth, models, providers, config, runtime, main) - IAM credential chain + Bedrock API Key auth modes - Dynamic model discovery via ListFoundationModels + ListInferenceProfiles - Streaming with delta callbacks, error classification, guardrails - hermes doctor + hermes auth integration - /usage pricing for 7 Bedrock models - 130 automated tests (79 unit + 28 integration + follow-up fixes) - Documentation (website/docs/guides/aws-bedrock.md) - boto3 optional dependency (pip install hermes-agent[bedrock]) Co-authored-by: JiaDe WU <40445668+JiaDe-Wu@users.noreply.github.com>
Contributor
|
This was referenced Apr 15, 2026
This was referenced Apr 16, 2026
13 tasks
jessica025
added a commit
to jessica025/hermes-agent
that referenced
this pull request
Apr 19, 2026
AIAgent._anthropic_preserve_dots() whitelist was missing 'bedrock'. The default normalize_model_name() converts dots to hyphens for OpenRouter compat (e.g. anthropic/claude-opus-4.6 -> claude-opus-4-6), which mangles Bedrock's cross-region inference profile IDs: us.anthropic.claude-sonnet-4-6 -> us-anthropic-claude-sonnet-4-6 Bedrock then rejects the mangled ID with: HTTP 400: The provided model identifier is invalid. This is a follow-up to PR NousResearch#10549 (native AWS Bedrock provider): the Bedrock path was wired up in runtime_provider.py and bedrock_adapter.py, but the dot-preservation whitelist missed it. Add 'bedrock' to the provider whitelist and 'bedrock-runtime' to the base_url match so Claude models on Bedrock work out of the box. Verified against us.anthropic.claude-sonnet-4-6, us.anthropic.claude-opus-4-7, and us.anthropic.claude-opus-4-6-v1.
turbo998
added a commit
to turbo998/hermes-agent
that referenced
this pull request
May 9, 2026
Closes parity gap between Azure Foundry (NousResearch#15845) and AWS Bedrock (NousResearch#10549). Adds the operational polish layer Bedrock established as the bar: - Azure AI Content Safety client + guardrails block (mirrors Bedrock shape) - hermes doctor Azure Foundry section - hermes auth Azure Foundry status row - Error-classifier patterns: ResponsibleAIPolicyViolation, content_filter, Azure 429 retry-after, DeploymentNotFound - /usage pricing for 7 Azure Foundry models the wizard prefills - pyproject [azure] optional extra (provider works without it) - Docs: Content Safety guardrails section in azure-foundry.md - ~70 new tests across 6 files Signed-off-by: Chen Qi <turbo998@users.noreply.github.com>
1 task
This was referenced Jun 1, 2026
Open
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.
Summary
Salvaged from PR #7920 by @JiaDe-Wu — cherry-picked Bedrock-specific additions onto current main, skipping all stale-branch reverts (original PR was 293 commits behind).
What this PR does
Adds AWS Bedrock as a first-class inference provider with a dual-path architecture:
Features
agent/bedrock_adapter.py, 1098 lines)ListFoundationModels+ListInferenceProfileshermes doctor— checks Bedrock access, model count, credential sourcehermes auth— displays IAM identity, region/usagepricing for 7 Bedrock modelspip install hermes-agent[bedrock]optional dependencyTesting
Files changed (18 files, +3543 / -20)
agent/bedrock_adapter.pyagent/anthropic_adapter.pybuild_anthropic_bedrock_client()agent/error_classifier.pyagent/model_metadata.pyagent/usage_pricing.pyhermes_cli/auth.pyhermes_cli/models.pyhermes_cli/providers.pyhermes_cli/config.pyhermes_cli/runtime_provider.pyhermes_cli/main.py_model_flow_bedrock()with discoveryhermes_cli/doctor.pyhermes_cli/auth_commands.pyrun_agent.pypyproject.tomltests/agent/test_bedrock_adapter.pytests/agent/test_bedrock_integration.pywebsite/docs/guides/aws-bedrock.mdCloses #3863. Credit: @JiaDe-Wu (original implementation), @hheydaroff (earlier PR #6845, voluntarily closed in favor of #7920).