How to Choose an LLM by Task: Coding, Translation and Long Docs

Blog / Model watch

How to Choose an LLM by Task: Coding, Translation and Long Docs

When choosing an LLM, don't start with "which one is the strongest?" Start with "what does this task fear most?" Completion and classification fear latency and cost. Code refactoring fears too little context and broken tool calls. Batch Chinese processing fears runaway token bills. Long-running agents fear mid-run failures. Pick the two or three metrics that match your task, then run your own 20 real samples. The result will fit your situation better than any general leaderboard.

This article doesn't name specific model versions. Versions turn over every few months, so recommendations tied to them go stale quickly. A method based on metrics keeps working after the models change.

Why doesn't a "strongest model" ranking help?

A leaderboard answers "who scored highest on this public question set." Your question is "which model is good enough and stable for my task, my budget and my network conditions." At least three things separate the two:

  1. Different task distributions. Public benchmark questions look very different from your codebase, your support tickets or your translation corpus.
  2. Different cost structures. "A few dollars per million tokens" hides large gaps between input and output prices. Take the 2026-10-17 price snapshot from the public OpenRouter model catalog. Among the 16 key models cdnping tracks, the lowest output price is about $0.47 per million tokens and the highest is $12. One model charges only $0.304 for input but $11.936 for output, a gap of nearly 40x. If your task produces long outputs, looking only at the input price will underestimate your cost. For common pitfalls in price comparison, see How to compare LLM API prices.
  3. Different service quality. The same model served by different inference providers can differ in uptime and quantization precision (data below).

A more practical approach: define metrics for the task first, shortlist candidates, and finally validate with your own samples.

Which metrics matter for which task?

The first column is the task, the second is the metric to look at first, and the third is what people often overlook but what most often causes trouble after launch.

Task typeMetrics to check firstEasy to overlook
Code completion, inline suggestionsTime to first token, unit priceIf network round trips dominate latency, a faster model won't help
Classification, tagging, formatting, information extractionUnit price, throughput, output format stabilityReliably matching a JSON schema or enum values matters more than being "smart"
Everyday coding, code reviewCode correctness, instruction followingWhether review comments point at specific lines rather than staying generic
Code refactoring, cross-file editsEffective context length, tool-call stabilityAdvertised context length doesn't mean the model can reliably find information in a long context
Long Chinese text, batch translation and summarizationChinese token efficiency, output unit priceThe same Chinese passage is split into different numbers of tokens by different models, and the bill differs accordingly
Long-running agents (multi-step tool calls)Uptime, ability to recover after a failed stepA task with dozens of requests turns a 5% per-request failure rate into a significant cumulative risk

A few additional notes:

  • For completion tasks, what matters is whether a human can tolerate the wait. If the latency comes mainly from connection setup and cross-border round trips, switching models helps little. Start by checking the connect and round-trip times from your network to each provider's API on the cdnping home page speed test.
  • For refactoring tasks, look beyond "how many K of context is supported" to the cost of long context. For the practical differences, see Choosing a context window: 128K, 256K or 1M.
  • Batch jobs usually don't care about per-request speed. They care about total throughput and total cost. For the different ways to measure output speed, see How to read model output speed in tokens/s.

Why is uptime also a selection metric?

Many selection guides compare only capability and price and never mention uptime. For agents and batch jobs, uptime decides whether the task finishes at all.

One public example: AGI Plan publishes real-request uptime by capability group (AGI Plan is a commercial partner of cdnping). The definition is "successes / (successes + failures caused by the platform itself)," and only 5xx responses count as platform failures. The 30-day window ending 2026-10-17:

Capability groupPositioningRequests (30 days)Uptime (30 days)
Domestic flagship (domestic)Long Chinese text, batch jobs9,436about 98.0%
Balanced general-purpose (balanced)Everyday coding and code review3,625about 95.0%
Frontier reasoning (frontier)Long-running agents, complex refactors33,729about 94.4%
Fast and lightweight (fast)Completion, classification, formatting44,729about 81.7%

Source: https://agiplan.dev/api/status/requests?month=YYYY-MM (no login required), mirrored on cdnping at /en/status/agiplan. The window is only 30 days and the sample is modest, so treat this as an example that uptime can differ noticeably between groups, not as a long-term conclusion.

These numbers show two things. First, the group with the most traffic isn't necessarily the most stable: the fast and lightweight group handled the most requests and has the lowest uptime. Second, within a single platform, the gap between capability groups can exceed 15 percentage points. So when selecting, put uptime in the same table as price, and look at the tier you will actually use rather than the platform-wide figure.

The same holds at the inference-provider level. In the 2026-10-17 snapshot that the cdnping /en/models page pulls from the public OpenRouter API, one model lists 36 inference-provider entries, with 1-day uptime ranging from about 88% to 100%. The providers of these key models report quantization of fp8, fp4, mxfp4, int4 or unspecified. For the effect of quantization on output, see Did the model get dumber, or did the provider change? For why the same model behaves differently across providers, see Same model, different OpenRouter provider: how much can uptime differ?

How do I run a small evaluation with 20 real samples?

You can follow these five steps directly.

Step 1: Sample from real traffic

  • Pull 20 real inputs. Don't make them up. For code tasks, use recent real PRs or issues. For translation, use real text awaiting translation. For classification, use real tickets.
  • Cover three kinds: 12 typical samples, 5 hard samples and 3 edge cases (very long input, odd formatting, mixed languages and so on).
  • Write down the pass criterion for each one. Automate the check where you can: for classification, whether the label matches; for extraction, whether all fields are present; for code, whether the tests pass.

Step 2: Pick 3 candidates

Using the table above, choose one "capability first," one "balanced" and one "cost first" candidate. More than 3 is hard to compare seriously.

Step 3: Run them under fixed conditions

  • Keep temperature, system prompt and maximum output length identical across all candidates.
  • Run each sample twice to see whether the output is stable.
  • Record input tokens, output tokens, total time and whether an error occurred for every request.

If all candidates can be called through the same OpenAI-compatible interface, a script like the one below can run the batch. The endpoint, key and model names are placeholders, so replace them with the service you actually use:

# samples.jsonl: one {"id": "...", "prompt": "..."} per line
BASE_URL="https://your-endpoint.example/v1"
for MODEL in candidate-a candidate-b candidate-c; do
  while IFS= read -r line; do
    id=$(echo "$line" | jq -r .id)
    prompt=$(echo "$line" | jq -r .prompt)
    start=$(date +%s%3N)
    resp=$(curl -s "$BASE_URL/chat/completions" \
      -H "Authorization: Bearer $API_KEY" \
      -H "Content-Type: application/json" \
      -d "$(jq -n --arg m "$MODEL" --arg p "$prompt" \
            '{model:$m, temperature:0, messages:[{role:"user",content:$p}]}')")
    end=$(date +%s%3N)
    echo "$resp" | jq -c --arg id "$id" --arg m "$MODEL" --argjson ms $((end-start)) \
      '{id:$id, model:$m, ms:$ms, in:.usage.prompt_tokens, out:.usage.completion_tokens, text:.choices[0].message.content, err:.error}' \
      >> results.jsonl
  done < samples.jsonl
done

Step 4: Score by task weights

For each candidate, compute four numbers: pass rate, P50 latency, average cost per request (your actual billing price times token counts) and error count. Then weight them by task. For example, a classification task can weight cost and format stability more heavily, while a refactoring task can weight pass rate more heavily.

One rule of thumb: if the pass rates differ by 2 samples or fewer, pick the cheaper or more stable one. 20 samples have limited resolution, and a gap of 1-2 samples doesn't show which model is stronger.

Step 5: Record Chinese token efficiency

For translation and long Chinese text tasks, compare prompt_tokens for the same batch of inputs across the candidates. The same Chinese content can be split into noticeably different numbers of tokens by different models' tokenizers. How big the difference is depends on your own measurements, and it shows up directly on the bill.

What should I watch after launch?

Models get updated and repriced, and providers can change quantization. After launch, watch at least three things:

  1. Uptime. On /en/status, check the edge probe results and status page incidents for each vendor's official API endpoint. If you use an aggregation service, see whether it publishes uptime by capability group or by model. Also record failure rates in your own product, and count 5xx, 429 and timeouts separately.
  2. Prices and listings. /en/models automatically records listings, delistings, price changes and quantization changes on OpenRouter, and /en/changes records line by line the additions and removals in each vendor's official changelog and pricing page. For the full tracking method, see How to find out right away when an LLM API price changes.
  3. Quality drift. Keep the 20 evaluation samples and rerun them every month or whenever you get a model update notice, then compare against the previous pass rate. That is more reliable than going by a feeling that the model "got dumber."

Is one model enough, or do I need multi-model routing?

If your product has completion, review, batch processing and agents all at once, a single model is unlikely to be cost-effective for every task type. The common approach is to route by difficulty: simple requests go to a cheap, fast model, and complex requests go to a more capable one. For how to design routing rules and verify that quality hasn't dropped noticeably after routing, see How to do multi-model routing.

Routing can also be handled by a gateway. For example, AGI Plan (AGI Plan is a commercial partner of cdnping) divides models into four capability groups: frontier reasoning, balanced general-purpose, domestic flagship and fast and lightweight. A scheduling layer sends each request to the matching group by task difficulty. Which models are included, and which are available only outside China, is as listed on agiplan.dev/models. Either way, the 20 samples above still apply: run them before and after routing and compare pass rate and cost per request.

Some AI services restrict use by region. Check the terms of service before you choose one, and follow local regulations.

Selection checklist

Before you start selecting, fill in the following:

  • What does this task fear most: slowness, cost, wrong answers or mid-run failure?
  • What are the typical input and output lengths? If outputs are long, estimate cost by the output price
  • How much context do you need? Do you really need it
  • Do you need tool calls or structured output
  • What share of the content is Chinese? Have you compared token efficiency
  • Do you have 20 real samples and pass criteria
  • No more than 3 candidates, tested under identical conditions
  • Have you checked the candidates' uptime on the channel you will use, not just the platform-wide figure
  • After launch, do you monitor uptime, price and quality, with the samples kept so you can rerun them

Related articles

Keep reading