Commit f48752a
authored
Construct default Anthropic base URL for Bedrock (grll#9)
* Construct default Anthropic base URL for Bedrock
## Summary
- Automatically constructs the Bedrock API endpoint URL using AWS_REGION when ANTHROPIC_BEDROCK_BASE_URL is not provided
- Added test to document this behavior in test/validate-env.test.ts
- Addresses issues anthropics#32 and anthropics#43 where users encountered 404 errors when using Bedrock integration without explicitly setting
the base URL
## Background
Users of AWS Bedrock integration were encountering 404 API errors when the ANTHROPIC_BEDROCK_BASE_URL was not explicitly set.
This change ensures the URL is automatically constructed using the AWS_REGION, making the integration more user-friendly
and preventing the confusing error messages reported in issues anthropics#32 and anthropics#43.
## Test Plan
- Added test in test/validate-env.test.ts to document the behavior
- Manual testing with AWS Bedrock integration
* test: format test file with prettier to fix CI checks
Ran `bun run format` to ensure proper code formatting and make CI checks pass.
## Test Plan
- Verify formatting with `bun run format:check`
- Ensure all CI checks pass1 parent f99496e commit f48752a
3 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
67 | 85 | | |
68 | 86 | | |
69 | 87 | | |
| |||
0 commit comments