Skip to content

feat(bedrock): support Bedrock API key authentication#11798

Merged
RomneyDa merged 1 commit intomainfrom
bedrock-api-keys
Mar 25, 2026
Merged

feat(bedrock): support Bedrock API key authentication#11798
RomneyDa merged 1 commit intomainfrom
bedrock-api-keys

Conversation

@RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Mar 25, 2026

Summary

  • Add Bedrock API key authentication as an alternative to IAM credentials in the core LLM class (Bedrock.ts)
  • When apiKey is set, uses bearer token auth via the AWS SDK's token provider; otherwise falls back to existing IAM credential flow
  • Refactors client creation into a single _getClient() method used by _streamChat, _embed, and rerank (the OpenAI adapter already supported this)
  • Adds docs section with YAML config example

Closes #6645

Test plan

  • Configure Bedrock with apiKey field and verify chat/completions work with bearer token auth
  • Verify existing IAM credential flow (profile, accessKeyId/secretAccessKey) still works unchanged
  • Verify embed and rerank operations work with API key auth

Summary by cubic

Adds Bedrock API key authentication as an alternative to IAM. Enables bearer token auth for chat, embed, and rerank, and unifies client creation.

  • New Features
    • Support apiKey in Bedrock.ts using AWS SDK token bearer auth; IAM flow unchanged.
    • New _getClient() used by _streamChat, _embed, and rerank.
    • Docs updated with YAML example for API key setup.

Written for commit 443ced2. Summary will update on new commits.

Add bearer token authentication for Bedrock API keys as an alternative
to IAM credentials, enabling users to authenticate without exposing
AWS access keys.

Closes #6645
@RomneyDa RomneyDa requested a review from a team as a code owner March 25, 2026 03:15
@RomneyDa RomneyDa requested review from Patrick-Erichsen and removed request for a team March 25, 2026 03:15
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 25, 2026
@continue
Copy link
Contributor

continue bot commented Mar 25, 2026

Documentation Review

No additional documentation updates are needed for this PR.

The PR already includes well-written documentation for the new Bedrock API key authentication feature:

  • New section added: "Bedrock API Keys" under the authentication setup
  • Clear example: Shows YAML configuration with secrets reference
  • Proper placement: Listed before AWS credentials as it's the simpler auth method
  • External reference: Links to AWS docs for more context

The documentation changes are appropriately scoped and match the level of detail in the existing Bedrock docs.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@mintlify
Copy link

mintlify bot commented Mar 25, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
continue-docs 🟢 Ready View Preview Mar 25, 2026, 3:21 AM

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Mar 25, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 25, 2026
@RomneyDa RomneyDa merged commit cf48e74 into main Mar 25, 2026
67 of 69 checks passed
@RomneyDa RomneyDa deleted the bedrock-api-keys branch March 25, 2026 03:27
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Mar 25, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bedrock: Add authentication using Bedrock API keys

2 participants