aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

fix(compute): deliver the Haiku geo profile to ECS agents

Aperta
#811 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
146
Fork
46
Merge medio
3g 10h
PR unite (30g)
24

Descrizione

## Problem

The ECS backend never sets `ANTHROPIC_DEFAULT_HAIKU_MODEL` in `cdk/src/constructs/ecs-agent-cluster.ts`. As a result, `agent/src/config.py` falls back to the hardcoded `us.anthropic.claude-haiku-4-5-20251001-v1:0` profile.

On deployments configured with a non-US `bedrockGeoRegion`, the ECS task role grants the resolved geography but the auxiliary model still calls the US profile. This can fail with `AccessDenied` and contradicts the `resolveBedrockGeoRegion` JSDoc in `cdk/src/constructs/bedrock-models.ts`, which says the main and auxiliary models cannot route through different geographies. The later `haikuInferenceProfileId` JSDoc records this ECS exception.

## Expected behavior

Pass the resolved `haikuInferenceProfileId` to the ECS container as `ANTHROPIC_DEFAULT_HAIKU_MODEL`, matching AgentCore and Lambda MicroVM delivery. Add a synth assertion for a non-US geography.

Refs #764

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in cdk/src/constructs/ecs-agent-cluster.ts e segui come la haikuInferenceProfileId risolta viene fornita ai container ECS; confronta i percorsi di distribuzione di AgentCore e Lambda MicroVM. Esamina la JSDoc correlata in cdk/src/constructs/bedrock-models.ts, quindi aggiungi una synth assertion per una bedrockGeoRegion non-US. Il lavoro è completato quando ECS imposta ANTHROPIC_DEFAULT_HAIKU_MODEL sul profilo risolto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, typescript
Ambito
cloud, infrastructure
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
82/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.