Skip to content

[FEATURE] RouterModel — dynamic model selection and routing for Strands agents #2246

@umeshchandani

Description

@umeshchandani

Problem Statement

Problem

Every Strands agent today hardcodes a single BedrockModel. An internal survey
of multiple Strands repositories found almost all instances of this pattern with zero
routing, zero fallback, and zero cost tracking.

Proposed Solution

A RouterModel class that implements the same Model interface as BedrockModel
and is a zero-code-change drop-in:

  # Before
  Agent(model=BedrockModel(model_id="us.anthropic.claude-sonnet-4-6"))

  # After
  Agent(model=RouterModel(deployments=[...], strategy="rate-limit-aware"))

Key routing strategies:

  • rate-limit-aware: TPM/RPM-aware dispatch with cross-region fallback
  • bedrock-ipr: passes Prompt Router ARN as model_id (bridges IPR gap)
  • cost-based: token cost minimization
  • latency-based: TTL-cached response time

Use Case

Prior Art

LiteLLM Router (https://docs.litellm.ai/docs/routing) solves this for
OpenAI-compatible providers. No equivalent exists for Strands.

Bedrock Intelligent Prompt Routing exists as a managed service but is
inaccessible to Strands agents today — this PR would close that gap.

Alternatives Solutions

No response

Additional Context

Questions for Maintainers

  1. Is this on your roadmap?
  2. Would you prefer this upstream in sdk-python or as a separate package?
  3. Should Bedrock-specific strategies (bedrock-ipr) live separately from
    provider-agnostic strategies (rate-limit-aware, cost-based)?

I Am Willing To Contribute

Yes — I have a detailed design doc and can begin with a focused PR for
the provider-agnostic RouterModel core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions