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

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

Offen
#811 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
143
Forks
46
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
24

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne in cdk/src/constructs/ecs-agent-cluster.ts und verfolge, wie die aufgelöste haikuInferenceProfileId an ECS-Container übergeben wird; vergleiche die Übertragungspfade von AgentCore und Lambda MicroVM. Prüfe die zugehörige JSDoc in cdk/src/constructs/bedrock-models.ts und füge anschließend eine Synth-Assertion für eine nicht-US bedrockGeoRegion hinzu. Als abgeschlossen gilt die Aufgabe, wenn ECS ANTHROPIC_DEFAULT_HAIKU_MODEL auf das aufgelöste Profil setzt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, typescript
Bereich
cloud, infrastructure
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
82/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.