Skip to content

feat: add Bedrock API Key auth and dynamic model fetching#3671

Open
zw2497 wants to merge 1 commit into
chatboxai:mainfrom
zw2497:feat/bedrock-apikey-auth-and-model-discovery
Open

feat: add Bedrock API Key auth and dynamic model fetching#3671
zw2497 wants to merge 1 commit into
chatboxai:mainfrom
zw2497:feat/bedrock-apikey-auth-and-model-discovery

Conversation

@zw2497
Copy link
Copy Markdown

@zw2497 zw2497 commented Apr 20, 2026

Summary

  • Bedrock API Key authentication: Add support for the new AWS Bedrock API Key auth method (announced July 2025) as an alternative to IAM credentials. Users can switch between API Key and IAM auth via a segmented control in settings.
  • Dynamic model fetching: Implement listModels() using AWS Bedrock ListFoundationModels + ListInferenceProfiles APIs, enabling automatic model discovery instead of relying solely on hardcoded defaults.
  • Both auth methods (API Key and IAM) are supported for model listing via aws4fetch SigV4 signing (IAM) or Bearer token (API Key).

Changes

  • src/shared/providers/definitions/models/bedrock.ts — Add API Key auth to provider, implement listModels() with foundation model capability mapping
  • src/shared/providers/definitions/bedrock.ts — Pass effectiveApiKey to model constructor
  • src/renderer/routes/settings/provider/$providerId.tsx — Add auth mode toggle UI (API Key vs IAM)
  • src/shared/types/settings.ts — Add 'iam' to activeAuthMode enum

Test plan

  • Configure Bedrock with API Key auth → verify chat works
  • Configure Bedrock with IAM credentials → verify chat works
  • Switch between auth modes in settings → verify UI updates correctly
  • Click "Check" button with valid credentials → verify model list is fetched
  • Verify fetched models show correct capabilities (vision, tool_use)

🤖 Generated with Claude Code

- Support both Bedrock API Key (Bearer token) and IAM credentials auth
- Add listModels() using ListFoundationModels + ListInferenceProfiles APIs
- Use aws4fetch (existing dependency) for IAM signing, no new packages
- UI toggle between API Key and IAM Credentials modes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c4c2026d-1404-4bdb-b08e-ef0178c3e46c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant