#AI#LLM#AWS#Open-Weight Models#Evaluation

Amazon Ergo: How to Evaluate a New Open-Weight Coding Model Before You Route to It

webhani·

At re:Invent 2026, AWS introduced Amazon Ergo, described in keynote coverage as an open-weight model for coding and knowledge work, built on AWS's Trainium3 hardware and positioned as a balance of capability, speed and cost. We could not find parameter counts, license terms or benchmark methodology in the sources available to us, so this post does not rate the model. Instead it covers what to do whenever a new model arrives: decide whether it belongs in your stack using your own tasks.

Why launch benchmarks don't answer your question

Public benchmarks measure general ability on public problems. Your question is narrower: "Does this model fix bugs in our TypeScript monorepo with our test suite, at a cost and latency we can accept?" Models that tie on a leaderboard can differ sharply on a specific codebase, tool-calling format, or language mix (for us, Japanese comments and commit messages are a real factor).

Open weights add two practical differences from a hosted-only model:

  • You can pin a version. Behavior will not change under you, which helps reproducibility and change management.
  • You choose where it runs. Data residency and privacy requirements may be easier to meet, at the price of operating inference yourself or using a managed host.

Neither of these makes the model good. They make it testable and controllable.

Build a small, honest evaluation set

Collect 20 to 50 tasks from your own history. Good sources are merged pull requests with an associated failing test, or issues your team closed recently. For each task, record:

  • the repository state before the fix,
  • a prompt describing the problem,
  • a command that passes only if the fix is correct.

Verifiable tasks matter. Judging output by reading it invites bias toward fluent answers.

A minimal harness

Most open-weight models can be served behind an OpenAI-compatible endpoint (for example with vLLM or a managed host). The harness below sends each task to any such endpoint and applies the result only if the test passes. It is a sketch: it omits sandboxing, which you must add before running model-written code.

import json, os, shlex, subprocess, tempfile, time
from openai import OpenAI
 
client = OpenAI(base_url=os.environ["MODEL_BASE_URL"], api_key=os.environ["MODEL_API_KEY"])
MODEL = os.environ["MODEL_NAME"]
 
def run_task(task: dict) -> dict:
    start = time.time()
    resp = client.chat.completions.create(
        model=MODEL,
        temperature=0,
        messages=[
            {"role": "system", "content": "Return a unified diff only."},
            {"role": "user", "content": task["prompt"]},
        ],
    )
    patch = resp.choices[0].message.content
    usage = resp.usage
 
    with tempfile.TemporaryDirectory() as work:
        subprocess.run(["git", "clone", "-q", task["repo"], work], check=True)
        subprocess.run(["git", "checkout", "-q", task["base_sha"]], cwd=work, check=True)
        applied = subprocess.run(["git", "apply", "-"], input=patch, text=True, cwd=work).returncode == 0
        passed = applied and subprocess.run(shlex.split(task["test_cmd"]), cwd=work).returncode == 0
 
    return {
        "id": task["id"],
        "passed": passed,
        "seconds": round(time.time() - start, 1),
        "tokens": usage.total_tokens if usage else None,
    }
 
tasks = [json.loads(line) for line in open("tasks.jsonl")]
results = [run_task(t) for t in tasks]
print(f"pass rate: {sum(r['passed'] for r in results)}/{len(results)}")
print(json.dumps(results, indent=2))

Run the same file against your current model and the candidate. Keep temperature at 0 and repeat a few times, since single runs are noisy at this sample size.

What to compare

DimensionWhy it matters
Pass rate on your tasksThe primary signal
Cost per passed taskCheaper per token can still be more expensive per solved task
LatencyInteractive use and background agents have different tolerances
Failure typeMalformed diffs and tool-call errors are fixable by prompting; wrong logic usually is not
VarianceA model that passes 60% consistently beats one that swings between 40% and 80%

Cost per passed task is the figure we use most. A model that needs three attempts to match another's one-shot result is not cheaper, whatever the price list says.

Where an open-weight model usually fits

In client work, we rarely replace a frontier model outright. A more common arrangement is routing by task:

  • Bulk, well-specified work (adding tests, mechanical refactors, docstrings): a cheaper open-weight model, with automated verification.
  • Ambiguous design or cross-cutting changes: the strongest model available, with human review.
  • Sensitive code: a self-hosted model, if your policy forbids sending it to a third party.

Routing only works if each tier has a verification step. Without one, you are saving money by accepting unmeasured risk.

Checklist before adopting any new model

  1. Read the license. "Open weight" does not necessarily mean permissive for commercial use; confirm terms for your case.
  2. Confirm where inference runs and who can see your prompts.
  3. Run your own evaluation and keep the results with the model version.
  4. Start with a low-risk task category and a rollback path.
  5. Re-run the evaluation when the model or your prompts change.

Amazon Ergo may well turn out to be a good fit for some of your workloads. The way to find out is the same as for every other model: a few dozen real tasks, a pass/fail test for each, and the numbers side by side.