Description
After upgrading OpenCode from 1.15.13 to 1.16.0, AWS Bedrock authentication is broken when using SSO. Attempting to use a Bedrock model throws a runtime error related to the credential provider. It is highly likely that this is a minification/bundling error affecting the AWS SDK introduced in the 1.16.0 release.
Authentication Setup
Per company requirements, AWS authentication is handled via SSO. An Okta client connects to AWS and generates a temporary token, placing it directly into a specific profile within ~/.aws/credentials.
The generated [claude] profile in the credentials file looks like this (keys and tokens redacted):
[claude]
region = us-east-1
aws_access_key_id = ASI...
aws_secret_access_key = lpY...
aws_session_token = Fwo...
x_security_token_expires = 2026-06-05T19:56:04+02:00
The following environment variables are exported before running OpenCode:
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1
export AWS_PROFILE=claude
Error message
AWS credential provider failed: E is not a function. (In 'E(e)', 'E' is a Symbol). Please ensure your credential provider returns valid AWS credentials with accessKeyId and secretAccessKey properties.
Expected behavior
OpenCode should correctly resolve the AWS credential provider chain for the specified SSO profile (parsing the access key, secret key, and session token) and authenticate with Bedrock, exactly as it did in the previous version.
Additional context
The error E is not a function. (In 'E(e)', 'E' is a Symbol) strongly suggests that the @aws-sdk/credential-providers package (or its dependencies handling SSO/temporary profile resolution) got mangled during the build step for 1.16.0.
Downgrading back to 1.15.13 immediately resolves the issue and the SSO authentication with temporary tokens works perfectly again.
Plugins
No response
OpenCode version
1.16.0
Steps to reproduce
- Configure AWS SSO credentials to
~/.aws/credentials under a specific profile, including an aws_session_token.
- Export the environment variables (
CLAUDE_CODE_USE_BEDROCK, AWS_REGION, AWS_PROFILE).
- Update OpenCode to version
1.16.0.
- Run OpenCode and attempt to interact with a Bedrock model.
- Observe the runtime minification error.
Screenshot and/or share link
No response
Operating System
Manjaro Linux, kernel: 6.12.85-1-MANJARO
Terminal
Ghostty
Description
After upgrading OpenCode from
1.15.13to1.16.0, AWS Bedrock authentication is broken when using SSO. Attempting to use a Bedrock model throws a runtime error related to the credential provider. It is highly likely that this is a minification/bundling error affecting the AWS SDK introduced in the1.16.0release.Authentication Setup
Per company requirements, AWS authentication is handled via SSO. An Okta client connects to AWS and generates a temporary token, placing it directly into a specific profile within
~/.aws/credentials.The generated
[claude]profile in the credentials file looks like this (keys and tokens redacted):The following environment variables are exported before running OpenCode:
Error message
Expected behavior
OpenCode should correctly resolve the AWS credential provider chain for the specified SSO profile (parsing the access key, secret key, and session token) and authenticate with Bedrock, exactly as it did in the previous version.
Additional context
The error
E is not a function. (In 'E(e)', 'E' is a Symbol)strongly suggests that the@aws-sdk/credential-providerspackage (or its dependencies handling SSO/temporary profile resolution) got mangled during the build step for 1.16.0.Downgrading back to
1.15.13immediately resolves the issue and the SSO authentication with temporary tokens works perfectly again.Plugins
No response
OpenCode version
1.16.0
Steps to reproduce
~/.aws/credentialsunder a specific profile, including anaws_session_token.CLAUDE_CODE_USE_BEDROCK,AWS_REGION,AWS_PROFILE).1.16.0.Screenshot and/or share link
No response
Operating System
Manjaro Linux, kernel: 6.12.85-1-MANJARO
Terminal
Ghostty