Coding is where model spend concentrates fastest. An agent that reads files, runs tests and edits code sends large prompts many times per task, and a team that adopts one sends thousands of tasks a week. Four models are positioned by their vendors for this work: Anthropic's Claude Opus 5.5, for long-running agentic coding and knowledge work1; Moonshot AI's Kimi K2.7 Code, described as Kimi's dedicated coding model2; Alibaba Cloud's Qwen3-Coder, served as qwen3-coder-plus3; and MiniMax M3, described by MiniMax as a frontier multimodal coding model4.
This comparison uses only what those vendors publish, read on 2026-09-29, and leaves quality claims out. The method at the end is how to get the quality answer for your own codebase.
List rates at the shortest prompt tier
Vendor list rate, shortest prompt tier
USD per 1M tokens
- Claude Opus 5.5input$4.00
- Claude Opus 5.5 output$20.00
- Qwen3-Coderinput, prompts ≤32K$1.00
- Qwen3-Coder output, prompts ≤32K$5.00
- Kimi K2.7 Codeinput, cache miss$0.95
- Kimi K2.7 Code output$4.00
- MiniMax M3input, prompts ≤512K$0.30
- MiniMax M3 output, prompts ≤512K$1.20
- Claude Opus 5.5: $4 input and $20 output per million tokens, with cache hits at $0.20 (0.05x input)5.
- Kimi K2.7 Code: $0.95 input on a cache miss, $0.19 on a cache hit, $4 output6.
- Qwen3-Coder (
qwen3-coder-plus, International deployment): $1 input and $5 output for prompts up to 32K tokens3. - MiniMax M3: $0.30 input and $1.20 output for prompts up to 512K tokens, with cache reads at $0.06; MiniMax labels this rate permanent7.
The catalog entries INFRO estimates against are on the Claude Opus 5.5, Kimi K2.7 Code, Qwen3-Coder and MiniMax M3 model pages.
Prompt length changes the rate for two of them
Coding prompts are long. A repository map, several files, a failing test log and the conversation so far can pass 100K tokens quickly. Two of these models price by prompt length.
| Input tokens in the request | Qwen3-Coder in / out | MiniMax M3 in / out |
|---|---|---|
| Up to 32K | $1.00 / $5.00 | $0.30 / $1.20 |
| 32K–128K | $1.80 / $9.00 | $0.30 / $1.20 |
| 128K–256K | $3.00 / $15.00 | $0.30 / $1.20 |
| 256K–512K | $6.00 / $60.00 | $0.30 / $1.20 |
| 512K–1M | $6.00 / $60.00 | $0.60 / $2.40 |
Alibaba Cloud prices qwen3-coder-plus in four tiers: up to 32K input tokens at $1 and $5, 32K–128K at $1.80 and $9, 128K–256K at $3 and $15, and 256K–1M at $6 and $603. MiniMax prices M3 at $0.30 and $1.20 up to 512K input tokens and $0.60 and $2.40 above7. Anthropic bills Opus 5.5's full 1M window at the standard rate5, and Moonshot lists one rate for Kimi K2.7 Code6.
Context, output and tools
| Vendor-published | Claude Opus 5.5 | Kimi K2.7 Code | Qwen3-Coder (plus) | MiniMax M3 |
|---|---|---|---|---|
| Context | 1M | 262,144 | Priced up to 1M input | 1M |
| Max output | 128K (300K batch, beta) | Not listed | Not listed | Not listed |
| Tool calling | ●Yes | Kimi API has tool calls; not listed per model | ●Qwen3-Coder series | Not listed |
| Structured outputs | ●Yes | Not listed | Not listed | Not listed |
| Cached input / 1M | $0.20 | $0.19 | Not listed | $0.06 |
| Rate varies by prompt length | ○No | ○No | ●four tiers | ●above 512K |
- Context. Opus 5.5 has a 1M-token window and 128K output on the synchronous API, and up to 300K output on the Message Batches API with a beta header1. Moonshot lists a 262,144-token context for Kimi K2.7 Code6. MiniMax lists a 1M context for M34. Alibaba Cloud's pricing for
qwen3-coder-plusruns to 1M input tokens3. - Tool calling. Anthropic states all current Claude models support tool use1. Alibaba Cloud lists the Qwen3-Coder series among models that support function calling8. Moonshot documents tool calls on the Kimi API, using Kimi K3 and K2.6 in its examples9; the pages read did not list K2.7 Code specifically. MiniMax's pages read for this article did not state tool-calling support for M3.
- Structured outputs. Generally available on Opus 5.510. Not stated for the other three on the pages read.
- API shape. Moonshot documents an OpenAI SDK integration against its own base URL9, which matters for how you connect it.
For a coding agent, confirm tool-call support and the format of tool-call arguments on the exact model before anything else; a model that cannot call your tools reliably cannot run the agent, whatever its rate.
What a coding comparison has to measure
Coding has an unusually good outcome signal: the tests. A patch that applies and turns the suite green is a success; anything else is not, however plausible it looks. That makes cost per passing task measurable, and it makes three things worth recording beyond the rate:
- Steps per task. An agent that needs twelve model calls to finish costs roughly twelve times one call. Fewer, longer calls and more, shorter ones price differently under tiered rates.
- Prompt growth. Agents accumulate context. Record input tokens per step, because a tiered rate applies per request.
- Cache hit rate. Coding agents resend the same files. Opus 5.5 at $0.20 per million cached, Kimi K2.7 Code at $0.19 and MiniMax M3 at $0.06 make the cached share of each step significant567.
Fixed overheads in an agent loop
Every step of a coding agent carries tokens that are not your code: the system prompt, tool definitions, and whatever the provider adds when tools are present. Anthropic publishes its share: a request with tools on Opus 5.5 includes a 286-token tool-use system prompt, before your own tool names, descriptions and schemas5. A coding agent with a dozen tools, each with a JSON schema, can carry several thousand tokens of definitions on every step.
Those tokens are the same on every step, which makes them good candidates for caching — and makes the cached-input rate, not the base rate, the one that applies to them after the first call. When you compare models, structure the prompt so the stable part (system prompt, tool definitions, repository map) comes first and the changing part (the latest tool result, the current diff) comes last. A comparison run with an uncacheable prompt order measures a configuration you would not ship.
Hosting, region and data questions
The rates above are each vendor's own hosted API. Moonshot documents its API at api.moonshot.ai9; the Qwen3-Coder rates are for Alibaba Cloud's International (Singapore) deployment3. Where a model's weights are published, other hosts may serve it at their own rates and with their own limits, and the same model name can behave differently on different hosts — see running open-weight models in production for the questions to ask. Before a coding agent sends proprietary source code anywhere, confirm with your security team which hosts and regions are approved, and check each vendor's data-use terms for the account type you hold.
A method for choosing
1
Take a real task
An issue or diff from your own repository, with its tests.
2
Send it through a route
Same prompt, tools and context to every candidate model.
3
Apply and run the tests
A pass is a green test suite, not a plausible-looking patch.
4 · back to 1 ↺
Record cost and outcome
Join the request id to the pass/fail result.
Stop when
- Every candidate has run the whole task set
- Cost per passing task is computed per model
- A route per task tier is chosen from those numbers
- Collect 30–100 real tasks from your repository's history: closed issues with the commit that fixed them, and the tests that prove it.
- Fix the harness. Same agent loop, same tools, same file-retrieval strategy, same step limit for every model. Change only the model.
- Run each task on each model, apply the patch, run the tests, record pass or fail.
- Sum estimated provider cost per task across every step, including failed runs.
- Divide total cost by passing tasks per model, and look at pass rate and cost per pass together. A model with a lower cost per pass but a pass rate below your bar is still out.
- Route by task tier. Small, well-scoped changes and large refactors may land on different models.
Running a coding comparison through INFRO
Connect Anthropic directly as a provider connection. Moonshot, Alibaba Cloud and MiniMax have no dedicated connection kind; reach them through an OpenAI-compatible endpoint connection pointed at the vendor's own API, or through a host that serves the model, with a model map from the catalog id (moonshot/kimi-k2.7-code, qwen/qwen3-coder, minimax/minimax-m3) to the id that endpoint expects. Each vendor bills its own account directly.
Tag every step of an agent run with the reserved metadata keys, so the run can be costed as a whole:
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.INFRO_API_KEY, baseURL: "https://api.infro.io/v1" });
export async function step(model: string, taskId: string, stepName: string, messages: OpenAI.ChatCompletionMessageParam[]) {
const res = await client.chat.completions.create({
model,
messages,
// @ts-expect-error INFRO extension field, forwarded as-is by the SDK
metadata: { trace_id: `${model}:${taskId}`, workflow: "coding-eval", step: stepName },
});
return res;
}After the tests run, GET /v1/traces/{trace_id} returns every request in that run in order, with estimated cost by step; cost_is_partial is set when any call in the run was unpriced, rather than the total being filled in (request traces). Join each trace's cost to the task's pass or fail in your harness, and GET /v1/usage?group_by=workflow or group_by=model gives the totals (usage analytics).
One caution on estimates: the catalog carries one rate per model. Qwen3-Coder is estimated at its up-to-32K tier, so a longer prompt's estimate reads low; if your agent's prompts sit in a higher tier, enter your own rate under Prices (billing) before comparing.
When the evaluation is done, a route such as code-agent lists the chosen model first and a tested alternative second, and the agent sends the slug. A key can be pinned to that route so the coding tool cannot call other models directly (routing).
