# How to choose a coding model for repo Q&A, bug fixes and terminal work

Canonical: https://weaveos.com/blog/choose-coding-model-by-workload

Published: 2026-12-01T00:00:00.000Z

By Sammy Tourani

Choose a coding model by workload, then measure cost per accepted task in the client your engineers use. Weave's [AI model directory](/models) helps build the shortlist with source-linked benchmark evidence, context limits and catalog prices for 568 model records. [Weave Router](/products/router) lets the team compare a fixed-model setup with per-request routing on the same work.

The directory finds plausible candidates. The pilot answers the buying question: what does the team pay for work that passes its checks?

## Match the benchmark to the work

A single leaderboard rarely describes an engineering team's mix. Separate the work into the jobs your agents perform.

| Workload | Public benchmark | Weave Router result |
| --- | --- | --- |
| Questions about a real codebase | SWE-Atlas Codebase QnA, 124 tasks | 62.5% Pass@1 in Claude Code at $1.74 per solve, 54.0% in Codex at $0.89 |
| Hard repository fixes | SWE-Bench Pro V2 HARD, 51 tasks | 89.2% Pass@1 in Claude Code at $1.16 per solve, 83.3% in Codex at $0.42 |
| Multi-step terminal tasks | Terminal-Bench 4.0, 66 tasks | 54.5% Pass@1 in Claude Code at $9.74 per solve, 42.4% in Codex at $2.21 |

Weave published the harness and source rows for these results. On Terminal-Bench 4.0, Weave Router is the #1 router. Its Claude Code score is 8.0 points above the best router Vals AI tested, on the same 66 tasks. [See the benchmark hub](/router/benchmarks).

## Build a shortlist from comparable evidence

Open 2 or 3 candidate models in the [model directory](/models). Use a pair comparison only when the models share a benchmark source, task set, evaluation group and unit. The directory marks pairs without that shared evidence and keeps them out of the sitemap.

Then check practical constraints:

- **Client support.** Confirm the model is available in Claude Code, Codex or the client your team uses.
- **Context.** Large repositories and long sessions need room for files, logs and tool output.
- **Tool use.** Agentic work needs reliable tool calls, file edits and test execution.
- **Router availability.** The public Router catalog shows model presence. Confirm plan and account eligibility before a pilot.

## Estimate cost from your token mix

The [model cost calculator](/models/cost-calculator) uses this formula:

```text
((input tokens × input USD per million) + (output tokens × output USD per million)) ÷ 1,000,000
```

The table prices a sample mix of 2M input tokens and 200K output tokens. Input and output prices are USD per 1M tokens, from catalog prices checked on November 27, 2026.

| Model | Input price | Output price | Cost of the sample mix |
| --- | ---: | ---: | ---: |
| Claude Opus 5 | $5 | $25 | $15.00 |
| GLM 5.3 | $0.0699 | $1.40 | $0.42 |

Catalog prices vary by provider and model variant, so record which provider and rates you used. Today's Z.ai rates for GLM, for example, would put the same mix well above $0.42. That gap is useful planning input. It does not show which setup finishes more work. Cache rates, retries, output length and task success can change the result, so carry the estimate into a controlled test.

## Test fixed models against Weave Router

Use 20 to 50 reviewed tasks for each workload. Keep the client, repository state, tools, instructions, attempt limit and acceptance checks the same. Run the strongest fixed model you would otherwise standardize on, a lower-cost fixed model and Weave Router.

| Measure | Why it matters |
| --- | --- |
| Pass@1 | Shows how often the first attempt lands |
| Pass@2 or accepted after retry | Shows whether retries recover the work |
| Cost per accepted task | Counts failures and retries in the cost |
| Elapsed time | Shows whether a cheaper setup slows engineers down |
| Review effort and later fixes | Separates passing tests from work the team accepts |
| Human repair minutes | Counts engineer time spent fixing output that passed checks |

Weave Router selects a model for each request using task difficulty, cache-switch cost and progress through the session. Its reporting shows the model that served each request, token counts and cost. Router savings compare actual cost with a comparison model you select and adjust for measured token use and task-success differences. [Read how savings are calculated](https://docs.weaveos.com/router/reporting.md#how-savings-are-calculated).

Weave reports **40% average token-spend savings** for Router customers. That customer metric is separate from the benchmark costs above.

## Decide by workload

Define acceptance for each workload before the first run, and count failed tasks in total pilot spend. If a fixed model meets your bar at lower cost and equal or better elapsed time, standardize on it.

Standardize on a single model when it wins cost per accepted task across the work that matters. Pin a model for a workload when it consistently performs better there. Use Weave Router when the team's mix contains easy and difficult steps, because per-request routing can keep hard work on stronger models while cheaper models handle the rest.

Start with the [AI model directory](/models), then [set up Weave Router](/router/quickstart) for a pilot in Claude Code or Codex.
