Env.set does not update process.env, breaking provider SDKs #8146

Closed
opened 2026-02-16 18:09:16 -05:00 by yindo · 1 comment
Owner

Originally created by @jerome-benoit on GitHub (Jan 31, 2026).

Originally assigned to: @thdxr on GitHub.

After commit 90f39bf, Env.set only updates a shallow copy of process.env, not process.env itself. This breaks providers like sap-ai-core and amazon-bedrock whose SDKs read environment variables directly from process.env.

Originally created by @jerome-benoit on GitHub (Jan 31, 2026). Originally assigned to: @thdxr on GitHub. After commit 90f39bf, `Env.set` only updates a shallow copy of `process.env`, not `process.env` itself. This breaks providers like `sap-ai-core` and `amazon-bedrock` whose SDKs read environment variables directly from `process.env`.
yindo closed this issue 2026-02-16 18:09:16 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2026):

This issue might be related to or could help explain several reported problems with provider SDKs. Please check these potentially related issues:

  • #8559: Enable credential_process and default profile support for Amazon Bedrock - directly involves environment variable credential resolution
  • #6765: Infinite installation loop with AWS_BEARER_TOKEN_BEDROCK when set - AWS environment variable handling issue
  • #7614: Slow startup when AWS_PROFILE is set - environment variable processing affecting AWS SDK initialization
  • #9607, #9603, #9392: Multiple reports of Amazon Bedrock model not found errors in agent configuration - could be symptoms of this Env.set bug
  • #8737: SAP AI Core connection parameters inconsistent - affects the same sap-ai-core provider mentioned in this issue
  • #10066: Excessive input token usage with Sonnet on AWS Bedrock - could result from improper environment configuration

This bug could be the root cause of several of these reported issues if they involve environment variable-dependent provider SDKs.

@github-actions[bot] commented on GitHub (Jan 31, 2026): This issue might be related to or could help explain several reported problems with provider SDKs. Please check these potentially related issues: - #8559: Enable credential_process and default profile support for Amazon Bedrock - directly involves environment variable credential resolution - #6765: Infinite installation loop with AWS_BEARER_TOKEN_BEDROCK when set - AWS environment variable handling issue - #7614: Slow startup when AWS_PROFILE is set - environment variable processing affecting AWS SDK initialization - #9607, #9603, #9392: Multiple reports of Amazon Bedrock model not found errors in agent configuration - could be symptoms of this Env.set bug - #8737: SAP AI Core connection parameters inconsistent - affects the same sap-ai-core provider mentioned in this issue - #10066: Excessive input token usage with Sonnet on AWS Bedrock - could result from improper environment configuration This bug could be the root cause of several of these reported issues if they involve environment variable-dependent provider SDKs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8146