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

Abierto
#1,189 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
8.1k
Forks
1.3k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.