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

Aberta
#1,189 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
8.1k
Forks
1.3k
Métricas de merge de PRs
Métricas de PR pendentes

Descrição

## 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`.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.