Skip to content

fix: add Bedrock IAM credentials connect flow and environment variables auth option#14969

Open
tristan-stahnke-GPS wants to merge 31 commits intoanomalyco:devfrom
tristan-stahnke-GPS:feat/bedrock-connect-improvements
Open

fix: add Bedrock IAM credentials connect flow and environment variables auth option#14969
tristan-stahnke-GPS wants to merge 31 commits intoanomalyco:devfrom
tristan-stahnke-GPS:feat/bedrock-connect-improvements

Conversation

@tristan-stahnke-GPS
Copy link

@tristan-stahnke-GPS tristan-stahnke-GPS commented Feb 24, 2026

Replace the generic API key form for Amazon Bedrock with an IAM credentials form (access key, secret, region) and an environment variables auth option.

Issue for this PR

Closes #14967

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Clicking "Connect Amazon Bedrock" shows a generic API key form, but Bedrock uses AWS IAM credentials. This PR fixes that with two changes:

  1. IAM credentials form — enter Access Key ID, Secret Access Key, and Region. Stored as a new aws auth type in auth.json and injected into the credential chain at request time.

  2. Env var auth option — shows users which env vars to set (AWS_PROFILE, AWS_ACCESS_KEY_ID, AWS_BEARER_TOKEN_BEDROCK) so they can use existing AWS credential chain methods instead.

How did you verify your code works?

  • Launched the desktop app via bun run dev:desktop and tested the Bedrock connect dialog
  • All 227 provider tests pass (including 19 Bedrock-specific)
  • App typecheck passes
  • SDK types regenerated via ./packages/sdk/js/script/build.ts

Screenshots / recordings

image image

When selecting Environment variables, the application gives guidance on how to set the environment variables so they will be picked up by OpenCode at launch.

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@tristan-stahnke-GPS tristan-stahnke-GPS changed the title feat: add Bedrock IAM credentials connect flow and regional model dedup fix: add Bedrock IAM credentials connect flow and environment variables auth option Feb 25, 2026
@tristan-stahnke-GPS tristan-stahnke-GPS force-pushed the feat/bedrock-connect-improvements branch from 4796965 to 58c4510 Compare February 25, 2026 00:59
@tristan-stahnke-GPS tristan-stahnke-GPS marked this pull request as draft February 25, 2026 01:02
@tristan-stahnke-GPS
Copy link
Author

tristan-stahnke-GPS commented Feb 25, 2026

Cleaned up some stuff that wasn't exactly clean / shouldn't be part of this PR, and updating code to match standards.

…es auth option

Clicking "Connect Amazon Bedrock" shows a generic API key form, but
Bedrock uses AWS IAM credentials. This PR fixes that with two changes:

1. IAM credentials form — enter Access Key ID, Secret Access Key, and
Region. Stored as a new aws auth type in auth.json and injected into
the credential chain at request time.

2. Env var auth option — shows users which env vars to set
(AWS_PROFILE, AWS_ACCESS_KEY_ID, AWS_BEARER_TOKEN_BEDROCK) so they
can use existing AWS credential chain methods instead.
@tristan-stahnke-GPS tristan-stahnke-GPS force-pushed the feat/bedrock-connect-improvements branch from 58c4510 to 11531bd Compare February 25, 2026 01:03
@tristan-stahnke-GPS tristan-stahnke-GPS marked this pull request as ready for review February 25, 2026 01:08
Tristan Stahnke added 2 commits March 1, 2026 19:37
…-improvements

# Conflicts:
#	packages/web/src/content/docs/bs/config.mdx
#	packages/web/src/content/docs/ja/config.mdx
#	packages/web/src/content/docs/ja/providers.mdx
#	packages/web/src/content/docs/ko/providers.mdx
#	packages/web/src/content/docs/pt-br/providers.mdx
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.

Bedrock connect dialog shows generic API key form instead of IAM credentials

2 participants