cd /news/large-language-models/how-to-use-amazon-ergo-in-claude-cod… · home › topics › large-language-models › article
[ARTICLE · art-180042] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=· neutral

How to Use Amazon Ergo in Claude Code, Cursor and Codex

A developer guide details how to connect Amazon's newly released open-weights model, Ergo, to the Codex, Claude Code and Cursor coding agents through Bedrock's OpenAI-compatible endpoint. Ergo, released December 1, 2026 by Amazon Frontier Model Research, is a 1.1-trillion-parameter mixture-of-experts model with 55 billion active parameters, a 1M-token context window and 128K max output, aimed at software engineering and agentic work. Codex connects directly via the Responses API, while Claude Code requires a local LiteLLM proxy to translate Anthropic Messages requests.

recommendation

Point coding agents at Bedrock's OpenAI-compatible endpoint using the global.amazon.ergo-1.0 inference profile, and run a local LiteLLM proxy for Claude Code since Bedrock won't accept Anthropic Messages requests directly.

more in playbook: Working with AI coding agents
by read6 min views15 publishedDec 2, 2026

To use Amazon Ergo in Claude Code, Codex or Cursor, create an Amazon Bedrock API key and call the inference profile global.amazon.ergo-1.0 at https://bedrock-runtime.<region>.amazonaws.com/openai/v1. Codex connects directly over the Responses API. Claude Code needs a local LiteLLM proxy.

Amazon Ergo is Amazon's first open-weights model, released on December 1, 2026 by Amazon Frontier Model Research. The Hugging Face model card describes a 1.1 trillion parameter mixture-of-experts model with 55 billion active parameters per token, a 1M-token context window and 128K maximum output. It's built for software engineering and agentic work, and it's text only in this release.

Three facts shape how you roll it out:

none returns a 400 error. One developer can follow the setup below and be done. A team running Claude Code and Codex agents side by side also needs to decide which tasks go to Ergo and how to keep keys and spend under control. That's the second half of this guide, and it's where Sharkly fits: one board where People assign tasks to coding agents running on their own Computers.

Everything goes through Bedrock's OpenAI-compatible endpoint. Before you touch any tool, do three things from Amazon's coding tools guide:

bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream on the Ergo inference profiles.AWS_BEARER_TOKEN_BEDROCK. amazon.ergo-1.0 can't be called directly, because Ergo runs only through US Geo and Global cross-Region inference.

Tool Protocol How it connects Model name
Codex OpenAI Responses Direct to /openai/v1 global.amazon.ergo-1.0
Claude Code Anthropic Messages LiteLLM proxy on 127.0.0.1:4000 global.amazon.ergo-1.0
Cursor OpenAI Chat Completions OpenAI base URL override global.amazon.ergo-1.0

Codex speaks the Responses API, so it talks to Bedrock with no middle layer. Add this to ~/.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"

Set AWS_REGION=us-west-2 in your shell profile, because Codex doesn't read the Region from your AWS CLI profile. Keep web_search disabled: Amazon's guide marks it required, and Codex throws a web search tool error without it. A startup warning that model metadata wasn't found is harmless.

Claude Code sends Anthropic Messages requests, which Bedrock's OpenAI endpoint doesn't accept. Amazon's fix is a local LiteLLM proxy that translates them. Save this as ~/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

Start it with uv tool run --from 'litellm[proxy]' litellm --config ~/ergo-claude-code/litellm.yaml --host 127.0.0.1 --port 4000. Then launch Claude Code with these variables:

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"
unset CLAUDE_CODE_USE_BEDROCK
claude

sk-ergo-local is a placeholder the proxy checks, not a real credential. Watch your ~/.claude/settings.json: an env block there that sets ANTHROPIC_MODEL or CLAUDE_CODE_USE_BEDROCK overrides the launcher.

Amazon's guide covers Claude Code, Codex, OpenCode and Kiro, but not Cursor. Cursor's custom model setting speaks OpenAI Chat Completions, and Bedrock serves Ergo on that API, so the route to try is: Cursor Settings > Models, add global.amazon.ergo-1.0 as a custom model, paste your Bedrock key as the OpenAI key, and turn on the base URL override with the /openai/v1 address. Test it on a throwaway project before you trust it with real work.

A new model shouldn't take over every agent on its first day. Route by task shape:

Amazon's own limitations list says first-attempt accuracy trails the strongest closed models, and recommends letting the agent test and verify its own changes. Its launch post puts Ergo at 65.4 on Amazon's internal AI SWE benchmark, against 85.3 for Opus 5.5. So give Ergo tasks with a test suite it can run, and keep a stronger model on review. Our guide to routing agent tasks by difficulty covers the pattern.

Bedrock bills per token. Take an agent turn that reads 100K tokens and writes 10K:

Case Input Output Total
No cache 100K × $1/M = $0.10 10K × $3/M = $0.03 $0.13
90K of input cached $0.01 + $0.0027 $0.03 $0.043

Two habits keep that low. Keep sessions on the same files so the cache hits, and set the output limit close to what you need: Amazon notes that each request reserves its full output limit against your account quota. Don't go under 8,192 tokens, though, or reasoning eats the budget and you get an empty answer.

A Bedrock API key belongs to an IAM identity in your AWS account. That's easier for teams than a personal subscription, but pasting one key into five laptops still means one leak exposes everyone's access. Give each Computer its own key or short-term token, scope the IAM policy to the two Ergo profiles, and turn on Bedrock invocation logs if you want a per-request record. Ergo runs with zero data retention on Bedrock, so your prompts aren't stored or used for training.

AWS tells you what the account spent. It doesn't tell you which task spent it. For that you need the work and the runs in one place, which is the gap our post on tracking coding agent spend walks through.

Sharkly doesn't replace Claude Code or Codex; it runs them. An Agent in Sharkly is a configured teammate that executes through a Runtime (Claude Code, Codex and others) on a connected Computer. Sharkly is BYOK, so runs bill to the Bedrock account the Runtime calls, not to Sharkly.

Three settings from the Agents docs make an Ergo rollout manageable:

ANTHROPIC_BASE_URL and the model names in plain variables instead of editing a shared settings.json. For a Codex Agent, point CODEX_HOME at a folder that holds the Ergo config.toml, and keep the Bedrock key in a secret variable. Cursor stays in each developer's editor. The board handles the agent runs.

sharkly computer register. When a run fails with a 429 throttling error or an empty answer, the execution log shows the provider's response, so you can tell a spent quota from an output limit set too low.

You don't have to adopt Amazon Ergo this week:

Setting up Amazon Ergo takes one Bedrock key and ten minutes per tool. Running it across a team takes three decisions: which tasks it gets, which key each Computer uses, and how you'll see what each task cost. Get those right and a new model becomes one more option on the board, not a config change on five laptops. To try it, connect a Computer to Sharkly and create an Ergo variant next to an Agent you already trust.

The weights are free under the Amazon Ergo Open-Weights License, which allows commercial use under an acceptable use policy. Running them yourself takes serious hardware: the MXFP4 download alone is 626 GB. On Bedrock you pay per token.

Claude Code sends Anthropic Messages requests. Bedrock serves Ergo on OpenAI-compatible Responses and Chat Completions APIs, so LiteLLM translates between them.

Not in Amazon's documented setup. Its launcher unsets CLAUDE_CODE_USE_BEDROCK and routes through the proxy.

Any commercial Region works with global.amazon.ergo-1.0. Use us.amazon.ergo-1.0 if requests must stay in US Regions. In-Region inference isn't supported.

No. This release is text only, so keep visual tasks on a multimodal model.

── more in #large-language-models 4 stories · sorted by recency
── more on @amazon 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-use-amazon-er…] indexed:0 read:6min 2026-12-02 · —