How to Choose Open Models for Coding Agents

A practical framework for comparing open models on coding tasks, tool-call accuracy, latency, and cost per successful task.
How to Choose Open Models for Coding Agents

Open models can significantly reduce the cost of running large-scale AI applications, like coding agents. When deployed in your own environment, open models also provide more control over sensitive data and allow granular control over throughput/performance tradeoffs. However, deciding which model to use frequently stalls internal teams from making the jump. Engineering teams need to evaluate which model they can trust with their code, what tasks they need the model to complete, and the level of accuracy they need on those tasks.

This post opens a CoreWeave series on building and running coding agents with open models. We’ll work through model selection, cost and capacity planning, security, serving performance, deployment, and operations, building toward a practical reference architecture you can adapt to your team.

In this first post, we outline a decision-making framework for teams to select the right open model for their coding agents, built on four measures: completion rate, tool-call accuracy, cost per successful task, and speed.

Define your coding agent evaluation

Coding agents may tackle a variety of tasks, and thus it's important to narrow down the scope and run evaluations to determine the best fit. When considering the scope of the task, think about the type of work (planning, writing code, or making quick edits), how much context the agent might need, and how costly a mistake can be. Here’s a simple evaluation methodology for deciding on an open model:

Validate tool-call accuracy

A coding agent needs to be able to call the relevant tools to complete its task, including reading files, running commands, and applying certain edits. Dropped tool calls fail silently—the agent doesn’t error out, it just stops reading files or applying edits. For an accurate evaluation, test tool-call accuracy separately from task success, and with the actual harness your team uses, as changing the coding harness can change tool-call accuracy.

Choose a compatible coding harness

An agentic coding harness does a lot of work that can improve the model’s performance across different tasks. For example, a harness can quietly fix the output of a poorly formed tool call. It can also automatically retry failed requests, it can enforce timeouts on calls that run too long, or apply permission rules and sandboxes to limit agentic execution. 

If your developers are already using a harness that works well, then continue to do so. If not, consider the following criteria:

  • Model support
  • Tool call handling
  • Observability 
  • Stability

Some harnesses are vendor-locked to a specific model provider, while others may be more agnostic. The harness should work with the format your model uses for tool calling and be able to handle malformed tool calls gracefully. You should also be able to trace each tool call, retry, and its associated cost, so you can measure tool-call accuracy and cost per completed task. 

Some options for open source harnesses that you can use are OpenCode, Hermes, Cline, Kilo Code, etc with all your models.

Evaluate the inference provider

Once you’ve picked the model and harness, the last variable to choose is the inference provider. Cline, a popular agentic coding platform and harness used across many models and providers, found that for the same model and harness, the inference provider you use impacts your evals due to factors like quantization, TTFT,  throughput, cache hit rates, and price. Cline compared CoreWeave Serverless Inference on GLM 5.2 to general routing on OpenRouter, and found that CoreWeave scored 12.4 percentage points higher (74.2% vs 61.8%) on Terminal-Bench. You can read more about their methodology here.

Compare open models for coding against your current model

Let’s take a look at an example scenario. Consider a platform team whose developers use a coding agent backed by Claude Opus 5.5. The bill is growing, and the team wants to know whether an open model can take over some or all of that work without developers noticing a drop in quality. Following the evaluation methodology described above, we build out the evaluation steps.

Step 1: Build the task set

We build tasks from a repository's merged pull requests, with each task replaying one PR:

  • The agent starts from the commit right before the merge.
  • Its instructions are the PR title and description, plus any issue the PR closes.
  • We grade its attempt against the change that actually merged.

Some PRs tell you very little about how good a coding agent is, so we skip them: dependency bumps, bot commits, docs-only and CI-only changes, and very large PRs. What's left falls into three buckets, which map to the scope question we raised earlier:

  • Quick edits: one file, 25 changed lines or fewer.
  • Features: changes that span multiple files.
  • Planning: the largest features. Here the agent explores the code read-only and writes an implementation plan instead of making changes..

Step 2: Select models to compare

We chose three open models on CoreWeave Serverless Inference, each representing a different kind of candidate.

Model Why It Is in the Lineup Input / Output Price per 1M Tokens* Cached Input Price per 1M Tokens*
GLM 5.3 Flash Small, fast, and cheap; a lower-cost candidate to test tool-call accuracy $0.12 / $0.38 $0.02
Kimi K2.7 Code Purpose-built for coding $0.60 / $3.00 $0.12
DeepSeek V4 Pro Tests whether paying more for an open model buys a higher completion rate $1.31 / $3.96 $0.044
Model Why It Is in the Lineup Input / Output Price per 1M Tokens* Cached Input Price per 1M Tokens*
Claude Opus 5.5 The baseline closed-weight model $4.00 / $20.00 $0.20

*Pricing is subject to change. Refer to the model provider's official pricing documentation for the most current rates.

Step 3: Run each task in multiple attempts using your harness

We used a custom harness for this example, but you can swap in whichever one you prefer. What matters is consistency: run every model through the same harness. The harness shapes how a model uses tools, handles context, and recovers from errors, so changing it can shift your results. Keeping it constant keeps the comparison apples to apples.Ours is a small instrumented harness. The agent gets tools to list, read, search, edit, and write files, and to run read-only commands.

Probe tool calling first. Before the full run, we send each model a one-minute tool call probe: a handful of single-turn requests where the only correct response is a specific tool call. If a model's tool calls don't survive the serving stack, better to find out now than after paying for a full evaluation.

Run every task three times. Every model attempts every task three times, since a single pass or fail can be luck. With 30 tasks and 4 models, that's 360 attempts.

Start each attempt clean. Each attempt begins from a fresh copy of the repository, set to the commit just before the PR was merged. Because the repository does not contain later commits, the agent can’t find the merged solution in the git history and copy it. 

We run the harness in two modes: 

  • Strict: A malformed tool call gets an error back, and a dropped or leaked call ends the attempt. This shows the model and serving stack as they are. 
  • Forgiving: The harness repairs malformed arguments, recovers calls written as text, and prompts the model to continue after a silent stop. This approximates a mature coding tool.

Set up Weave logging before the first run. Initialize the logger before any model call. If you call the model first and log afterward, Weave won't capture token and cost data, and cost per successful task is one of our core metrics. We create one logger per model and mode, so each combination shows up as its own evaluation you can compare side by side.

Step 4: Grade and track in W&B Weave

A judge model grades every attempt against the change that actually merged as pass, partial, or fail. It is asked whether a reviewer would accept the change, so a different but valid implementation still passes. The judge must not be one of the candidates, because a model should not grade its own work, so we used Claude Sonnet 5.5. 

Note that the coding agent (Opus 5.5) and the judge (Sonnet 5.5) come from the same model family, so the judge may lean slightly toward Claude-style outputs. To reduce potential model-family bias, consider a judge from a different model family.

Every model call, tool call, and verdict is traced in W&B Weave. For each model we track:

Metric What It Measures Why We Track It
Completion rate Share of all attempts the judge accepted This is the outcome developers care about.
Tool-call accuracy Share of tool calls that arrived well-formed, before any repair It isolates the model and serving stack from whatever the harness fixes afterwards.
Silent stop rate Share of attempts that ended because a tool call was dropped or leaked into the reply as text These failures raise no error. The agent just stops reading files and making edits.
Speed Median wall-clock time per task Developers wait on this.
Number of turns and output tokens per task How much work the model did to finish They explain differences in speed and cost: a model that wanders takes more turns.
Cost per successful task Total spend divided by passing attempts You still pay for failed attempts. A cheap model that needs three tries is not cheap.

Here’s a snapshot of the Weave dashboard that compares the three models with the baseline, Opus 5.5. As you can see, we can compare the metrics for each model—cost, tool calls, and latency—with the baseline closed-weight Opus model. You can access the full project and the evaluation dashboard here.

Coding-task evaluation in Weave

Because every score is logged per attempt, you can slice results however you need: by task type, by harness mode, or by model. A model that looks fine overall but fails every planning task shows up right away. Open any failed attempt to see its full trace, including each tool call the model made.

Use the results to choose a model

Once the tests have run, ask four questions of each model's results, in this order. 

  • Did it finish the job? Look at how often each model completed the task the way your team did. This is the quality bar set by your current closed model.
  • Did it fail quietly? Check how often a model's tool calls come through broken. A model that does this will feel flaky to developers: it works, then stalls for no obvious reason. 
  • What did a finished task cost? Take everything you spent on a model, failed attempts included, and divide by the tasks it completed. Ignore price per token; a cheap model that needs three tries is not cheap. 
  • Was it fast enough? A model that saves money but makes developers wait twice as long may not be worth it. 

Each of these questions maps to a score you've already logged in Weave, so you can answer them from the dashboard, and rerun the same evaluation when the next model ships.

Run your own evaluation on CoreWeave

Ready to find the right open model for your coding agent? The following  marimo notebook provides a framework for carrying out that process with CoreWeave Serverless Inference and Weave.

End to end evaluation framework on marimo notebook

The prerequisites to run this step are Python 3.12+, git, a Weights & Biases API key (it also authenticates Serverless Inference), and an Anthropic API key only if you include a Claude baseline. You can set it up in three steps:

  1. Install uv (https://docs.astral.sh/uv/getting-started/installation/), for example curl -LsSf https://astral.sh/uv/install.sh | sh on macOS or Linux.
  2. Clone the repository and open the kit
  3. Launch the notebook: uvx marimo edit --sandbox notebook.py

uv downloads marimo and the notebook's dependencies into an isolated environment, and the notebook opens in your browser. Work through it top to bottom. Nothing that costs money runs until you click its button, and the notebook estimates the number of requests before each run. Start with a five-task smoke run to check your setup, then use around 30 tasks to separate models. For Windows instructions, running on a remote machine, and safety notes, see the kit's README. Open the notebook on GitHub.

Analyze your results with ARIA

Once your evaluation runs are logged to Weave, the next step is figuring out what the numbers mean. This is where CoreWeave AI Research & Iteration Agent (ARIA) comes in. ARIA is a research agent that can work directly on your logged traces and evaluations, so you ask questions about your results and investigate differences across models in different metrics. For example, you can ask which model’s tool calls break most often and on which tasks, or how the cost-per-successful-task ranking changes once you include failed attempts. ARIA works from your Weave data, so you can trace each answer back to the underlying runs and verify it. 

If you log your evaluation runs to Weights & Biases Models, you can also set up CoreWeave ARIA Automations so that when a run completes or a metric crosses a threshold you set, CoreWeave ARIA follows up on its own, such as by writing up its analysis in Reports or drafting the next experiment as a PR. 

CoreWeave ARIA is now available in the Weights & Biases MCP server, so coding agents can coordinate work with CoreWeave ARIA, the expert on your data in Forge. Every conversation is saved as a CoreWeave ARIA thread for you to pick it back up.

CoreWeave ARIA analyzing tool-call accuracy in Weave.

The screenshot above shows CoreWeave ARIA’s analysis comparing three models side-by-side in the Weave evaluation dashboard. To quickly onboard an evaluation framework, you can use this example prompt as an automation for CoreWeave ARIA.

Going further: Evaluate with production traces

In this blog, we outlined the traditional evaluation process, where developers start with a defined task set, and score models against a rubric across important dimensions. An emerging approach flips the process, where developers start with thousands of production traces and replay the same traces with new candidate models. Then, similar to LLM-as-a-judge, another model reviews the full set of traces and flags differences in behavior. The developer reviews the differences to compare models and can turn the most important ones into evaluation tasks. CoreWeave Agent Lens helps turn production insights into better evaluations by identifying recurring failures, grouping related issues, and turning those findings into test cases for evaluating improvements.

Get started with your evaluation

Ready to run your own comparison?

Once you’ve identified models that meet your quality bar, the next step is understanding what it takes to run them for your team. In the next post of this series, we’ll look at how developer count, context length, caching, and retries affect cost per successful task, and how to size capacity and compare deployment options.

Related blogs

CoreWeave Forge,
Inference,
Copy code
Copied!
CoreWeave Forge,
Inference,