Skip to content

fix(bedrock): add auxiliary client support and dot preservation for model names - #11700

Closed
yetisnowman wants to merge 1 commit into
NousResearch:mainfrom
yetisnowman:fix/bedrock-auxiliary-and-dots
Closed

fix(bedrock): add auxiliary client support and dot preservation for model names#11700
yetisnowman wants to merge 1 commit into
NousResearch:mainfrom
yetisnowman:fix/bedrock-auxiliary-and-dots

Conversation

@yetisnowman

Copy link
Copy Markdown

Problem

The bedrock provider added in #7920 has two edge cases that cause errors:

  1. Auxiliary client does not support bedrockauxiliary_client.py resolve_provider_client() has no bedrock branch, so configuring auxiliary.provider: bedrock in config produces a warning and disables LLM-based context compression/summarization.

  2. Model name dots get incorrectly replaced_anthropic_preserve_dots() whitelist does not include bedrock. Bedrock model IDs contain dots (e.g. us.anthropic.claude-opus-4-6-v1) which normalize_model_name() converts to hyphens, producing invalid model identifiers and HTTP 400 errors.

Fix

  • Add a bedrock branch to resolve_provider_client() that reuses build_anthropic_bedrock_client() with IAM auth
  • Add bedrock to the _anthropic_preserve_dots() provider set
  • Update docstring to document bedrock dot preservation

Testing

Verified on a live Hermes gateway instance running us.anthropic.claude-opus-4-6-v1 via Bedrock:

  • No more HTTP 400 errors
  • Auxiliary LLM warning resolved
  • Slack + WeChat gateway stable

…edrock model names

The bedrock provider was added in NousResearch#7920 but two edge cases were missed:

1. auxiliary_client.py resolve_provider_client() had no bedrock branch,
   so configuring auxiliary LLM with provider: bedrock produced a warning
   and no LLM-based compression/summarization.

2. _anthropic_preserve_dots() whitelist did not include 'bedrock'.
   Bedrock model IDs contain dots (e.g. us.anthropic.claude-opus-4-6-v1)
   which normalize_model_name() was converting to hyphens, producing
   invalid model identifiers and HTTP 400 errors.

Fixes both by adding a bedrock branch to resolve_provider_client() that
reuses build_anthropic_bedrock_client() with IAM auth, and adding
'bedrock' to the preserve_dots provider set.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists provider/bedrock AWS Bedrock (boto3, IAM) comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels Apr 24, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the detailed write-up and live validation — this is well-scoped and clearly motivated!

This is an automated hermes-sweeper review. Both changes proposed by this PR landed on main independently before this PR was reviewed:

Both fixes are reachable from the current main HEAD. Closing as implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint 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.

3 participants