Skip to content

Choosing a model

The model field of a request decides whether you name a model or let Prism choose one. This applies to Chat Completions, Responses, Anthropic Messages, Gemini (model in the path) and Ollama chat. Embeddings and rerank follow their own rules, described on Ingress dialects.

model What Prism does
auto, or empty Chooses a model with the request’s strategy (default balanced)
cheap, fast Chooses with that strategy
smart Chooses with the quality strategy and at least the strong quality tier
local Chooses among local models only; never sends the request to a cloud provider
openai/auto, google/fast, <provider>/<selector> Chooses among one provider’s models
triage, reasoning, cheap-toolcall Built-in roles, active once you list models for them in [routing.role_aliases]
reasoning-max The reasoning role at the maximum reasoning effort
A name you add to [routing.role_aliases] Your role: its listed models, in order
prism/auto, prism/strong, prism/frontier, prism/reasoning, prism/reasoning-max, prism/private Policy models; /v1/models lists the ones available now
provider::model, for example openrouter::anthropic/claude-sonnet-4.5 That model at that provider (any account of it). Other providers are tried only when failover is allowed, see below
A model id, for example gpt-5-mini or anthropic/claude-sonnet-4.5 That model at any provider that serves it

The provider part of a provider::model id is the connection’s name. The names of the built-in subscription connections, such as claude-oauth::, codex-oauth:: and gemini-oauth::, keep working through 1.x, also after those providers move to provider packages; they are removed no earlier than 2.0.0.

balanced, quality and private are strategy names, not model names. "model": "balanced" is read as a model id and fails with 400 no provider has exact model_id balanced. An unknown prism/... name is a 400.

Lists:

  • GET /v1/models lists provider models as provider::model, role aliases you configured, and prism/* policy models. It does not list auto, cheap, fast, smart, local.
  • GET /prism/models lists every catalog entry with its candidate_id (provider/model), quality tier, limits, prices, health, and whether automatic routing may pick it.

A request Prism routes itself orders the eligible models by strategy:

Strategy Order
balanced (default) The strongest cloud model at or above the turn’s quality-tier floor: the one with the highest Epoch Capabilities Index in the model class catalog, price deciding only between equals. The floor is frontier when the request offers tools (an agent step) or rates as complex, good otherwise. If no cloud model reaches the floor, the highest tier below it comes next, then local models. A model with no known tier never counts as reaching the floor
quality Highest quality tier first; inside it the strongest model by Epoch ECI, price only between equals
cheap Local models first, then the cheapest cloud model
fast Lowest observed latency first, then cheapest
private Local models only

auto without a strategy behaves as balanced. A request marked private or local uses local models only, whatever the strategy.

If the first model fails with a retryable error, Prism tries the next one in the order.

Where Scope
model: "cheap" / "fast" / "smart" / "local" One request
X-Prism-Strategy: balanced|quality|cheap|fast|private header with model: "auto" One request. smart is read as quality, local as private; an unknown value as balanced
/prism strategy cheap in chat, with X-Prism-Session One conversation; see In-chat commands
Console → Routing, or set_default_strategy in the control API The whole installation
[v2.orchestration] default_strategy in config.toml The whole installation, when nothing above is set

A concrete model in the request always wins over any strategy, unless the Smart quality band is on together with the owner’s setting Smart may answer with another model.

The quality band is part of Prism Pro (the smart_routing capability). It is off by default. The installation owner switches it on under Console → Routing, Automatic tab, Smart quality band, or with [routing] smart_quality_band = true. The console applies the change without a restart. Without Prism Pro the console refuses to switch it on, and a switched-on band does nothing.

On auto the band needs nothing else. For roles and named models the owner also switches on Smart may answer with another model on the same tab, or sets [routing] smart_substitution = true. It is one setting for the whole installation, off by default, and it applies to the band and the checked cascade alike. The answer headers name the model that answered.

For each request the band works with the models left after every rule that can exclude a model: privacy and local-only, the key’s policy, budgets and spending limits, health and quota pauses, the provider chain, capabilities, context and output limits, and [routing] auto_denylist. For each of these models it estimates the chance that this installation’s traffic accepts the answer, for the request’s kind of task (plain_completion, agentic_tool_use, structured_extraction, long_context_synthesis):

  • The starting point is the published quality prior’s score of the model for that kind of task. It counts as 20 observed requests.
  • Each request whose outcome Prism recorded as worked or not worked adds one observation. Outcomes of the last 30 days are read when the band is first used; later outcomes are added when they are recorded. Requests answered by an OpenAI model are not counted.
  • A model without a prior score for the kind of task has no estimate and is never picked by the band.

The band then picks the cheapest model whose estimate is at most 0.02 below a reference:

Request Reference What the band may do
auto (also prism/auto) with the default strategy The best estimate among the models Lead with the cheapest model within 0.02 of it. This replaces the default order and the quality-first and ECI experiments for these requests
A role or a named model, with Smart may answer with another model on The estimate of the model the role or name resolves to first Answer with a cheaper model within 0.02 of it. Never a more expensive model

The rest of the order stays behind the band’s pick, so if the picked model fails, the next attempt is what Prism would have tried without the band; for a role or a named model that is the requested model.

On auto the band does not change:

  • a request with an explicit strategy (cheap, fast, smart, local, X-Prism-Strategy), or one a budget downgrades or keeps local;
  • a conversation held on its model: a session preference or next-model control, a warm prompt cache (the stay rule), a tool-loop or response-chain lock;
  • the manual routing mode, a routing profile’s default model;
  • a request whose planned model is a subscription account: the band does not move it to a paid API.

On a role or a named model the band does not change a request:

  • while the setting Smart may answer with another model is off;
  • under the strict-model rule (X-Prism-Strict-Model: true, the session or key setting, or the owner’s default);
  • bound to its model by a tool-loop or response-chain lock or a provider conversation thread.

The band does not explore: with the same recorded outcomes it picks the same model. A streamed Responses request on auto keeps the default order.

The response headers report the band’s choice: X-Prism-Model and X-Prism-Provider name the model that answered, X-Prism-Reason is smart_quality_band, and on a role or named-model request X-Prism-Requested-Model repeats the model value the client sent. See Headers.

The checked cascade is part of Prism Pro (the smart_routing capability). It is off by default. The installation owner switches it on under Console → Routing, Automatic tab, Smart checked cascade, or with [routing] smart_checked_cascade = true. The console applies the change without a restart. It can be on with the quality band off, and the other way round.

A cheaper model answers first. Prism checks the answer by the rule measured for the request’s kind of task. When the check passes, that answer is served. When it does not, the strong model answers the request instead and its answer is served. The models are the quality band’s:

Request Cheap model Strong model
auto with the default strategy The band’s pick: the cheapest model within 0.02 of the best estimate The model with the best estimate
A role or a named model, with Smart may answer with another model on The band’s pick: a cheaper model within 0.02 of the requested model The requested model

The cascade runs only when the cheap model costs less than the strong model. With the band on, the band’s pick is the cheap model the cascade checks. With the band off, the band’s estimate still picks the cheap model, but only for the requests the cascade checks; every other request routes as without the band.

The cascade runs on a request only when all of these hold:

  • it is a chat completion (/v1/chat/completions, or a client dialect Prism translates to it); Responses and other endpoints are not checked;
  • its kind of task has a rule (see the table below);
  • Prism’s estimate of its input is at most 8192 tokens. The rules were measured on single tasks and single agent steps; late in a long conversation an escalation would pay the whole context a second time;
  • on auto: the default strategy, the same conditions as the band (no session control, warm-cache stay, tool-loop or response-chain lock, manual routing mode, routing profile default or subscription head), no cost limit per request ([v2.orchestration] max_cost_usd or a managed budget), and a call limit (max_calls) that leaves room for every call of the rule;
  • on a role or a named model: the setting Smart may answer with another model on, no strict-model rule, no lock or provider conversation thread, and no streaming. A streamed auto request is checked on the buffered stream path: no byte of the cheap answer reaches the client before the check passed.

On auto with the band off, a request that is in the cascade’s scope but where the cascade cannot run after the models are picked (no cheaper model, no second model of another creator, a model over its spending limit) is served in the planner’s default order, without the quality-first and ECI experiments.

The rules come from the cascade measurement of November 2026 (ml/laya-routing/reports/cascade-v2.md): 609 test tasks read once, cheap model deepseek-v4.1-flash, second cheap model claude-haiku-5.5, strong model claude-opus-5.5. Every rule also escalates when the cheap answer failed, was cut at the output limit, or is empty.

Kind of task Check Measured: quality (strong model) Cost, share of the strong model Escalated
Agent step (a request that offers tools) A second cheap model of another creator answers too; the tool calls must agree after normalization. Every call must name a tool of the request and fit its parameter schema 0.883 (0.870) 21% 18%
Math The two cheap answers must state the same final answer, and Jev’s P(wrong) must be below 0.55 0.938 (0.949) 58% 25%
Multiple-choice knowledge A second sample of the cheap model at temperature 1 must pick the same option 0.848 (0.859) 12% 5%
Code Jev’s P(wrong) must be below 0.10 0.892 (0.892) 81% 64%
Instruction following No check: the cheap model alone was within 2 points (0.877 against 0.895)

None of these differences from the strong model is statistically significant (McNemar p between 0.63 and 1.0 per kind of task); with 92 to 195 tasks per kind the measurement cannot tell differences below about 5 points.

Before 1.0 the cascade runs only on agent steps. Prism’s task class reads the request’s shape, not its text, and recognizes agent steps but not math, knowledge or code. Those rules stay in the rule table and turn on in 1.x, once a skill classifier that works on every installation runs on the serving path.

A signal that cannot be computed escalates: the second model or sample did not answer, or Jev gave no verdict. A Jev provider that refused for payment is asked again only when its next funding probe is due (15 minutes after the refusal, longer while it keeps refusing); the strong model answers meanwhile. The judge is the one [routing_probe] judge_model and judge_provider name (jev-latest by default; with several System One providers write typesafe::jev-latest).

OpenAI’s and Anthropic’s refusals are not walked around. When the cheap model, or the second model, refused (an OpenAI or Anthropic content filter), the strong stage leaves out every model of that creator; a model of another creator may still answer. When no strong attempt is left, the cheap answer is served and X-Prism-Cascade says kept:refusal_held.

Every call of the cascade is an attempt of the request: the cheap answer, the second model or sample, the Jev verdict, and the strong answer on escalation. Each is billed in X-Prism-Cost-USD, counted in X-Prism-Attempts, recorded in the request log and counted against the key’s budgets and spend authority. The second model and Jev are checked against the key’s policy before they are planned.

The calls run one after another. The measured cascade was about three times slower than the strong model on average (19.9 s against 6.1 s, p90 45.6 s against 12.7 s), mostly because the cheap model reasons at length; for agent steps it was 4.3 s against 2.5 s with the two cheap calls in parallel, so expect more in Prism.

  • X-Prism-Model and X-Prism-Provider name the model whose answer was served.
  • X-Prism-Reason is smart_checked_cascade when the cheap answer was served and smart_checked_cascade_escalated when the strong model’s was.
  • X-Prism-Cascade says what the cascade did: accepted, escalated:<reason>, kept:<reason> or skipped:<reason> (see Headers).
  • X-Prism-Requested-Model repeats the client’s model value when a role or named-model request was answered by the cheap model; when the strong model answered, it answered with what was asked, and the header is absent.

The decision log records the cascade’s outcome, reason, the three models and the signal values for each request in its scope.

Header Effect
X-Prism-Strategy Strategy for this request
X-Prism-Session Names the conversation. Prism keeps a conversation on the model and account that hold its prompt cache while that is still allowed and cheaper than switching, and applies session controls. Not a hard lock: health, capability and limits still apply
X-Prism-App Names the agent for reports. A name you map in [routing.app_profiles] also selects that routing profile
X-Prism-Profile Selects a routing profile ([profiles.<name>]) directly
X-Prism-Allow-Provider-Failover: true Lets a provider::model request go to another provider that serves the same model. Default: [routing] allow_provider_failover (false)
X-Prism-Strict-Model: true Keeps the request at one seller, even when provider failover is allowed: the provider a provider::model names, or, for a bare model id, the first seller in Prism’s provider order, with other accounts of the same subscription. A rolling alias such as glm-latest is not replaced by another version. If that seller cannot serve, the request fails rather than moving to another seller. A session’s /prism strict, an agent’s strict_model routing setting (by its Prism key or recognized app) and the installation default (set_default_strict_model) turn it on without the header; the header takes precedence over them, so false turns it off for one request

A provider::model request names the provider whose price and account you accept. By default Prism does not send it to another provider: if that provider cannot serve, you get its refusal, and the error may carry a prism_switch_offer that names another provider of the same model. A second account of the same subscription provider counts as the same provider and can take over. Allow other providers per request with X-Prism-Allow-Provider-Failover: true, or for the installation with [routing] allow_provider_failover = true.

The X-Prism-Provider response header always names the provider that served.

Chat Completions and Responses requests may carry a prism object with routing requirements. Prism checks it before routing and removes it before forwarding.

{
"model": "auto",
"prism": {
"version": "intent-v1",
"role": "reasoning",
"quality": "strong",
"effort": "adaptive",
"locality": "prefer-local",
"max_cost_usd": 0.25,
"max_latency_ms": 1500,
"required_capabilities": ["tools", "json"]
}
}
Field Values
version intent-v1 (required)
role auto, reasoning, triage, cheap-toolcall
quality adaptive, strong, frontier
effort adaptive, none, minimal, low, medium, high, xhigh, max
locality any, prefer-local, local-only, cloud-only
max_cost_usd, max_latency_ms Upper bounds for the request
required_capabilities Up to 32 of: tools, json, structured-output, vision, streaming, responses, reasoning, cache:explicit, cache:implicit, backend:<name> (aggregator backend)
  • The encoded object may be at most 4096 bytes. Unknown or duplicate fields, wrong types and invalid values are a 400 invalid_request that names the field, for example invalid routing intent prism.bogus: unknown field.
  • A capability name Prism does not know leaves no eligible model: 503 no_eligible_executor, as does a capability every candidate is stated not to have. A capability nobody has stated for a model is not a “no”: that model stays a candidate and is tried after the models on which the capability is confirmed. Prism learns tools, json, vision, streaming and responses from traffic, a background check, the provider, your settings, the public model table and its built-in rule, in that order, and the models dialog of a connection under AI providers shows each flag as yes, no or unknown with where it came from. Only an explicit “no” — from the provider, your settings or traffic — removes a model from the request.
  • local-only (like model: "local" and prism/private) cannot be weakened by a default, a budget rule or failover.
  • Embeddings, rerank, System One and the file, image and audio endpoints do not read this object.