Best LLM for coding. Priced per task.

Benchmarks move every month and rarely match your codebase. What a model costs per agent step does not. Here is every major coding model priced on the same step.

Cost per 1,000 agent steps.

20,000 input tokens (80% cached) and 1,500 output per step, at realtime rates. Closed-model prices as of October 11, 2026.

Use your own numbers
ModelWeightsPer 1,000 steps
GLM 5.3 FlashZhipuOpen$1.00
Claude Haiku 5.5AnthropicClosed$1.31
GPT-6 LunaOpenAIClosed$1.31
DeepSeek V4.1-FlashDeepSeekOpen$2.35
GLM 5.3ZhipuOpen$5.81
Qwen3.8 27BAlibabaOpen$7.54
Gemini 3.8 FlashGoogleClosed$9.83
Claude Sonnet 5.5AnthropicClosed$24.60
GPT-6.1 SolOpenAIClosed$24.60
Claude Sonnet 5AnthropicClosed$26.20
Gemini 3.1 Pro PreviewGoogleClosed$29.20
Claude Opus 5.5AnthropicClosed$49.20
GPT-5.5OpenAIClosed$73.00
Claude Fable 5.1AnthropicClosed$119.00
GPT-6 AstraOpenAIClosed$131.00

Pick on your own repo

  1. Take 20 to 50 closed issues from your history that have tests.
  2. Run each candidate model through the agent you already use.
  3. Divide what each run cost by the tasks it got through the tests. Cost per solved task is the number to pick on.

Questions

What is the best open source LLM for coding?

On OpenRelay: GLM 5.3, Zhipu's 743B mixture-of-experts for reasoning, coding and agents; DeepSeek V4.1-Flash, a 552B mixture-of-experts with 8B parameters active per prompt token, for agent loops that read far more than they write; GLM 5.3 Flash when the agent needs to read screenshots; Qwen3.8 27B when you want weights small enough to self-host on one GPU. To keep Claude Code itself, use GLM 5.2 through our Anthropic-compatible endpoint. Which one is best depends on your codebase, so test them on it.

Is Claude or ChatGPT better for coding?

Both Anthropic and OpenAI sell coding agents on top of their models, and which wins depends on your codebase, language and agent harness. Run the same tasks through both and compare pass rate and cost per solved task. On price, Claude Sonnet 5 costs $26.20 per 1,000 steps here and GPT-6.1 Sol $24.60 per 1,000 steps.

Why price per agent step?

A coding agent sends a long prompt (the repo context and the transcript so far), most of it cached from the previous step, and gets back a shorter edit or tool call. The table uses 20,000 input tokens, 80% of them cached, and 1,500 output tokens per step. Change any of those in the calculator.

Can I use an open model in Claude Code?

Yes, on GLM 5.2. OpenRelay serves it on an Anthropic-compatible Messages endpoint, so Claude Code needs three environment variables:

Claude Code on GLM 5.2bash
export ANTHROPIC_BASE_URL=https://inference.openrelay.inc
export ANTHROPIC_AUTH_TOKEN=or_...   # your OpenRelay key
export ANTHROPIC_MODEL=openrelay/glm-5.2

claude

Cline, Cursor and other tools that take an OpenAI-compatible base URL can use any open model above at https://inference.openrelay.inc/v1.

Run your agent on open models.

Per-token billing, no subscription, no contract.