Skip to content

feat(opencode): add AWS Web Identity Token File support for Bedrock - #8461

Merged
rekram1-node merged 2 commits into
anomalyco:devfrom
bainos:feat/aws-web-identity-token-file
Jan 14, 2026
Merged

rekram1-node merged 2 commits into
anomalyco:devfrom
bainos:feat/aws-web-identity-token-file

Conversation

@bainos

@bainos bainos commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

Closes #8454

Feature

Adds AWS Web Identity Token File (EKS IRSA) authentication support for Amazon Bedrock.

Implementation

  • Detect AWS_WEB_IDENTITY_TOKEN_FILE environment variable to enable autoload
  • Conditionally set credentialProvider only when no bearer token exists
  • Maintain authentication precedence: bearer token → credential chain

Changes

  • provider.ts: Conditional credentialProvider based on auth method
  • amazon-bedrock.test.ts: Add web identity token test + fix existing test cleanup
  • auth.ts, providers.mdx: Update documentation

Verification

Tested with real EKS IRSA credentials. All tests pass. No regressions in bearer token or access key authentication.

  Adds AWS Web Identity Token File (EKS IRSA) authentication support for Amazon Bedrock.

  ## Implementation
  - Detect `AWS_WEB_IDENTITY_TOKEN_FILE` environment variable to enable autoload
  - Conditionally set `credentialProvider` only when no bearer token exists
  - Maintain authentication precedence: bearer token → credential chain

  ## Changes
  - `provider.ts`: Conditional credentialProvider based on auth method
  - `amazon-bedrock.test.ts`: Add web identity token test + fix existing test cleanup
  - `auth.ts`, `providers.mdx`: Update documentation

  ## Verification
  Tested with real EKS IRSA credentials. All tests pass. No regressions in bearer token or access key authentication.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Found Related PR

PR #7502: feat(bedrock): support AWS_SHARED_CREDENTIALS_FILE for autoload

Why it's related: This is a similar feature that adds AWS credential detection for Bedrock. While PR #8461 adds support for AWS Web Identity Token File (EKS IRSA), PR #7502 adds support for AWS_SHARED_CREDENTIALS_FILE. Both involve:

  • Detecting environment variables to enable autoload
  • Conditional credential provider setup
  • Maintaining authentication precedence
  • Testing with Bedrock authentication

These appear to be complementary features rather than duplicates, both improving AWS authentication support for the Bedrock provider with different credential methods.

@loretoparisi

Copy link
Copy Markdown

+1

1 similar comment
@andreafspeziale

Copy link
Copy Markdown

+1

@rekram1-node

Copy link
Copy Markdown
Collaborator

/review

@github-actions

Copy link
Copy Markdown
Contributor

lgtm

@rekram1-node
rekram1-node merged commit 3a9e6b5 into anomalyco:dev Jan 14, 2026
4 checks passed
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
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.

feat: Add AWS Web Identity Token File (EKS IRSA) support for Bedrock

4 participants