fix(bedrock): add auxiliary client support and dot preservation for model names - #11700
Closed
yetisnowman wants to merge 1 commit into
Closed
fix(bedrock): add auxiliary client support and dot preservation for model names#11700yetisnowman wants to merge 1 commit into
yetisnowman wants to merge 1 commit into
Conversation
…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.
19 tasks
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
Both fixes are reachable from the current |
1 task
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.
Problem
The bedrock provider added in #7920 has two edge cases that cause errors:
Auxiliary client does not support bedrock —
auxiliary_client.pyresolve_provider_client()has no bedrock branch, so configuringauxiliary.provider: bedrockin config produces a warning and disables LLM-based context compression/summarization.Model name dots get incorrectly replaced —
_anthropic_preserve_dots()whitelist does not includebedrock. Bedrock model IDs contain dots (e.g.us.anthropic.claude-opus-4-6-v1) whichnormalize_model_name()converts to hyphens, producing invalid model identifiers and HTTP 400 errors.Fix
bedrockbranch toresolve_provider_client()that reusesbuild_anthropic_bedrock_client()with IAM authbedrockto the_anthropic_preserve_dots()provider setTesting
Verified on a live Hermes gateway instance running
us.anthropic.claude-opus-4-6-v1via Bedrock: