JOURNAL

Amazon Ergo: what it is, how to use it, where it fits

Amazon Ergo is an open-weight coding model on Bedrock that you can also self-host and fine-tune. How to call it, wire it into OpenCode, Codex and Claude Code, what a session costs, and which projects it suits. Based on the official docs, two days after launch.

Amazon Ergo cover: open-weight coding model on Bedrock

Read with AI

Choose content to copy and paste into your AI assistant. Nothing is sent automatically. CMS content is converted to Markdown; original Markdown is used when available.

Video walkthrough of this post (12 minutes, AI voice, captions)

Short on time? Watch the 2-minute version or the vertical cut for phones.

On 1 December 2026 Amazon released Amazon Ergo, an open-weight LLM built by the Amazon Frontier Model Research (FMR) team and aimed at software engineering and agentic workflows. Unlike Amazon’s earlier Nova models, Ergo runs serverless on Amazon Bedrock, and you can also download the weights to host and fine-tune it yourself.

That combination is what makes it worth a look. A model you can call by the token today, pull into your own VPC tomorrow and fine-tune on your own code later is a different proposition from a closed API. Amazon is pitching it squarely at coding agents, and the Bedrock docs already ship configs for OpenCode, Codex CLI and Claude Code.

Note: this post is based on Amazon’s official docs, the Bedrock model card and the Hugging Face model card. I am publishing it two days after launch and I have not run Ergo yet, so there are no hands-on results here. Every number below comes from those sources, and the last sections list where they disagree or stay silent.

What you get from this post

  • A one-table summary of what Ergo is, and an honest reading of the benchmarks Amazon published.
  • Working code for calling Ergo on Bedrock through the Responses, Converse and InvokeModel APIs, plus the IAM policy you need.
  • Configs for OpenCode, Codex CLI and Claude Code (through a LiteLLM proxy), with what to check after each step.
  • The price table, a worked cost estimate for one agent session, and why self-hosting is out of reach for most teams (including on a 128 GB Mac Studio).
  • How Ergo fits six kinds of project, a pre-adoption checklist and the open questions in the docs.

What Ergo is

AttributeValue
ArchitectureMixture-of-Experts transformer, 256 routed experts + 1 shared, 8 active per token
Parameters1.1T total, 55B active per token
Context window1M tokens (1,048,576)
Max output128K tokens (131,072)
ModalityText in, text out (cannot read images, screenshots or diagrams)
ReasoningAlways on; reasoning_effort = low / medium / high / xhigh / max (no none)
Speed on Bedrock~400 output tokens/s; Turbo mode ~2,200 tokens/s (limited preview)
LicenseAmazon Ergo Open-Weights License: commercial use, fine-tuning and redistribution allowed, subject to an acceptable use policy
Release date2026-12-01

There are three ways to use it:

  1. Amazon Bedrock (serverless, pay per token). The fastest route, with zero data retention and zero operator access.
  2. Self-host from Hugging Face (Amazon-FMR/Ergo) with vLLM or SGLang.
  3. Fine-tune on SageMaker AI with recipes AWS provides, then deploy back to Bedrock or a SageMaker endpoint.

Where Ergo is strong and where it is not

By Amazon’s own numbers, Ergo leads the US open-weight models on the seven coding benchmarks Amazon chose, and beats Kimi K3.1 Pro clearly on its internal long-task benchmarks:

BenchmarkErgoBest other open-weight
AI SWE (internal, pass@1)65.458.6 (Kimi K3.1 Pro)
Ultra Long Horizon (internal)20.513.1 (Kimi K3.1 Pro)
Code Quality (internal, rubric)32.128.1 (Kimi K3.1 Pro)
DeepSWE (pass@1)74.277.9 (Kimi K3.1 Pro)
Terminal-Bench 4.0 (pass@1)46.263.3 (Kimi K3.1 Pro)
ProgramBench23.524.1 (Kimi K3.1 Pro)

Read this table carefully. The three benchmarks where Ergo leads by the widest margin are all Amazon’s internal ones. On the public benchmarks, DeepSWE and Terminal-Bench, Kimi K3.1 Pro still scores higher, and on Terminal-Bench by a lot. Against closed models the gap is wider still: on AI SWE, Claude Opus 5.5 scores 85.3 and GPT-6 Astra 80.8.

The stronger argument is cost and speed. On AI SWE, Ergo averages 14.3 minutes and $1.41 per task, against 21.7 minutes and $1.58 for Kimi K3.1 Pro.

The model card is upfront about the limits:

  • Text only.
  • Reasoning is always on, so even simple tasks spend output tokens on it.
  • First-attempt accuracy is lower than the strongest closed models.
  • General and scientific knowledge is weaker.
  • It can write code that looks right but runs wrong.

Amazon’s own advice follows from that last point: let the agent run the tests for its own changes.

Calling Ergo on Amazon Bedrock

Request path for Amazon Ergo on Bedrock: an app or coding agent calls the bedrock-runtime endpoint through the OpenAI-compatible /openai/v1 path or the Converse and InvokeModel APIs, the request goes to the global.amazon.ergo-1.0 or us.amazon.ergo-1.0 inference profile, which routes it to a destination region where Ergo runs
Every Ergo call goes through an inference profile, which picks the region that actually runs the model.

Model IDs and regions

The base model ID amazon.ergo-1.0 cannot be called directly; it returns a 400. You have to use an inference profile:

Profile IDScope
global.amazon.ergo-1.0Global cross-region inference, callable from most commercial regions, including ap-southeast-1 (Singapore)
us.amazon.ergo-1.0US only; all source regions route to us-east-2

There is no in-region inference. Global CRIS is not yet available in ap-east-1, me-central-1, me-central-2 or me-south-1.

This matters most for teams outside the US. With the global. profile, your request may be processed in a region other than the one you called. If your data has residency requirements, check this before you send anything (the checklist below repeats it).

Authentication and IAM

The simplest path is to create a Bedrock API key in the console and put it in the AWS_BEARER_TOKEN_BEDROCK environment variable. For production workloads, use a short-term token instead:

from aws_bedrock_token_generator import provide_token
token = provide_token(region="us-west-2")

The minimum IAM policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeModel",
        "bedrock:InvokeModelWithResponseStream"
      ],
      "Resource": [
        "arn:aws:bedrock:*:*:inference-profile/us.amazon.ergo-1.0",
        "arn:aws:bedrock:*:*:inference-profile/global.amazon.ergo-1.0",
        "arn:aws:bedrock:*::foundation-model/amazon.ergo-1.0"
      ]
    }
  ]
}

Note that the policy lists both inference profiles and the underlying foundation model. The profile routes the call to the model, so the model ARN has to be allowed too.

Check: run echo ${AWS_BEARER_TOKEN_BEDROCK:+set} in the shell you will use. It should print set. If the variable is empty, every call below fails with 403 UnrecognizedClientException.

The four supported APIs

Ergo accepts both API families: the OpenAI-compatible ones (Responses and Chat Completions) and Bedrock’s own (Converse and InvokeModel). The Anthropic Messages API is not supported directly, which matters later for Claude Code.

Responses API through the OpenAI SDK (pip install -U openai):

import os
from openai import OpenAI

region = "us-west-2"
client = OpenAI(
    api_key=os.environ["AWS_BEARER_TOKEN_BEDROCK"],
    base_url=f"https://bedrock-runtime.{region}.amazonaws.com/openai/v1",
)

resp = client.responses.create(
    input="Can you explain the features of Amazon Bedrock?",
    model="global.amazon.ergo-1.0",
)
print(resp.output_text)

Check: the script prints a plain-text answer about Bedrock. A 400 means you used the base model ID; a 403 means the token or IAM policy is missing.

Converse API through boto3 (pip install boto3):

import boto3

client = boto3.client('bedrock-runtime', region_name='us-west-2')
response = client.converse(
    modelId='global.amazon.ergo-1.0',
    messages=[
        {
            'role': 'user',
            'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}]
        }
    ]
)
print(response)

Check: the script prints the full response dict. Look for the output key holding the assistant message, and for stopReason. If stopReason is "max_tokens" and the text is empty, the output limit is too low (see the gotchas below).

InvokeModel:

import json
import boto3

client = boto3.client('bedrock-runtime', region_name='us-west-2')
response = client.invoke_model(
    modelId='global.amazon.ergo-1.0',
    body=json.dumps({
            'messages': [{ 'role': 'user', 'content': 'Can you explain the features of Amazon Bedrock?'}],
            'max_tokens': 8192
    })
)
print(json.loads(response['body'].read()))

Check: the script prints the parsed JSON body of the response. The example sets max_tokens to 8192, the minimum the docs recommend.

Which API to pick:

  • New code, or code that switches between providers: Responses or Chat Completions through the OpenAI SDK. You only change base_url and model.
  • Systems already built on Bedrock that need Guardrails, invocation logs and one interface across Bedrock models: Converse.

What is supported and what is not yet

SupportedNot yet
Streaming, tool use (client-side), web search (server-side tool)Knowledge Bases
Structured outputs, system promptIntelligent prompt routing
Prompt caching (implicit and explicit)Count tokens
Batch inference, application inference profilesWatermarking
Bedrock Guardrails, invocation logs, summarized reasoning

Two API gotchas

  • Set the output limit to at least 8,192 tokens. The model always reasons, so a low limit gets spent on reasoning and you receive an empty answer with finish_reason: "length".
  • Every request reserves its full output limit against your account quota. Setting max_tokens to 128K on every call gets you throttled (429) much earlier than your actual token use would suggest.

So the sensible default sits between the two: high enough for reasoning plus the answer, nowhere near the 128K ceiling unless the task really needs it.

Ergo as the model behind a coding agent

This is the use case Amazon is targeting. The Bedrock docs include setup guides for OpenCode, Codex CLI and Claude Code. Kiro is named as compatible, but there is no configuration guide for it yet. If you already run agents from several providers side by side, Ergo slots in as one more backend; I wrote about that setup in running agents across multiple providers in parallel.

OpenCode

~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "bedrock-runtime": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Amazon Bedrock",
      "options": {
        "baseURL": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1",
        "apiKey": "{env:AWS_BEARER_TOKEN_BEDROCK}"
      },
      "models": {
        "global.amazon.ergo-1.0": {
          "name": "Ergo 1.0",
          "limit": { "context": 1048568, "output": 131072 },
          "options": { "reasoningEffort": "medium" }
        }
      }
    }
  },
  "model": "bedrock-runtime/global.amazon.ergo-1.0"
}

Run opencode in your project directory. Switch models with /models.

Check: inside OpenCode, /models lists Ergo 1.0 under the Amazon Bedrock provider, and it is selected by default because of the top-level "model" key. Ask it something small; a 403 here points back to the token.

Codex CLI

Install with npm i -g @openai/codex or brew install codex, then edit the config:

~/.codex/config.toml

model = "global.amazon.ergo-1.0"
model_provider = "bedrock-runtime"
model_reasoning_effort = "medium"
web_search = "disabled"
model_context_window = 1048568

[model_providers.bedrock-runtime]
name = "Amazon Bedrock"
base_url = "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1"
env_key = "AWS_BEARER_TOKEN_BEDROCK"
wire_api = "responses"

Two lines in there are not optional. web_search = "disabled" is required because Codex cannot use Bedrock’s server-side tools. And Codex does not read the region from your AWS CLI profile, so add export AWS_REGION=us-west-2 to your shell profile.

Check: open a new shell, confirm echo $AWS_REGION prints us-west-2, then run codex in a project. The session should report global.amazon.ergo-1.0 as its model and answer a simple prompt.

Claude Code through a LiteLLM proxy

Claude Code speaks the Anthropic Messages API, and Ergo does not support it. The AWS guide solves this with a local LiteLLM proxy that translates Messages calls into the Responses API.

Note: this works as AWS documents it, but Anthropic does not support routing Claude Code to non-Claude models through a gateway. You are on your own if something breaks on the Claude Code side.

~/ergo-claude-code/litellm.yaml

model_list:
  - model_name: global.amazon.ergo-1.0
    litellm_params:
      model: openai/global.amazon.ergo-1.0
      api_base: https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1
      api_key: os.environ/AWS_BEARER_TOKEN_BEDROCK
      extra_body:
        reasoning:
          effort: medium
litellm_settings:
  drop_params: true
general_settings:
  master_key: sk-ergo-local

sk-ergo-local is just a string you choose for the local proxy, not a real credential. Start the proxy:

uv tool run --from 'litellm[proxy]' litellm \
  --config ~/ergo-claude-code/litellm.yaml --host 127.0.0.1 --port 4000

Check: the proxy stays in the foreground and listens on 127.0.0.1:4000. Leave it running in its own terminal.

Then the launcher (remember chmod +x):

~/ergo-claude-code/claude-ergo

#!/usr/bin/env bash
export ANTHROPIC_BASE_URL="http://127.0.0.1:4000"
export ANTHROPIC_AUTH_TOKEN="sk-ergo-local"
export ANTHROPIC_MODEL="global.amazon.ergo-1.0"
export ANTHROPIC_DEFAULT_OPUS_MODEL="global.amazon.ergo-1.0"
export ANTHROPIC_DEFAULT_SONNET_MODEL="global.amazon.ergo-1.0"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="global.amazon.ergo-1.0"
export CLAUDE_CODE_SUBAGENT_MODEL="global.amazon.ergo-1.0"
export CLAUDE_CODE_MAX_CONTEXT_TOKENS="1048568"
unset CLAUDE_CODE_USE_BEDROCK
exec claude "$@"

If your ~/.claude/settings.json already sets env values such as ANTHROPIC_MODEL or CLAUDE_CODE_USE_BEDROCK, those override the launcher. Run it with --setting-sources project,local to skip user settings.

Check: start a session with ~/ergo-claude-code/claude-ergo --setting-sources project,local and send a prompt. The request should show up in the LiteLLM terminal. If it never reaches the proxy, a user setting is still overriding the launcher.

My read: it runs, but you add a proxy to maintain, and features that depend on the Messages API may not survive the translation layer intact. Combined with the support caveat above, OpenCode or Codex is the shorter path if you mainly want to try Ergo inside a coding agent.

Troubleshooting

ErrorCause and fix
400 when using amazon.ergo-1.0Use the global. or us. profile
403 AccessDeniedExceptionMissing the IAM permissions from the policy above
403 UnrecognizedClientExceptionAWS_BEARER_TOKEN_BEDROCK not set or expired
429 ThrottlingExceptionQuota exhausted; lower the output limit or request a quota increase
Empty answer, stopReason: "max_tokens"Raise the output limit to ≥ 8,192

Cost

On-demand Bedrock prices (USD per 1M tokens):

ProfileInputOutputCache readCache write (TTL 30 min)
Global CRIS$1.00$3.00$0.03$1.25
US CRIS$1.10$3.30$0.033$1.375

The pricing page lists Standard, Flex and Batch at the same price. That breaks the usual pattern where batch costs about 50% less, so verify it before you design a batch pipeline around a discount. Turbo mode has no published price yet.

A worked estimate for one agent session

This is my own estimate from list prices, not a measurement. Assumptions: across many turns the agent reads 3M input tokens in total, 85% of them are cache hits, it generates 150K output tokens (reasoning included), and it uses the Global profile.

ComponentTokensUnit priceCost
Cache write (new input)450K$1.25$0.56
Cache read2.55M$0.03$0.08
Output150K$3.00$0.45
Total~$1.09

That lands in the same range as the $1.41 per task Amazon reports. Two takeaways:

  • Prompt caching decides most of an agent’s bill. Without the cache, those 3M input tokens would cost $3.00 instead of $0.64.
  • Output weighs more than usual. Because reasoning cannot be turned off, output tokens take a bigger share than they would with a model that lets you disable reasoning.

If you want the wider picture on keeping agent spend and access under control, I covered it in operating agents: cost and security.

The self-hosting math

Self-hosting only makes sense when your traffic is very large and steady, or when you must run inside your own infrastructure. The checkpoints are big: MXFP4 is 626 GB, MXFP8 1.17 TB, BF16 2.22 TB. The docs do not publish a minimum GPU configuration, but at that size you need at least one multi-GPU node with high-end cards running around the clock. At $1 input and $3 output per million tokens, Bedrock will be cheaper for most teams.

I did try to plan a local run on my Mac Studio M1 Ultra, which has 128 GB of unified memory and about 312 GB of free disk. It cannot work. The smallest checkpoint alone is twice the free disk and roughly five times the memory. The documented serving paths are vLLM and SGLang, the SGLang Docker example uses --gpus all, and the docs mention no MLX or Apple Silicon build. On a Mac, your options are Bedrock or a rented multi-GPU node. If you want a model that actually runs on Apple Silicon, see my earlier post on local LLMs with MLX on Apple Silicon.

Applying Ergo to different kinds of project

1. Coding agents for a product team

Good fit for: new features, backend work, writing tests, debugging, prototypes.

  • Use Ergo through OpenCode or Codex on tasks that have automated tests, so the agent can verify its own work. This is the most important condition, because Ergo’s first-attempt accuracy is below the top closed models.
  • Keep reasoning_effort = medium as the default and raise it to high or xhigh only for hard tasks.
  • Split the work into two tiers: the strongest closed model for design and review, Ergo for high-volume execution. Ergo is roughly an order of magnitude cheaper than the top closed models, so the execution tier is where you save the most.

2. Migrating and modernising a legacy codebase

Good fit for: framework upgrades, language changes, splitting a monolith, wide refactors.

A 1M-token context fits most of a codebase in one pass, and Ultra Long Horizon is where Ergo leads the open-weight field most clearly (keeping in mind it is an internal benchmark). A workable sequence:

  1. Run one pass over the whole repo to produce a migration plan and a list of modules in dependency order.
  2. Put the shared context (coding conventions, architecture, the plan) at the start of the prompt so it is served from cache at $0.03.
  3. Hand modules to the agent one at a time; each one must pass build and tests before it merges.

The main risk is code that looks right but runs wrong. Do not allow automatic merges if the old module has low test coverage; write characterization tests before you migrate it.

3. DevOps and operations

Good fit for: writing IaC, automating deployments, analysing logs and incidents.

  • Load logs, configs and runbooks into the long context and let Ergo look for the root cause and propose a fix.
  • Use structured outputs so the analysis comes back in a fixed schema (severity, root cause, recommendation) that you can push straight into your ticketing system.
  • Keep the rule: Ergo proposes scripts and IaC, humans review and run them. Do not give the agent write access to production.

4. Batch text-processing pipelines

Good fit for: classifying, extracting from and summarising large volumes of text.

Ergo can do this, but it needs more thought than the cases above:

  • Reasoning is always on, so for short, simple tasks the output token count rises noticeably compared with a small non-reasoning model.
  • General knowledge is not Ergo’s strength.
  • Batch is not cheaper than on-demand, according to the current pricing page.

Run Ergo and a small model side by side on about 200 labelled samples and compare quality and cost per sample before you choose. For structured extraction from long documents, structured outputs and the 1M-token context are a real advantage.

5. Sensitive data and data sovereignty

There are two options, depending on how strict your requirements are.

  • Bedrock: zero data retention, zero operator access, runs on AWS Nitro, prompts are not used to train models, and output comes with IP indemnification. That covers most commercial security requirements. The catch is that only cross-region inference exists, so your data may be processed outside the region you call.
  • Self-host with vLLM or SGLang inside your own VPC: full control over where processing happens, in exchange for heavy infrastructure cost, and safety evaluation becomes your job.

To start a server with vLLM:

pip install vllm
vllm serve "Amazon-FMR/Ergo"

or with SGLang:

pip install sglang
python3 -m sglang.launch_server --model-path "Amazon-FMR/Ergo" --host 0.0.0.0 --port 30000

Both expose an OpenAI-compatible endpoint (/v1/chat/completions), so code written for Bedrock through the OpenAI SDK only needs a new base_url. Recommended sampling: temperature 1.0, top_p 0.99.

Check: once the server has loaded the weights, a Chat Completions request to /v1/chat/completions on its port returns an answer. Given the checkpoint sizes above, this only happens on a multi-GPU node, not on a laptop or a single workstation.

6. Fine-tuning for your own domain

Good fit for: teams with a large internal codebase or framework that general models do not know, or teams that want the agent to follow house conventions.

SageMaker AI provides recipes for Ergo: SFT with LoRA, DPO, RLVR/RLAIF, and multi-turn RL for agents. There are three compute tiers:

  • Serverless: pay per token or per job.
  • Training Jobs: you pick the instance, billed per second.
  • HyperPod: long-lived clusters on EKS or Slurm.

Training data stays in your S3, in the region you choose, and the resulting weights are not used to train other models.

The sensible order: start with prompt engineering and context (conventions, worked examples). Fine-tune only once you have an eval set that measures the gap, and the gap does not close with better prompts.

Common mistakes

  • Calling the base model ID. amazon.ergo-1.0 returns a 400. Always call global.amazon.ergo-1.0 or us.amazon.ergo-1.0.
  • Output limit too low. Below 8,192 tokens the reasoning eats the budget and you get an empty answer that ends with finish_reason: "length" or stopReason: "max_tokens".
  • Setting max_tokens to 128K everywhere. The quota reserves the full limit per request, so you hit 429 long before you use that many tokens.
  • Leaving Codex on its defaults. Without web_search = "disabled" and an exported AWS_REGION, Codex will not work against Bedrock.
  • User settings overriding the Claude Code launcher. env values in ~/.claude/settings.json win over the launcher’s exports; run with --setting-sources project,local.
  • Assuming Batch is discounted. The current pricing page lists Batch at the same price as Standard and Flex.

Checklist before you bring Ergo into a project

  • Choose the global. or us. profile, and check the data residency requirements of whatever you send.
  • Create a minimum IAM policy; use short-term tokens in production.
  • Set the output limit to at least 8,192 but do not default to 128K, because quota is reserved by the limit.
  • Turn on prompt caching and put the shared context at the start of the prompt.
  • Every code change the agent makes goes through automated build and tests.
  • Keep a small eval set for your use case and compare Ergo with at least one other model on it.
  • Track cost per application inference profile so you can separate spend by project.
  • If you self-host or fine-tune, plan your own safety evaluation.

Open questions in the docs

At the time of writing, the official docs contradict themselves or say nothing in a few places:

  • The knowledge cutoff is “May 2026” on Bedrock but “June 2026” on Hugging Face.
  • The coding-tools page says the global. profile works from “any commercial AWS Region”, but the region table excludes Hong Kong and the Middle East regions.
  • Turbo mode has no access instructions and no price.
  • Kiro is listed as compatible but has no configuration guide.
  • There are no official hardware requirements for self-hosting.
  • The benchmarks where Ergo leads by the most are Amazon’s internal ones; independent evaluations are worth waiting for.

This is a new product and the docs will move quickly. Check the source pages below before you make a decision.

Sources

Discussion

Comments are reviewed before publication. Your email is kept private.

← Back to allĐọc tiếng Việt