Claude Code 2.1.198: anthropicAws Provider and Failover Chain Advance Are the Gateway Changes Every Operator Must Know

Claude Code 2.1.198 adds the Claude Platform on AWS as a native gateway upstream, advances the failover chain on model-not-found errors, and auto-refreshes AWS STS tokens — three changes that directly affect how routing teams configure provider fallback.

TheRouter Newsroomvia Anthropic Claude Code
Claude Code 2.1.198 gateway failover and AWS routing provider diagram

When a model is unavailable, does your failover chain kick in automatically, or does Claude Code stop and wait? Claude Code 2.1.198 changes that answer for teams routing through a custom gateway. The two gateway-level changes in this release — native anthropicAws provider support and automatic failover-on-model-not-found — are small in changelog text but significant in production behavior.

What happened

Claude Code 2.1.198 ships several dozen changes, but the routing-layer changes are the ones operators need to act on:

Gateway: added Claude Platform on AWS (anthropicAws) as an upstream provider. Teams configuring claude gateway or a compatible proxy can now reference anthropicAws as a named upstream without manually constructing Bedrock-compatible endpoint strings.

Model-not-found responses now advance the failover chain. Previously, if an upstream returned a "model not found" error — because the gateway's model catalog was stale, the provider dropped a model, or the alias changed — Claude Code would surface the error to the user. Now the error advances to the next provider in the fallback list, the same way a rate limit or timeout does.

Fixed: Claude Platform on AWS and Mantle sessions dead-ending with "Please run /login" when STS token expires. The new awsAuthRefresh mechanism runs automatically before the token goes stale, avoiding the forced re-login loop that affected long-running background agents on Bedrock and Mantle.

Other notable changes in 2.1.198 outside the gateway layer: background agents launched from claude agents now auto-commit, push, and open a draft PR when they finish code work (instead of stopping to ask); the built-in Explore agent inherits the main session's model capped at Opus; subagents and context compaction inherit extended thinking configuration; and transient network errors (ECONNRESET) now retry with backoff instead of aborting.

Why it matters for AI engineering teams

The model-not-found failover change closes a gap in Claude Code's gateway resilience model. Until now, a misconfigured model alias or a provider-side model catalog change could silently strand users with an error message instead of falling back. The new behavior means:

  • Provider catalog changes no longer require operator intervention. If an upstream drops a model ID — as DeepSeek did with deepseek-chat in June 2026, as OpenAI does routinely with snapshot deprecations — the gateway will try the next provider in the chain automatically rather than surfacing a hard error.
  • Alias drift is survivable. Teams that expose a generic alias through their gateway (e.g., best-coder mapping to a specific model) get a second chance if the backing model is renamed or removed upstream.
  • The anthropicAws provider normalizes AWS Bedrock routing. Instead of each operator maintaining their own Bedrock endpoint configuration, anthropicAws gives a stable named provider handle that Claude Code's gateway layer understands natively.

The awsAuthRefresh fix matters for teams running long background agents against Bedrock or Mantle: AWS STS tokens have short TTLs (typically one hour), and previously a token expiry mid-session would force a re-login interrupt that broke any unattended workflow.

The router/operator angle

Treat model-not-found as a soft error, not a hard stop. The 2.1.198 change formally encodes this in Claude Code's gateway protocol. If you operate a custom gateway with a multi-provider fallback list (providers: [anthropic, anthropicAws, google-vertex]), you should now verify your gateway also treats model_not_found (HTTP 404 from the model layer) as a fallback trigger — not just 429 and 5xx. Some AI gateway implementations only advance on rate-limit or server-error status codes; this release makes clear that the full failover contract includes model availability errors.

Audit your Bedrock credential refresh configuration. The awsAuthRefresh fix is automatic in Claude Code 2.1.198, but teams running Claude Code behind a custom gateway that proxies Bedrock credentials need to verify that their credential rotation pipeline does not issue short-lived tokens to gateway sessions without a refresh mechanism. If your gateway does credential injection at session start and never refreshes, the automatic awsAuthRefresh in Claude Code won't help — it only applies when Claude Code itself holds the STS credentials.

Background agents and PR automation change your cost model. The new behavior where background agents auto-commit, push, and open a draft PR means a previously human-gated step now happens autonomously. If you use token budgets or per-session cost caps, factor in the additional API calls from the push/PR creation flow. The agent incurs context usage summarizing its own work to write the PR description.

Subagent extended thinking inheritance is an underappreciated change: before 2.1.198, subagents launched in extended-thinking sessions would revert to standard mode, producing lower-quality delegated output. Now they inherit the thinking configuration, which raises the token ceiling for multi-agent workflows. If you have per-session token budgets, they will be hit faster on thinking-enabled parent sessions with subagents.

What TheRouter users should watch or try

If you route Claude Code traffic through TheRouter, the anthropicAws provider naming is relevant when configuring upstream fallback. Review your routing policy to confirm that model-not-found errors from any provider trigger fallback — not just rate-limit or timeout conditions. The /docs/ routing configuration guide covers provider fallback ordering and error-class mapping.

For teams running background agents on Bedrock, verify you are on Claude Code 2.1.198 to get the awsAuthRefresh fix before deploying long-running unattended workflows.

Help & contact