Repository navigation
feat: add AWS Bedrock provider - #1559
Merged
Merged
Conversation
Adds OpenSpec proposal, design, specs, and tasks for the AWS Bedrock provider (type: bedrock) backed by ChatBedrockConverse from @langchain/aws. Closes #1554
Adds a bedrock provider type backed by ChatBedrockConverse from @langchain/aws. Authentication is read from environment variables or the AWS credential chain (AWS_BEARER_TOKEN_BEDROCK, then the BEDROCK_AWS_* key pair, then the default chain). Region resolves from BEDROCK_AWS_REGION then AWS_REGION. Adds BedrockProviderConfigSchema, dispatches type: bedrock from createChatModel, falls back to configured contextWindow in modelInfo.js, and maps rateLimit.maxRetries to the SDK maxAttempts. Closes #1554
Owner
Author
Implementation Audit Results — aws-bedrock-providerGoal Fulfillment
Spec Compliance
Task Completion
Quality Check
VerdictAll goals fulfilled, spec-compliant, tasks complete, no obvious issues. Proceed to Step 10 (archive). |
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.
Description
Adds an AWS Bedrock provider (
type: "bedrock") backed byChatBedrockConversefrom@langchain/aws, so madz can run against foundation models (Claude, Llama, Nova, etc.) hosted in Amazon Bedrock. Authentication is read from environment variables or the standard AWS credential chain, never from config files. This is the sibling of the recently-landedazure-openaiprovider.Type of Change
Testing
tests/unit/provider/bedrock.test.js— 21 unit tests covering schema validation, auth precedence (bearer token, static credentials, session token, default chain), region resolution, missing-region error,maxRetries→maxAttemptsmapping, andmaxTokens/applicationInferenceProfilehandling.tests/integration/provider/bedrock.test.js— 5 integration tests using a mocked Bedrock Runtime client asserting the Converse request shape, usage metadata, streaming, tool-call round trips, andThrottlingExceptionretry behavior.npm run lintclean (0 warnings/errors). Coverage maintained (overall 90.88% statements;bedrock.js100% statements).Coverage
Checklist
npm run lintpassesCloses #1554