feat: add multi-region support for AWS Bedrock#1897
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds AWS Bedrock region-awareness: new region config and UI labels, DB/provider-key option, model/provider region metadata, endpoint region-prefix logic, region-aware cost/model resolution, selector updates, and accompanying tests and minor dependency update. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add region availability to all AWS Bedrock provider mappings: - All 6 regions: Claude 3.7 Sonnet, Sonnet 4/4.5/4.6, Haiku 4.5, Opus 4.5/4.6 - US only (us-east-1, us-west-2): Opus 4/4.1, 3.5 Haiku/Sonnet, all Meta Llama models Also fix endpoint prefix: derive cross-region inference prefix (us./eu./apac.) from the selected region instead of skipping it, since many newer models are CR-only on AWS Bedrock. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Model names with colons (e.g. v1:0:us-east-1) broke the naive
split(":")[0] region stripping. Add fallback lookup by searching
all model mappings when direct model.id match fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The model lookup in calculateCosts failed for region-expanded
names like "v1:0:us-east-1" because split(":")[0] stripped the
version too. Add fallback that searches expanded providers.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/models/src/models/anthropic.ts
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
apps/api/src/routes/keys-provider.ts (1)
72-81: Consider extracting shared region enum to avoid drift.The
aws_bedrock_regionenum is duplicated betweenproviderKeySchemaandcreateProviderKeySchema. While this works, consider extracting a shared Zod enum constant to ensure they stay in sync:const awsBedrockRegionEnum = z.enum([ "us-east-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", ]);This would also help keep the API schemas in sync with
packages/db/src/schema.tsandpackages/models/src/providers.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/routes/keys-provider.ts` around lines 72 - 81, The aws_bedrock_region enum is duplicated between providerKeySchema and createProviderKeySchema; extract a single shared Zod enum constant (e.g., awsBedrockRegionEnum) and replace the inline enums in both schemas with that constant (update references in providerKeySchema and createProviderKeySchema), and ensure the exported/shared constant is used where other modules (packages/db/src/schema.ts and packages/models/src/providers.ts) need the same region list so the schemas stay in sync.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/playground/src/components/model-selector.tsx`:
- Around line 465-470: The code incorrectly removes everything after the first
colon when computing selectedModelId from selectedModelIdRaw (variable names:
selectedModelIdRaw -> selectedModelId); change the logic so it only strips the
final colon segment (i.e., remove the last :<region> suffix) rather than
split(":")[0], or import and call stripRegionFromModelName from
packages/models/src/region-helpers.ts to derive the region-stripped model id,
ensuring names like "anthropic.claude-3-5-...:0:us-east-1" become
"anthropic.claude-3-5-...:0".
In `@packages/actions/src/get-provider-endpoint.ts`:
- Around line 13-31: The bedrockRegionPrefix function incorrectly maps Middle
East regions; update the branch in bedrockRegionPrefix to return "global." when
region.startsWith("me-") instead of "apac.", leaving other prefixes unchanged;
also consider explicitly handling or documenting regions like "sa-" and "af-"
(currently falling back to "us.") if you want different routing behavior.
---
Nitpick comments:
In `@apps/api/src/routes/keys-provider.ts`:
- Around line 72-81: The aws_bedrock_region enum is duplicated between
providerKeySchema and createProviderKeySchema; extract a single shared Zod enum
constant (e.g., awsBedrockRegionEnum) and replace the inline enums in both
schemas with that constant (update references in providerKeySchema and
createProviderKeySchema), and ensure the exported/shared constant is used where
other modules (packages/db/src/schema.ts and packages/models/src/providers.ts)
need the same region list so the schemas stay in sync.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0c59826e-07de-4c4e-8bc1-f16aca74940b
⛔ Files ignored due to path filters (4)
apps/code/src/lib/api/v1.d.tsis excluded by!**/v1.d.tsapps/playground/src/lib/api/v1.d.tsis excluded by!**/v1.d.tsapps/ui/src/lib/api/v1.d.tsis excluded by!**/v1.d.tsee/admin/src/lib/api/v1.d.tsis excluded by!**/v1.d.ts
📒 Files selected for processing (10)
.env.exampleapps/api/src/routes/keys-provider.tsapps/gateway/src/lib/costs.tsapps/playground/src/components/model-selector.tsxapps/ui/src/components/provider-keys/provider-keys-list.tsxpackages/actions/src/get-provider-endpoint.tspackages/db/src/schema.tspackages/models/src/models/anthropic.tspackages/models/src/models/meta.tspackages/models/src/providers.ts
| /** | ||
| * Derive the AWS Bedrock cross-region inference prefix from a region ID. | ||
| * Many newer models are only available through cross-region inference profiles. | ||
| */ | ||
| function bedrockRegionPrefix(region: string): string { | ||
| if (region.startsWith("us-")) { | ||
| return "us."; | ||
| } | ||
| if (region.startsWith("eu-")) { | ||
| return "eu."; | ||
| } | ||
| if (region.startsWith("ap-")) { | ||
| return "apac."; | ||
| } | ||
| if (region.startsWith("me-")) { | ||
| return "apac."; | ||
| } | ||
| return "us."; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
AWS Bedrock cross-region inference prefix Middle East region
💡 Result:
For AWS Bedrock cross-region inference in Middle East regions (me-central-1 UAE and me-south-1 Bahrain), the prefix for global cross-region inference profiles is "global.". These profiles route inference requests from the source Middle East region to optimal commercial AWS Regions worldwide for higher throughput. Example model ID from me-central-1: global.anthropic.claude-sonnet-4-6 Usage example (Python boto3): bedrock = boto3.client('bedrock-runtime', region_name='me-central-1') model_id = "global.anthropic.claude-sonnet-4-6" response = bedrock.converse(... , modelId=model_id) Supported models include Anthropic Claude Opus 4.6, Sonnet 4.6, Haiku 4.5, Sonnet 4.5, Opus 4.5 as source regions me-central-1 and me-south-1, destination: commercial regions. ARN pattern: arn:aws:bedrock:REGION:ACCOUNT:inference-profile/global.MODEL-NAME Geographic profiles use prefixes like "us.", "eu.", but for Middle East global CRIS, it's "global.". No specific "me." geographic prefix found; global provides worldwide routing.
Citations:
- 1: https://aws.amazon.com/blogs/machine-learning/introducing-amazon-bedrock-global-cross-region-inference-for-anthropics-claude-models-in-the-middle-east-regions/
- 2: https://docs.aws.amazon.com/bedrock/latest/userguide/global-cross-region-inference.html
- 3: https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html
- 4: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html
- 5: https://docs.aws.amazon.com/bedrock/latest/userguide/models-region-compatibility.html
Middle East region should use "global." prefix, not "apac."
AWS Bedrock cross-region inference for Middle East regions (me-central-1, me-south-1) requires the "global." prefix to route requests globally, not "apac.". Update the mapping:
if (region.startsWith("me-")) {
return "global.";
}Additionally, regions like sa- (South America) and af- (Africa) will default to "us." and should either be explicitly mapped or handled based on their available inference profile configurations.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/actions/src/get-provider-endpoint.ts` around lines 13 - 31, The
bedrockRegionPrefix function incorrectly maps Middle East regions; update the
branch in bedrockRegionPrefix to return "global." when region.startsWith("me-")
instead of "apac.", leaving other prefixes unchanged; also consider explicitly
handling or documenting regions like "sa-" and "af-" (currently falling back to
"us.") if you want different routing behavior.
Add unit tests for bedrockRegionPrefix(), region-helpers, and region-aware cost calculation. Update Meta Llama model regions per AWS docs (add us-east-2, us-west-1). Add us-east-2 and us-west-1 to provider config and schemas. Fix missing canvas-confetti dependency in UI app. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/models/src/region-helpers.spec.ts (1)
93-100: Add inheritedoutputPriceassertion for the non-overridden region.The inheritance case currently validates only
inputPrice; addoutputPricetoo so a regression in one direction doesn’t slip through.Diff suggestion
// Singapore inherits parent pricing const singapore = result.find((r) => r.region === "singapore"); expect(singapore?.inputPrice).toBe(0.4 / 1e6); + expect(singapore?.outputPrice).toBe(1.6 / 1e6); // Beijing overrides pricing const beijing = result.find((r) => r.region === "cn-beijing");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/models/src/region-helpers.spec.ts` around lines 93 - 100, The test checks that the "singapore" region inherits inputPrice but misses asserting its inherited outputPrice; update the test by adding an assertion that singapore?.outputPrice equals the parent region's outputPrice (locate the parent via result.find(...) or compare against the known parent value) so the "singapore" variable in the spec is verified for both inputPrice and outputPrice inheritance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/actions/src/get-provider-endpoint.spec.ts`:
- Around line 276-292: The test case in get-provider-endpoint.spec.ts is using
an unsupported me- region ("me-south-1"); update the test to use an
API-supported me- region (replace "me-south-1" with "me-central-1") so the
getProviderEndpoint call and the LLM_AWS_BEDROCK_BASE_URL reflect a valid,
selectable region for the provider schema.
- Around line 184-343: The tests currently assert legacy region-prefixed model
IDs; update the expectations in the get-provider-endpoint tests that call
getProviderEndpoint (the cases for "us-east-1", "us-west-2", "eu-west-1",
"ap-northeast-1", "me-south-1", "ca-central-1" and the streaming case) to assert
direct regional routing: expect the returned endpoint to contain
"/model/anthropic.claude-sonnet-4-5-20250929-v1:0/converse" (or
"/converse-stream" when streaming) instead of
"/model/{us.|eu.|apac.}anthropic..."; keep test inputs the same but change the
expected string to remove the legacy prefix so tests validate direct region
routing.
---
Nitpick comments:
In `@packages/models/src/region-helpers.spec.ts`:
- Around line 93-100: The test checks that the "singapore" region inherits
inputPrice but misses asserting its inherited outputPrice; update the test by
adding an assertion that singapore?.outputPrice equals the parent region's
outputPrice (locate the parent via result.find(...) or compare against the known
parent value) so the "singapore" variable in the spec is verified for both
inputPrice and outputPrice inheritance.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 550d80be-67b5-48fb-94b8-97d1a69faddc
⛔ Files ignored due to path filters (5)
apps/code/src/lib/api/v1.d.tsis excluded by!**/v1.d.tsapps/playground/src/lib/api/v1.d.tsis excluded by!**/v1.d.tsapps/ui/src/lib/api/v1.d.tsis excluded by!**/v1.d.tsee/admin/src/lib/api/v1.d.tsis excluded by!**/v1.d.tspnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
apps/api/src/routes/keys-provider.tsapps/gateway/src/lib/costs.spec.tsapps/ui/package.jsonpackages/actions/src/get-provider-endpoint.spec.tspackages/db/src/schema.tspackages/models/src/models/meta.tspackages/models/src/providers.tspackages/models/src/region-helpers.spec.ts
✅ Files skipped from review due to trivial changes (4)
- apps/ui/package.json
- apps/api/src/routes/keys-provider.ts
- packages/models/src/providers.ts
- apps/gateway/src/lib/costs.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/db/src/schema.ts
- packages/models/src/models/meta.ts
| it("uses 'us.' prefix for us-east-1 region", () => { | ||
| process.env.LLM_AWS_BEDROCK_BASE_URL = | ||
| "https://bedrock-runtime.us-east-1.amazonaws.com"; | ||
|
|
||
| const endpoint = getProviderEndpoint( | ||
| "aws-bedrock", | ||
| undefined, | ||
| "anthropic.claude-sonnet-4-5-20250929-v1:0", | ||
| undefined, | ||
| false, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| "us-east-1", | ||
| ); | ||
|
|
||
| expect(endpoint).toContain( | ||
| "/model/us.anthropic.claude-sonnet-4-5-20250929-v1:0/converse", | ||
| ); | ||
| }); | ||
|
|
||
| it("uses 'us.' prefix for us-west-2 region", () => { | ||
| process.env.LLM_AWS_BEDROCK_BASE_URL = | ||
| "https://bedrock-runtime.us-west-2.amazonaws.com"; | ||
|
|
||
| const endpoint = getProviderEndpoint( | ||
| "aws-bedrock", | ||
| undefined, | ||
| "anthropic.claude-sonnet-4-5-20250929-v1:0", | ||
| undefined, | ||
| false, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| "us-west-2", | ||
| ); | ||
|
|
||
| expect(endpoint).toContain( | ||
| "/model/us.anthropic.claude-sonnet-4-5-20250929-v1:0/converse", | ||
| ); | ||
| }); | ||
|
|
||
| it("uses 'eu.' prefix for eu-west-1 region", () => { | ||
| process.env.LLM_AWS_BEDROCK_BASE_URL = | ||
| "https://bedrock-runtime.eu-west-1.amazonaws.com"; | ||
|
|
||
| const endpoint = getProviderEndpoint( | ||
| "aws-bedrock", | ||
| undefined, | ||
| "anthropic.claude-sonnet-4-5-20250929-v1:0", | ||
| undefined, | ||
| false, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| "eu-west-1", | ||
| ); | ||
|
|
||
| expect(endpoint).toContain( | ||
| "/model/eu.anthropic.claude-sonnet-4-5-20250929-v1:0/converse", | ||
| ); | ||
| }); | ||
|
|
||
| it("uses 'apac.' prefix for ap-northeast-1 region", () => { | ||
| process.env.LLM_AWS_BEDROCK_BASE_URL = | ||
| "https://bedrock-runtime.ap-northeast-1.amazonaws.com"; | ||
|
|
||
| const endpoint = getProviderEndpoint( | ||
| "aws-bedrock", | ||
| undefined, | ||
| "anthropic.claude-sonnet-4-5-20250929-v1:0", | ||
| undefined, | ||
| false, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| "ap-northeast-1", | ||
| ); | ||
|
|
||
| expect(endpoint).toContain( | ||
| "/model/apac.anthropic.claude-sonnet-4-5-20250929-v1:0/converse", | ||
| ); | ||
| }); | ||
|
|
||
| it("uses 'apac.' prefix for me- regions", () => { | ||
| process.env.LLM_AWS_BEDROCK_BASE_URL = | ||
| "https://bedrock-runtime.me-south-1.amazonaws.com"; | ||
|
|
||
| const endpoint = getProviderEndpoint( | ||
| "aws-bedrock", | ||
| undefined, | ||
| "anthropic.claude-sonnet-4-5-20250929-v1:0", | ||
| undefined, | ||
| false, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| "me-south-1", | ||
| ); | ||
|
|
||
| expect(endpoint).toContain( | ||
| "/model/apac.anthropic.claude-sonnet-4-5-20250929-v1:0/converse", | ||
| ); | ||
| }); | ||
|
|
||
| it("falls back to 'us.' prefix for unknown region prefixes", () => { | ||
| process.env.LLM_AWS_BEDROCK_BASE_URL = | ||
| "https://bedrock-runtime.ca-central-1.amazonaws.com"; | ||
|
|
||
| const endpoint = getProviderEndpoint( | ||
| "aws-bedrock", | ||
| undefined, | ||
| "anthropic.claude-sonnet-4-5-20250929-v1:0", | ||
| undefined, | ||
| false, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| "ca-central-1", | ||
| ); | ||
|
|
||
| expect(endpoint).toContain( | ||
| "/model/us.anthropic.claude-sonnet-4-5-20250929-v1:0/converse", | ||
| ); | ||
| }); | ||
|
|
||
| it("uses converse-stream endpoint when streaming", () => { | ||
| process.env.LLM_AWS_BEDROCK_BASE_URL = | ||
| "https://bedrock-runtime.us-east-1.amazonaws.com"; | ||
|
|
||
| const endpoint = getProviderEndpoint( | ||
| "aws-bedrock", | ||
| undefined, | ||
| "anthropic.claude-sonnet-4-5-20250929-v1:0", | ||
| undefined, | ||
| true, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| "us-east-1", | ||
| ); | ||
|
|
||
| expect(endpoint).toContain( | ||
| "/model/us.anthropic.claude-sonnet-4-5-20250929-v1:0/converse-stream", | ||
| ); | ||
| }); |
There was a problem hiding this comment.
These assertions lock in legacy cross-region model-prefix behavior instead of direct regional routing.
The region-selected cases assert /model/us.|eu.|apac.<model>/.... Per the PR objective, selected regions should route directly to bedrock-runtime.<region>.amazonaws.com and skip legacy prefixing in the model identifier. These tests currently enforce the old behavior.
Suggested test expectation direction
- expect(endpoint).toContain(
- "/model/us.anthropic.claude-sonnet-4-5-20250929-v1:0/converse",
- );
+ expect(endpoint).toContain(
+ "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-sonnet-4-5-20250929-v1:0/converse",
+ );
+ expect(endpoint).not.toContain("/model/us.");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/actions/src/get-provider-endpoint.spec.ts` around lines 184 - 343,
The tests currently assert legacy region-prefixed model IDs; update the
expectations in the get-provider-endpoint tests that call getProviderEndpoint
(the cases for "us-east-1", "us-west-2", "eu-west-1", "ap-northeast-1",
"me-south-1", "ca-central-1" and the streaming case) to assert direct regional
routing: expect the returned endpoint to contain
"/model/anthropic.claude-sonnet-4-5-20250929-v1:0/converse" (or
"/converse-stream" when streaming) instead of
"/model/{us.|eu.|apac.}anthropic..."; keep test inputs the same but change the
expected string to remove the legacy prefix so tests validate direct region
routing.
nebius/qwen3-coder-480b, qwen3-coder-30b, and qwen3-30b-thinking consistently time out in E2E tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nebius status page and model availability confirm these models are stable. CI timeouts were transient. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These models don't exist on Nebius AI Studio API (404 Not Found). They appear on Token Factory pricing but are not available at api.studio.nebius.com. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Region-expanded models (e.g. model:us-east-1) were included as separate E2E test cases, causing 400 errors since CI lacks region-aware provider keys. Now skipped by default, opt-in via TEST_MODELS with region suffix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/gateway/src/chat-helpers.e2e.ts (1)
362-365: Extract the region-skip predicate to avoid logic drift.Line 363 duplicates the same condition used at Line 270. A shared helper would keep
testModelsandproviderModelsbehavior in sync.♻️ Proposed refactor
+function shouldSkipRegionSpecificProvider(provider: ProviderModelMapping): boolean { + return Boolean(provider.region) && !specifiedModels; +} + ... - if (provider.region && !specifiedModels) { + if (shouldSkipRegionSpecificProvider(provider)) { continue; } ... - if (provider.region && !specifiedModels) { + if (shouldSkipRegionSpecificProvider(provider)) { continue; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/gateway/src/chat-helpers.e2e.ts` around lines 362 - 365, Extract the duplicated region-check logic into a single predicate function (e.g., shouldSkipRegion or isRegionMismatch) and replace the inline conditions in both locations that currently use "provider.region && !specifiedModels" (the occurrences inside testModels and providerModels) to call that helper; ensure the helper accepts the same inputs used in both sites (provider and specifiedModels flag) and returns a boolean, then update both call sites to use the helper so the region-skipping behavior remains centralized and in sync.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@apps/gateway/src/chat-helpers.e2e.ts`:
- Around line 362-365: Extract the duplicated region-check logic into a single
predicate function (e.g., shouldSkipRegion or isRegionMismatch) and replace the
inline conditions in both locations that currently use "provider.region &&
!specifiedModels" (the occurrences inside testModels and providerModels) to call
that helper; ensure the helper accepts the same inputs used in both sites
(provider and specifiedModels flag) and returns a boolean, then update both call
sites to use the helper so the region-skipping behavior remains centralized and
in sync.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 53297c7b-8316-4546-b868-f32c35ae1ce4
📒 Files selected for processing (1)
apps/gateway/src/chat-helpers.e2e.ts
Deactivate Qwen/Qwen2.5-Coder-7B-fast and moonshotai/Kimi-K2-Instruct on Nebius — both confirmed absent from the Nebius AI Studio API (api.studio.nebius.com/v1/models). This also fixes the keys-provider.e2e.ts Nebius validation failure, which was selecting the now-deactivated Qwen2.5-Coder-7B-fast as the cheapest validation model. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Deactivate grok-4, grok-4-fast-reasoning, grok-4-fast-non-reasoning — no longer listed in xAI docs (docs.x.ai/docs/models), superseded by grok-4-1-fast and grok-4.20 variants - Fix model names: grok-4.20-beta-0309-* → grok-4.20-0309-* (remove "beta" per xAI docs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # pnpm-lock.yaml
- Fix model selector colon stripping to only remove last :region segment, preserving model names like "anthropic.claude-v1:0" - Use me-central-1 instead of me-south-1 in bedrock region test - Add outputPrice assertion for inherited region pricing test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
regionConfigto the AWS Bedrock provider with 6 regions (us-east-1, us-west-2, eu-west-1, eu-central-1, ap-northeast-1, ap-southeast-1)regionsto Claude Sonnet 4 as a proof of concept (same pattern as Alibaba)aws_bedrock_regionto provider key options, API schemas, and UI labelsHow it works
https://bedrock-runtime.<region>.amazonaws.comregionsarray on the provider mappingexpandProviderRegionscreates separate routing candidates per region (e.g.,anthropic.claude-sonnet-4-20250514-v1:0:us-east-1)LLM_AWS_BEDROCK_API_KEY__<REGION>env varsStill TODO
regionsto remaining AWS Bedrock models (anthropic.ts, meta.ts)aws_bedrock_region_prefixin favor of direct regional endpointsTest plan
pnpm buildstripRegionFromModelNameremoves suffix before sending to AWS🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements
Documentation
Tests
Chores