anthropics / anthropics/claude-agent-sdk-python
Bedrock: AU regions (ap-southeast-2/4) only probe & suggest `apac.*` profiles — no `au.*` branch, steering AU data-residency users to the wrong profile family
- 主要語言
- Python
- 星號
- 8.1k
- 分支
- 1.3k
- PR 合併指標
- PR 指標待擷取
描述
## Summary
When the SDK is used with Bedrock (`CLAUDE_CODE_USE_BEDROCK=1`) in an **Australian** AWS region (`ap-southeast-2` / `ap-southeast-4`), the bundled CLI's region → inference-profile-prefix mapping resolves `ap-*` to the **`apac`** prefix, with **no branch that yields `au`**. As a result, in AU regions:
1. the Bedrock **model-discovery probe sweep** queries only `apac.*` inference profiles (never `au.*`), and
2. the **"model … is not available on your bedrock deployment. Try switching to …"** suggestion always recommends an `apac.anthropic.*` profile.
This is **cosmetic / UX, not a functional block** — an explicitly-requested `au.*` model *is* sent to Bedrock verbatim (confirmed by wire capture: the CLI POSTs `/model/au.anthropic.claude-sonnet-4-6/invoke` unchanged, and any failure there is a genuine AWS-side 404/403, e.g. model not entitled). The problem is purely the discovery probes and the suggestion text.
## Why it matters
Australia-only **data residency** specifically requires the `au.*` cross-region inference profiles, which route only within Australia (`ap-southeast-2` + `ap-southeast-4`). The `apac.*` profiles are Asia-Pacific-wide (may route to Tokyo/Seoul/Singapore/etc.), so they **do not** satisfy an AU-only residency posture. The current behaviour actively steers exactly the users who need `au.*` (AU data-residency deployments) toward the non-compliant `apac.*` family, and wastes discovery calls probing `apac.*` in a region where `au.*` is the correct choice.
## Environment
- `claude-agent-sdk` 0.2.131
- bundled CLI (`_cli_version.py`) 2.1.223
- AWS regions: `ap-southeast-2`, `ap-southeast-4`
## Suggested fix
Add an `au` branch to the region → inference-profile-prefix mapping so that in `ap-southeast-2` / `ap-southeast-4` the discovery sweep and the "try switching to …" suggestion use (or at least include) the `au.*` profiles, rather than defaulting every `ap-*` region to `apac`.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。