Skip to main content
The Pareto Router (openrouter/pareto-code) selects a coding model based on benchmark scores. You set a single min_coding_score preference between 0 and 1, which selects one of three tiers of coding models, and the router sends your request to one model from that tier. The value picks a tier; it is not a score a model has to reach (see The min_coding_score parameter). The router picks one model per request by score and price and doesn’t adapt its choice to each turn the way the Auto Router does. Session stickiness keeps a session on the same model when it can.

Overview

The Pareto Router is tuned for coding use cases. It builds a shortlist from the models currently available on OpenRouter that have the highest coding score. The router groups the shortlist into three tiers by score, and your min_coding_score picks the tier of models you want to route to. Within the chosen tier the router selects the cheapest model that is currently available (or the fastest, when you request the :nitro variant). The name comes from Pareto efficiency: the goal is to give you a strong coder without overspending. The exact shortlist evolves over time as new models land and benchmarks shift.

Coding score

A model’s coding score is its FrontierCode-AA 2.0 result, as measured by Artificial Analysis. FrontierCode-AA 2.0 is Artificial Analysis’s run of Cognition’s FrontierCode 2.0: 132 tasks that each ask an agent to make a change to a real open-source repository, graded with held-out tests and a rubric on whether the change is good enough for a maintainer to merge. An attempt that fails a blocking check scores zero, and a model’s score is the average across the tasks, between 0 and 1. Artificial Analysis describes the benchmark in its methodology. The rest of this page calls it the coding score. A model that Artificial Analysis hasn’t scored isn’t on the shortlist, and no other benchmark stands in for a missing score. A score of 0 is a score: the model is ranked, last. When two models have the same coding score, the cheaper one ranks first.

Usage

Set your model to openrouter/pareto-code and optionally pass the pareto-router plugin to choose a tier with min_coding_score. The examples on this page pass 0.4, which selects the medium tier, as any value from 0.33 up to 0.66 does; leave it out to get the high tier:

Default Settings

Instead of passing the pareto-router plugin on every API request, you can configure a default min_coding_score in the dashboard:
  1. Navigate to Settings > Plugins
  2. Find the Pareto Router row and click the configure (gear) icon
  3. Select a quality tier — High, Medium, or Low — or choose Custom score to enter a specific value between 0 and 1
  4. Click Save
  5. Toggle the plugin on to apply it to all requests using openrouter/pareto-code
Once enabled, the configured min_coding_score is automatically applied to every request that uses openrouter/pareto-code, without needing to include the plugins array in your API calls.
You can still override the default on a per-request basis by passing the pareto-router plugin in your request’s plugins array. To prevent per-request overrides, enable “Prevent overrides” in the plugin configuration.

The min_coding_score parameter

min_coding_score is an optional number between 0 and 1, where 1 is best. The router maps it to one of three quality tiers. The tiers come from the shortlist’s coding scores: the router clusters the shortlist into three groups of similar scores, and each tier includes every model in the tiers above it. If you omit min_coding_score, the router defaults to the strongest available coders. Within a tier, the router picks the cheapest available model, or the fastest by p50 throughput when you request the :nitro variant.
The router resolves a primary coding model plus up to two same-tier fallbacks. The primary is what serves your request. The fallbacks only fire on transient provider errors or rate limits, they do not load-balance traffic. If the entire tier has no models currently published on OpenRouter, the router steps into a neighboring tier instead. The response model field always reports the concrete model that handled the request.
min_coding_score selects a tier. It isn’t a threshold on the coding score, so min_coding_score=0.66 doesn’t mean “models with a coding score of at least 0.66”. Tiers are relative to the current shortlist, and the capability bar implied by a given value shifts as the frontier moves: a new strong release can move existing models into a lower tier, so min_coding_score=0.66 always means “the top group of the current shortlist” rather than “above an absolute capability score”.

Response

The response includes the model field showing which coding model was actually used:

How It Works

  1. Tier resolution: Your min_coding_score value is mapped to one of three tiers (high, medium, low) using the thresholds in the table above.
  2. Candidate filtering: The router takes the tier’s shortlist and filters it to models that are currently published on OpenRouter. If coding scores are unavailable, the router uses a fixed fallback shortlist for each tier instead.
  3. Selection: The filtered shortlist is sorted by price ascending, or by p50 throughput descending when you request the :nitro variant. The top entry becomes the primary model and the next two are kept as same-tier fallbacks.
  4. Runtime fallback: If the primary’s endpoints are unavailable due to transient provider errors or rate limits, the request cascades through the same-tier fallbacks. Only when the entire tier is missing from the catalog does the router step into a neighboring tier.
  5. Request forwarding: Your request is forwarded to the selected model.

Session Stickiness

The Pareto Router reuses the selected model and provider on a best-effort basis so that subsequent requests in the same conversation route to the same place. This keeps behavior consistent within a conversation and maximizes prompt cache hits. The cached model is promoted only while it remains in the current candidate shortlist; if it drops out (for example after a min_coding_score change or a shortlist update), the router selects a different model. Stickiness applies at two levels:
  • Implicit (automatic): OpenRouter derives a conversation fingerprint from your request (hashing the first system message and first user message). Once the provider reports prompt cache usage, the model and provider are reused for that conversation while the model remains in the candidate shortlist. No configuration needed.
  • Explicit (session_id): When you include a session_id, stickiness kicks in on the first successful response — even before cache usage is observed. The same best-effort rule applies: the model is reused only while it stays in the shortlist. This is recommended for multi-turn coding sessions and agent workflows where you want consistent routing from the start.
In both cases, the cache expires after 5 minutes of inactivity. Each successful request resets the timer. If the cached provider returns an error, the cache is not updated, allowing the next request to be re-routed. For full details on how sticky routing works, cache key granularity, and the x-session-id header, see Provider Sticky Routing.

Example with session_id

Why It Matters for the Pareto Router

The Pareto Router selects a model based on coding score and cost — different requests could resolve to different models as the shortlist evolves. Session stickiness prefers the previously selected model — not just the provider — so a multi-turn coding session stays on the same model while that model remains eligible. This avoids unnecessary mid-conversation model switches that could lead to inconsistent code style or lost prompt cache.

Pricing

The Pareto Router itself adds no fee. You pay only for the underlying model that handles the request. Because model selection varies across the shortlist, per-request cost will vary too. Use a lower min_coding_score when cost is the primary concern.

Limitations

  • Coding only: openrouter/pareto-code is tuned for coding tasks. For other use cases, use a different router or choose a specific model.
  • Model selection may change over time: For a given min_coding_score, the same model is selected deterministically (sorted by price). However, the selected model may change when the underlying shortlist is updated (e.g. new models are added, Artificial Analysis publishes new coding scores, or the tiers regroup as scores change). Within a conversation, session stickiness keeps your requests on the same model and provider to maximize cache hits.
  • Coding score only: min_coding_score is the only router parameter. You can’t directly cap cost or latency per request.