Skip to content

feat: add AWS Bedrock provider for foundational model integration#6122

Closed
lalalic wants to merge 3 commits intokeephq:mainfrom
lalalic:feat/aws-bedrock-provider
Closed

feat: add AWS Bedrock provider for foundational model integration#6122
lalalic wants to merge 3 commits intokeephq:mainfrom
lalalic:feat/aws-bedrock-provider

Conversation

@lalalic
Copy link
Copy Markdown
Contributor

@lalalic lalalic commented Mar 21, 2026

Summary

Adds a new AWS Bedrock provider that enables Keep workflows to query AWS foundational models, Resolves #5190.

AWS Bedrock lets teams use Claude, Llama, Mistral, Cohere, and Titan models via their own AWS account — without routing through third-party APIs. This is valuable for teams with strict data residency requirements or existing AWS infrastructure.

Supported Model Families

Family Example Model IDs
Anthropic Claude anthropic.claude-3-sonnet-20240229-v1:0, claude-3-haiku, claude-3-opus
Meta Llama meta.llama3-8b-instruct-v1:0, llama3-70b
Mistral mistral.mistral-7b-instruct-v0:2, mixtral-8x7b
Cohere Command cohere.command-r-v1:0, command-r-plus
Amazon Titan amazon.titan-text-express-v1, titan-text-lite

Features

  • IAM role support — works on EC2/ECS/EKS with instance profile (no credentials needed), identical pattern to the existing EKS provider
  • Explicit credentials — access key + secret + optional session token
  • Structured output — JSON schema support for Claude models (system prompt injection)
  • Model-aware request/response — each model family has its own request body format; the provider handles all of them transparently
  • Lazy client — boto3 client is created once and cached

Auth Configuration

Field Required Description
region AWS region (e.g. us-east-1)
access_key AWS access key ID (leave empty for IAM role)
secret_access_key AWS secret access key
session_token Temporary credentials session token

Tests

27 unit tests with full mocking — no AWS credentials required to run.

27 passed in 8.06s

Covers: auth config validation, boto3 client creation (credentials + IAM), request body building for all 5 model families, response parsing for all families, structured output, error handling (ClientError → ProviderException), and client caching.

…ephq#5190)

Adds a new AWS Bedrock provider that enables Keep workflows to query
AWS foundational models (Claude, Llama, Mistral, Cohere, Titan).

## Features
- Supports all major Bedrock model families with model-specific request/response handling
- Auth via explicit AWS credentials or IAM role/instance profile (zero-config for EC2/ECS/EKS)
- Optional session token support for temporary credentials
- Structured output (JSON schema) support for Claude models
- Lazy boto3 client initialization with caching

## Supported Models
| Family | Example Model IDs |
|--------|------------------|
| Anthropic Claude | anthropic.claude-3-sonnet-20240229-v1:0, claude-3-haiku, claude-3-opus |
| Meta Llama | meta.llama3-8b-instruct-v1:0, llama3-70b |
| Mistral | mistral.mistral-7b-instruct-v0:2, mixtral-8x7b |
| Cohere Command | cohere.command-r-v1:0, command-r-plus |
| Amazon Titan | amazon.titan-text-express-v1, titan-text-lite |

## Tests
27 unit tests covering auth config, client creation, request body building,
response parsing, and query execution for all model families.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 21, 2026

@lalalic is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. Feature A new feature Provider Providers related issues labels Mar 21, 2026
Copy link
Copy Markdown
Member

@shahargl shahargl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lalalic - a provider needs more than just the provider file and tests file. i needs the documentation. you have plenty of PRs for providers to see what you need to change

lalalic added 2 commits March 24, 2026 07:36
- Add bedrock-provider.mdx with setup guide (IAM role, explicit
  credentials, temporary credentials), supported model table,
  and workflow examples
- Add auto-generated snippet (authentication params, workflow step)
- Add bedrock-provider to mint.json navigation
@lalalic
Copy link
Copy Markdown
Contributor Author

lalalic commented Mar 24, 2026

Added the missing pieces:

  • Provider icon (keep-ui/public/icons/bedrock-icon.png)

The documentation was already added in the previous commit:

  • docs/providers/documentation/bedrock-provider.mdx
  • docs/snippets/providers/bedrock-snippet-autogenerated.mdx
  • docs/mint.json updated

All docs validation passes. Ready for re-review!

@shahargl
Copy link
Copy Markdown
Member

shahargl commented Apr 5, 2026

Closing: AI-generated spam.

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

Labels

Feature A new feature Provider Providers related issues size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[➕ Feature]: AWS Bedrock Provider

2 participants