Back to Blog

Amazon Ergo Is Now on CodeRouter, After a Fix That Cut Its Cost per Task by 60%

2026-12-02·4 min read·CodeRouter Team

Disclosure: we build CodeRouter. This post announces a model we now serve, with our own measurements, including the version of it that didn't work well.

Amazon Ergo is now available on CodeRouter as ergo-1.0. Earlier today we measured Ergo in Claude Code: it solved 21 of 30 real repository tasks, the most of six models we've run there, calling Amazon Bedrock directly.

You'd think adding a model to a router is a configuration change. With Ergo, our first version cost almost three times as much per task as calling Bedrock directly. Here is what went wrong, how we fixed it, and how to use Ergo now.

What went wrong

We ran the same Claude Code tasks through CodeRouter that we had run against Bedrock directly. On the 12 tasks that ran to their end in every setup:

Same 12 tasks, Claude Code Solved Cost per task Output tokens Requests with 8K+ output
Bedrock directly 7 $0.32 425K 1
CodeRouter, first version 7 $0.92 2.0M 60
CodeRouter now 6 $0.37 449K 0

The results were the same, but the first version produced almost five times the output, and some requests ran all the way to the 32K output limit.

The cause was reasoning. Ergo always thinks before it answers. Bedrock hands that reasoning back in encrypted form, and Claude Code sends it back with the next request, so the model can pick up where it left off. Our first version used Bedrock's OpenAI-compatible endpoint, which doesn't return the reasoning at all. Claude Code had nothing to send back, so on every turn Ergo started its thinking from scratch. Over a short session that barely shows. Over a 70- to 90-turn coding session it compounds: the median output per request rose from 333 tokens to 826.

The fix

Claude Code requests (/v1/messages) to Ergo now go through Bedrock's Converse API. Ergo's reasoning comes back as redacted_thinking blocks, Claude Code returns them with the conversation as it does for Claude's own reasoning, and Ergo reads its earlier reasoning on the next turn. CodeRouter passes the blocks through unchanged and never sends Ergo a block another model wrote.

On the same 12 tasks the cost per task fell from $0.92 to $0.37. That is 16% above calling Bedrock directly: the US-only inference we use is priced 10% above Bedrock's global inference, and the rest is run-to-run variation. Ergo solved 6 tasks against 7 directly; that one-task difference is within the noise of a single run.

How to use Ergo on CodeRouter

  1. Switch your account or key to Direct mode. In the default smart-routing mode a model name is treated as a ceiling, not a choice; smart routing doesn't use Ergo.
  2. Set the model to ergo-1.0 in Claude Code:
export ANTHROPIC_BASE_URL=https://www.coderouter.io
export ANTHROPIC_AUTH_TOKEN=cr_YOUR_KEY_HERE
export ANTHROPIC_MODEL=ergo-1.0
export ANTHROPIC_DEFAULT_OPUS_MODEL=ergo-1.0
export ANTHROPIC_DEFAULT_SONNET_MODEL=ergo-1.0
export ANTHROPIC_DEFAULT_HAIKU_MODEL=ergo-1.0
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
claude

What to know:

Limits of these numbers

Per-task data for all three setups: coderouter-ergo-via-coderouter-12-2026-12.json

Related reading

Try phase-aware routing on your own workload

One base URL for Claude Code, Cursor or Aider. Free trial, no credit card.

Start free trial

Get weekly AI cost optimization tips

Join developers cutting their agent bills