Table of Contents
How AWS Bedrock AgentCore Gateway's model fallback actually works
A throttled model used to mean a 503 landing straight in your agent, and a retry loop some engineer wired in at midnight. Starting October 22, 2026, AWS moved that retry loop into the gateway itself. Bedrock AgentCore Gateway's inference endpoint now speaks Bedrock's native InvokeModel and InvokeModelWithResponseStream APIs, and a gateway rule can define an ordered fallback chain with a circuit breaker, so a dead model gets routed around without the calling app knowing, per AWS's What's New post (Oct 22, 2026).
Before this release, AgentCore Gateway's Bedrock connector only forwarded to Bedrock Mantle, and a plain InvokeModel call had to go straight to Bedrock, skipping the gateway's IAM scoping and routing logs entirely, per DevelopersIO's walkthrough (Oct 25, 2026). That connector gap closed with this release, along with the billing details and two limits worth knowing before you wire it in.
Point your existing client at the gateway
The InvokeModel side is a one-line change. Create a bedrock-runtime client and set its endpoint to the gateway's /inference path; every existing invoke_model and invoke_model_with_response_stream call keeps working, now routed through whatever rules you've written:
import boto3
client = boto3.client(
"bedrock-runtime",
region_name="us-east-1",
endpoint_url="https://<GATEWAY_ID>.gateway.bedrock-agentcore.us-east-1.amazonaws.com/inference",
)
response = client.invoke_model(
modelId="us.anthropic.claude-haiku-4-5-20251001-v1:0",
body=claude_body,
contentType="application/json",
)
That part is new as of this release, per AWS's What's New post. The Bedrock Runtime connector itself still needs the CLI or SDK to create, because as of October 25, 2026 it wasn't yet a selectable option in the gateway console, per DevelopersIO.
The rule: a chain, a trigger, a breaker
Fallback lives on a gateway rule, not in your client code. This is AWS's own example from the Gateway rules documentation: route gpt-5.5 to Bedrock Mantle first, fall back to an OpenAI target on failure, and only then degrade to the smaller gpt-5.4 on the same Mantle target.
aws bedrock-agentcore-control create-gateway-rule \
--gateway-identifier my-gateway-abc1234567 \
--priority 100 \
--description "Prefer gpt-5.5 on bedrock-mantle, fall back to OpenAI, then degrade to gpt-5.4" \
--conditions '[{"matchModels": {"anyOf": [{"value": "gpt-5.5"}]}}]' \
--actions '[{
"routeToTarget": {
"staticRoute": {
"targetName": "bedrock-mantle",
"model": "gpt-5.5",
"fallback": {
"circuitBreaker": {"mode": "ENABLED"},
"triggerOn": {
"statusCodes": ["5XX", "429"],
"errors": ["CONNECTION_ERROR", "FIRST_BYTE_TIMEOUT", "UNROUTABLE"]
},
"firstByteTimeoutMilliseconds": 5000,
"targetFallback": [
{"targetName": "openai"},
{"targetName": "bedrock-mantle", "model": "gpt-5.4"}
]
}
}
}
}]'
One rule does three jobs a team usually codes by hand: triggerOn decides which errors count as a failure (5XX, 429, a dropped connection, or a first byte that never arrives within 5 seconds here), targetFallback names the backup chain in order, and circuitBreaker stops the gateway from retrying a target that's already down. DevelopersIO's own test confirms the behavior: with the primary forced to return 503, three calls that would have failed outright instead came back 200 from the fallback target in 1.57 to 1.93 seconds each, with zero client-side changes, per their walkthrough.
What the circuit breaker changes about your bill
The breaker isn't just a latency trick. It changes what AWS charges you for a failing primary, per the Gateway rules documentation:
| Breaker state | What happens to the request | What gets billed |
|---|---|---|
| Closed (healthy) | Primary gets every request; a failing response triggers the fallback chain | Every attempt, including the failed primary call, counts as a gateway invocation |
| Open (failing) | Primary is skipped outright; the request goes straight to the next destination | The skipped primary is not billed; only the destinations actually attempted are |
| Half-open (recovering) | A small slice of traffic probes the primary; the rest keep skipping it | Probed requests bill as attempts; the rest bill as in the open state |
Gateway API calls, InvokeModel among them, bill at $0.005 per 1,000 invocations, per AWS's AgentCore pricing page. A request that fails on the primary and succeeds on the first fallback is two invocations, not one, because each attempt bills separately; the model or inference cost of each attempt is billed by Bedrock or the model provider on top of that, per the Gateway docs. The breaker's real job is capping how many of those double-billed failures you pay for once it's obvious the primary is down.
Two caps that still mean hand-rolled code somewhere
A fallback chain holds the primary plus one to two alternates. Not an arbitrary list, two, per AWS's own spec on targetFallback. If your failure domain needs a third or fourth backup, that logic goes back in your application.
Streaming is the other wall. Once invoke_model_with_response_stream has sent its first byte, the gateway can't fall back anymore; a stream that dies mid-response returns a partial payload and an error, and the caller has to retry from the top, per AWS's docs. For anything long-running and streamed, the circuit breaker only protects the request that hasn't started yet.
One more operational gap: the caller never learns which target actually answered. That detail lives only in the gateway's routing logs, per AWS's docs, so tracing "why did this response sound different" means pulling logs, not reading a response header.
Step Functions joined as a tool target, not a model route
The same gateway kept shipping that week. On October 29, AWS added Step Functions state machines as a new kind of target, exposed to agents as callable tools through the Model Context Protocol, per AWS's What's New post (Oct 29, 2026). It's a separate target system from the InvokeModel route above, the one that already wires up Lambda functions and OpenAPI specs, now picking up a built-in Step Functions connector as a fourth option, per AWS's connector docs.
Source: aws.amazon.com, captured November 1, 2026.
AWS's own example is a refund workflow: a support agent starts it, and Step Functions runs the eligibility check, manager approval, and credit steps in the same order every run, because the state machine controls the sequence and the agent can't skip or reorder a step, per AWS's post. Standard and Express workflows both work as targets. You don't write a Lambda shim or stand up your own MCP server; the gateway builds the tool schema straight from the state machine you point it at, per AWS's docs.
Ten operations come through the connector, but only four take a state machine you pin when you create the target: StartExecution, StartSyncExecution, ListExecutions, and DescribeStateMachine. The agent never sees which state machine is pinned and can't override it; the gateway rejects any call that tries, per AWS's docs. The remaining six act on an execution ARN or a task token the agent supplies, so they aren't locked to one workflow. Scoping those falls to the gateway's own IAM role instead.
| Operation group | Who names the workflow | What it does |
|---|---|---|
StartExecution, StartSyncExecution, ListExecutions, DescribeStateMachine | You, at setup (pinned) | Start or inspect the one state machine the target points at |
DescribeExecution, StopExecution, GetExecutionHistory | The agent, by execution ARN | Check or stop a specific run; scope with the gateway's IAM policy |
SendTaskSuccess, SendTaskFailure, SendTaskHeartbeat | The agent, by task token | Resume a Standard workflow paused on .waitForTaskToken; the token itself is the only lock, not IAM |
Source: docs.aws.amazon.com, captured November 1, 2026.
That last row in the table is the one worth sitting with. A Standard workflow can pause mid-run on a callback-pattern task, hand a task token to the agent's application (an SQS queue is the usual path), and wait for SendTaskSuccess or SendTaskFailure before it continues, per AWS's docs. That's human-in-the-loop living in the state machine instead of your prompt. No instruction telling the model to "wait for approval" and hope it listens; the workflow itself owns the pause. Express workflows skip this entirely, since the callback pattern only works on Standard.
Setting a target up doesn't mean hand-writing JSON in the console, either. The CLI that configures gateways and targets, @aws/agentcore, reached version 1.0 GA on October 28, the day before this connector shipped, with a dedicated agentcore migrate command for existing projects and a faster cold start, per AWS's CLI release notes (Oct 28, 2026). None of this touches the InvokeModel fallback mechanics above. It's a second, independent target type on the same gateway, billed at the same $0.005-per-1,000-invocation Gateway API rate plus standard Step Functions charges, per AWS's post.
Where this sits next to LiteLLM, Portkey, and Google's answer
Ordered fallback across model providers isn't a new idea. LiteLLM runs the same pattern as a self-hosted open-source proxy, and managed gateways like Portkey and OpenRouter have done it for a while. What AWS shipped is that pattern living inside infrastructure you're already running, with the IAM scoping and audit trail AgentCore already has, instead of a side-car proxy you patch and monitor on your own.
Google took the opposite framing at Cloud Next '26: its Gemini Enterprise Agent Platform puts a Smart Routing layer in front of more than 200 models, including Anthropic's Claude, and optimizes for the cheapest model that clears a quality bar rather than just catching outages, per coverage of the announcement. AWS's gateway rule only catches failures; it doesn't pick a model by cost. That's a narrower job, and it's wired into a gateway you likely already pay for rather than a platform migration.
Turn it on if you're already inside AgentCore. Don't migrate for it alone
If your agents already call Bedrock through AgentCore Gateway, write the rule. It's a few lines of CLI against infrastructure you're already running, and it deletes the retry-and-switch code most teams hand-roll around Bedrock throttling. If you're multi-cloud behind LiteLLM or Portkey today, this isn't a reason to rip that out: those proxies cover providers outside AWS entirely, and you'd be trading a system you already operate for one capped at two fallback targets that only tells you what happened through a log you have to go fetch. The case for switching shows up when your fallback target is itself inside Bedrock, Mantle or Runtime, since AgentCore's IAM scoping and routing logs already cover it and a side-car proxy would just be duplicating what the gateway now does for the cost of one rule. Step Functions joining the same gateway as a tool target on October 29 adds a second reason to stay put: standardizing on AgentCore now also cuts the hand-rolled workflow integrations you'd otherwise maintain, on top of the retry loops this fallback rule replaces.
What changed
- November 1, 2026: Added Step Functions workflows as a second AgentCore Gateway target type, shipped October 29, including the operation list, the pinning rules, and the AgentCore CLI's October 28 v1.0 GA as a tooling aside. Added two dated screenshots of AWS's public pages. Updated the description.
- October 28, 2026: First published, covering the InvokeModel fallback rule, the circuit-breaker billing table, and the two caps on fallback chains.