feat: add AWS Bedrock as a model provider - #12
Merged
Merged
Conversation
Adds a `bedrock` provider backed by the model-agnostic Bedrock Converse API (@aws-sdk/client-bedrock-runtime), so any Converse-capable model works (Anthropic Claude, Meta Llama, Amazon Nova/Titan, Mistral, Cohere). - New BedrockTranslator on the existing BaseTranslator abstraction, reusing shared prompt-building, JSON parsing, batching and retry - Config/schema/loader wired for `provider: bedrock` with a required aws-region and optional explicit credentials (access key / secret / session token) that fall back to the default AWS credential chain - New action inputs: aws-region, aws-access-key-id, aws-secret-access-key, aws-session-token - Provider default model anthropic.claude-3-haiku-20240307-v1:0 and bedrock rate limits - Tests: BedrockTranslator (mocked SDK), factory, and schema coverage - Docs: README provider section + inputs; repo keywords
cport1
force-pushed
the
feat/aws-bedrock-provider
branch
from
July 1, 2026 15:38
33b0e3f to
1572b77
Compare
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
Adds AWS Bedrock as a model provider, alongside Anthropic, OpenAI, and Ollama.
It uses the model-agnostic Bedrock Converse API (
@aws-sdk/client-bedrock-runtime), so any Converse-capable model works — Anthropic Claude, Meta Llama, Amazon Nova/Titan, Mistral, Cohere, etc.Details
BedrockTranslatorbuilt on the existingBaseTranslatorabstraction, reusing the shared prompt-building, JSON parsing, batching, rate limiting, and retry logic.aws-region; explicitaws-access-key-id/aws-secret-access-key/aws-session-tokenare optional and fall back to the default AWS credential chain (soaws-actions/configure-aws-credentials/ OIDC just works).aws-region,aws-access-key-id,aws-secret-access-key,aws-session-token.anthropic.claude-3-haiku-20240307-v1:0; added bedrock rate limits.AuthenticationError/RateLimitError/ retryableTranslatorError.Usage
```yaml
with:
role-to-assume: arn:aws:iam::…:role/bedrock-translate
aws-region: us-east-1
with:
provider: bedrock
aws-region: us-east-1
model: anthropic.claude-3-haiku-20240307-v1:0
target-languages: de,fr,es
files: 'src/locales/**/*.xliff'
```
Tests
BedrockTranslatorunit tests (mocked AWS SDK): default model, credential wiring, Converse response parsing, and error mapping.dist/rebuilt.