Skip to content

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

Closed

Description

@dreamorosi

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

Activity

  1. krokoko commented on Nov 20, 2026

    @krokoko
    Contributor

    Triage: this looks resolved on main.

    Resolved by #806 (commit 7f3f3c0), which did not reference this issue. cdk/src/constructs/ecs-agent-cluster.ts resolves bedrockGeoRegion once and sets ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL from it in the environment shared by the build and the planning task definitions, and the task role's inference-profile grants use the same value. The synth assertion asked for is the test bedrockGeoRegion=%s injects both models into BOTH task definitions in cdk/test/constructs/ecs-agent-cluster.test.ts, which runs for global and eu. haikuInferenceProfileId and its JSDoc note about the ECS exception no longer exist (the last mention went with #904, commit e4fbf8a), and the agent's fallback when the variable is unset is global.anthropic.claude-haiku-5-5. Nothing is left open.

    Posted from an automated sweep of the open issues. Each pull request, commit and file named above was checked against main at 3dbfada1. The issue is left open for a maintainer to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions