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
- 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.
- Set the model to
ergo-1.0in 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:
- Where it runs: Amazon Bedrock's US cross-Region inference. Requests to Ergo are processed in the United States.
- Price: Bedrock's list price for that inference, with no markup:
- $1.10 per million input tokens and $3.30 per million output;
- $0.033 for cache reads and $1.375 for cache writes.
- Bedrock bills each uncached prompt token as a cache write. In an agent session most of the prompt is read from the cache: 96% in our runs.
- Reasoning: Ergo always reasons at Bedrock's default effort; a reasoning effort your client sets isn't sent. Reasoning tokens are billed as output.
- Not covered by the free trial. Details are on our integrations page.
Limits of these numbers
- 12 tasks, one run each, Python repositories only.
- The first-version and fixed runs used US inference; the direct run used Bedrock's global inference.
- OpenAI-format clients (
/api/v1/chat/completions) still use Bedrock's OpenAI-compatible endpoint, where reasoning can't be handed back. For long agent sessions, use the Anthropic-format endpoint, as Claude Code does.
Per-task data for all three setups: coderouter-ergo-via-coderouter-12-2026-12.json