This repository was archived by the owner on May 29, 2026. It is now read-only.
Add comprehensive AWS Bedrock environment variable support for Anthropic Claude models#1919
Merged
Merged
Conversation
- Add AWS_REGION validation (required) - Support multiple authentication methods: access keys, profiles, Bedrock API keys - Add environment variable definitions to llmsdata.ts - Update documentation with configuration examples - Enhanced error messages for missing credentials Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Log session token usage for temporary credentials - Log optional configuration: ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION - Log prompt caching and model override settings - Enhanced debugging visibility for Bedrock configuration Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Analyze the anthropic LLM support and make sure that all possible configuration for Bedrock are supported.
Deep research:
Configuring Anthropic LLM Tools (Claude) Access
Anthropic’s Claude models can be accessed through multiple platforms. The confi...
Add comprehensive AWS Bedrock environment variable support for Anthropic Claude models
Sep 5, 2025
pelikhan
approved these changes
Sep 5, 2025
Contributor
|
Warning LLM error (403): error
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The current Anthropic Bedrock provider implementation had minimal environment variable support, only relying on AWS SDK's automatic credential discovery without proper validation or configuration options. This made it difficult for users to:
Solution
This PR implements comprehensive AWS Bedrock configuration support that aligns with Anthropic's official documentation and AWS best practices:
Required Environment Variables
AWS_REGION: Now validated as required since Bedrock is region-specificAWS_ACCESS_KEY_ID+AWS_SECRET_ACCESS_KEYfor standard credentialsAWS_SESSION_TOKENfor temporary/assumed role credentialsAWS_PROFILEfor profile-based authenticationAWS_BEARER_TOKEN_BEDROCKfor simplified Bedrock API key authenticationOptional Advanced Variables
ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION: Override region for small/fast modelsDISABLE_PROMPT_CACHING: Control prompt caching behaviorANTHROPIC_MODEL: Override default model selectionChanges Made
env.ts: Added comprehensive validation and error handling for all AWS Bedrock environment variables with clear error messagesllmsdata.ts: Documented all supported environment variables for the CLI configure commandanthropic-bedrock.mdxwith complete setup instructions and configuration examplesExample Usage
Validation
This implementation ensures users have full control over their Bedrock configuration while maintaining the simplicity of the AWS SDK's automatic discovery when appropriate.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.sheetjs.comnode /home/REDACTED/.local/share/pnpm/.tools/pnpm/10.12.3/bin/pnpm install(dns block)esm.ubuntu.com/usr/lib/apt/methods/https(dns block)example.comhttps://api.github.com/markdownnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/branchesnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/contents/README.mdnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/contents/packages%2Fcore%2Fsrcnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/git/blobsnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/git/ref/heads%2Ftest-ignorenode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/issuesnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/labelsnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/languagesnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/pullsnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/pulls/999999node (vitest 2)(http block)node (vitest 3)(http block)https://api.github.com/testnode (vitest 3)(http block)node (vitest 2)(http block)microsoft.github.ionode (vitest 3)(dns block)node (vitest 2)(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.