Developer + API · 2027 planning guide · Evidence checked 20 November 2026

What is model routing on Plugsky?

Model routing picks a model per request instead of sending everything to one endpoint. Plugsky classifies a request using signals such as token count, tool calls and prompt heuristics, then applies a strategy: Cost saver, Balanced, Max quality or custom rules. Strategies apply per workspace, per API key or per request, and each decision is logged. The value is not the switch itself. It is being able to prove, request by request, why a cheaper model was allowed to answer.

Short answer. Model routing is a policy layer between your application and the model catalogue. For each request it reads signals, chooses a model tier, and records the decision. Use Balanced as the default, move well-understood high-volume traffic to Cost saver, reserve Max quality for work where a wrong answer is expensive, and use custom rules for patterns the presets miss. A named model always overrides routing. Measure quality and cost per completed task, because routing only saves money when the cheaper model actually finishes the job.

Key facts

The routing surface, checked against the product documentation on 20 November 2026
StrategiesCost saver, Balanced, Max quality and Custom
DefaultBalanced routes most calls to a mid-tier model with cheap and strong fallbacks
SignalsToken count, tool-call presence, prompt heuristics, user tier and time of day
Custom rulesOrdered rules, first match wins, recorded per request
OverrideCalling a specific model name bypasses routing for that request
PlacementThe router runs inside the API gateway, before inference starts
ObservabilityRequest logs record the chosen model, the strategy and the matched rule
Model catalogueall public model IDs behind one OpenAI-compatible endpoint
Failure behaviourPair routing with a fallback chain so an unavailable model moves to a same-profile peer
Product statusRouting, per-key usage analytics and the gateway are live

Short answer.

  • Route easy calls to cheap models and hard calls to strong ones, by policy rather than by feature branch.
  • Balanced is a sane default; Cost saver and Max quality are one switch away.
  • Custom rules can key off prompt content, user plan, token count or time of day.
  • A named model in the request always overrides routing, which is useful for tests and dangerous for cost control.
  • Routing decisions are logged, so a quality regression can be attributed to a rule instead of debated.

How it works, step by step

  1. Instrument the application so every request carries user, tenant and workload context.
  2. Start with Balanced and compare quality against your current single-model setup on a fixed evaluation set.
  3. Move one well-understood, high-volume workload to Cost saver and measure the change.
  4. Add custom rules for known patterns, such as long inputs, code review or a specific tenant tier.
  5. Keep an explicit fallback chain for outages and rate limits.
  6. Review routing logs weekly and tune the rules that misfire.

Try it yourself

The simulator lets you test ordered rules and see which one would match a request before you ship the policy.

Open the workload router simulator →

Why model routing

Most production AI systems route every request to a single model, which means over-paying for simple calls and under-serving hard ones. A classification request that returns one of six labels does not need the same engine as a multi-document contract review. Model routing fixes the mismatch: cheap models answer the routine majority, strong models handle the demanding minority, and simple calls are not queued behind a reasoning workload.

Routing also gives you a natural place to define fallbacks. If one model is unavailable, traffic shifts to a peer profile instead of failing. That is a resilience argument, not a cost argument, and it is often the one that gets a routing policy approved.

The third benefit is governance. Once the decision is a policy with a name and a log line, it can be reviewed. A model choice buried in a feature flag cannot be audited, cannot be explained to a customer and cannot be changed safely.

Routing strategies

Four strategies are available and can be mixed per workspace. Cost saver uses the cheapest model that can handle the call, as classified by complexity. Balanced, the default, uses a mid-tier model for most calls with cheap and strong fallbacks. Max quality always uses the strongest model in your tier for work where quality dominates, such as code generation or financial analysis. Custom lets you define ordered rules when your traffic has patterns the presets do not capture.

What each strategy optimises, and what it gives up
StrategyModel choiceBest forTrade-off
Cost saverCheapest capable modelHigh-volume simple calls: classification, extraction, short answersSome hard prompts need a retry on a stronger tier
BalancedMid-tier with cheap and strong fallbacksMost production applicationsNot optimal at either extreme
Max qualityStrongest model in the tierCode, legal and financial analysisHigher compute per call
CustomYour ordered rulesKnown traffic patterns and tenant-specific policyRequires maintenance and review
Per-request overrideA named modelTesting, migrations and special casesBypasses cost controls

The strategy names describe intent, not a guarantee. Cost saver does not promise the cheapest possible answer for every request; it promises to try the cheapest capable tier. Max quality does not promise a correct answer; it promises the strongest tier available in your plan. Write the guarantee you actually need into the evaluation, not into the name of the preset.

Signals a router can use

A router is only as good as its signals. The documented signals are token count, tool-call presence, prompt heuristics, user tier and time of day. Each is cheap to compute and each has a known failure mode.

  • Token count. A long prompt is not necessarily hard, and a short prompt can be a precise legal question. Length is a routing hint, not a difficulty measure.
  • Tool-call presence. Requests that need tools usually need a model that can plan and produce a valid call. Route them to a tier that has demonstrated tool reliability in your evaluation.
  • Prompt heuristics. Keywords and patterns such as “refactor”, “summarise” or a document type are useful when your traffic is narrow. They overfit quickly when the product changes.
  • User tier. A paying enterprise tenant may have a contractual quality expectation, while a free-tier request can take the cheaper path.
  • Time of day. Useful for matching known load patterns. It should never be the only signal, because it says nothing about the request.

A more accurate approach is a classifier trained on your own labelled traffic, or an embedding-similarity check against a set of known-easy and known-hard prompts. Both are legitimate, and both need an evaluation set and a drift review. A classifier that was accurate at launch can decay quietly as the product’s prompts change.

Custom rules and logged decisions

Custom rules are evaluated in order and the first match wins. That ordering is the whole design: a broad rule placed first will shadow every specific rule below it. Put the narrowest, highest-consequence rules at the top and the catch-all last.

Rules that hold up in production tend to be boring. Send free-plan users to plugsky-micro. Send requests above a token threshold to a long-context model. Send prompts containing code-review keywords to a stronger model. Vary the model by time of day to match load. Each one is testable, and each one has an owner.

Every request log records the chosen model, the strategy and the rule that fired, so you can audit cost decisions and debug surprising quality changes. That log is also the input to the next revision: group by rule, compare quality and cost per completed task, and delete the rules that do not earn their place.

Keep the rule set small. Ten rules with clear names are maintainable; sixty rules with overlapping conditions are a second application nobody owns. If a rule has not fired in a quarter, remove it and note why. The model routing question hub covers the buyer-side questions, including how to review a policy after launch.

Fallback and resilience

Routing chooses a model; fallback decides what happens when the choice fails. A fallback chain should name a same-profile peer for each tier, so a failure does not silently downgrade quality. If Max quality falls back to a compact model, the answer may still return and be wrong, which is worse than an error.

Three failure modes need separate handling. A rate limit is temporary, so backoff and retry the same tier. A model outage is not temporary, so move to the peer. A quality failure is not an infrastructure event at all: the request succeeded, and only the evaluation can catch it. Routing logs help with the first two; evaluation catches the third.

Test the fallback path on purpose. Force the primary model to be unavailable in staging, confirm the peer answers, and confirm the log records both the original choice and the substitution. An untested fallback is a second production system that nobody has run.

Measuring a router before you trust it

Build a fixed evaluation set before you enable routing. Sample real requests across the workloads you plan to route, label the expected outcome, and record the model each request would have used under the old single-model setup. Then run the same set under the new policy.

Metrics that show whether a routing policy is working, and what each one can hide
MetricWhat it answersWhat it can hide
Quality pass rate by workloadDid the routed model still meet the bar?A rare but severe failure in a small stratum
Cost per completed taskWhat did a finished job cost, including retries?Support cost and human correction time
Retry and escalation rateHow often the cheap tier was not enoughRequests abandoned by the user
Rule hit distributionWhich rules actually fireA rule that fires rarely but wrongly
Fallback rateHow often the primary tier was unavailableSilent quality downgrade if the peer is weaker
Time to final answerThe user-visible duration of the whole loopQueueing that happens before the request

Review the router monthly for the first quarter, then quarterly. Model versions change, prompts change and traffic mix changes. A policy that was correct in January is a hypothesis by June.

Overrides, testing and migrations

Passing a specific model name bypasses routing. That is exactly what you want when you are comparing two models, reproducing a bug or migrating a workload, and exactly what you do not want in a shared code path that is supposed to be governed by policy.

A practical pattern is to allow overrides only from a server-side configuration, never from a user-supplied field. Then log the override with the same detail as a routing decision. If an override is temporary, give it an expiry date; temporary overrides have a way of becoming permanent.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.plugsky.com/v1",
    api_key="YOUR_PLUGSKY_KEY",
)

# An explicit model name bypasses routing. Keep overrides out of user input.
response = client.chat.completions.create(
    model="plugsky-pro",
    messages=[{"role": "user", "content": "Classify this ticket."}],
)

print(response.choices[0].message.content)

The example uses the canonical host https://api.plugsky.com/v1. The public docs also accept https://plugsky.com/v1 as an alias for the same API; use one host consistently in a codebase. To invoke the workspace policy instead of an override, use the request field documented in the routing documentation and confirm the current accepted values there before you ship the call.

Honest comparison

How we evaluated this: criteria are decision transparency, override safety, fallback behaviour and operability, weighted toward what an on-call engineer needs at 02:00. No provider was benchmarked for speed or accuracy, and no cost saving is claimed, because saving depends on your traffic mix and your quality bar.

Routing approaches compared on governance and operations
ApproachDecision lives inAudit trailMain risk
Preset strategyWorkspace policyChosen model and strategy per requestPreset semantics do not match your quality bar
Custom rulesOrdered rule setMatched rule per requestRule sprawl and shadowing
Hard-coded model per featureApplication codeWhatever the application logsSilent drift and no central review
Client-side classifierYour serviceYour own logsDuplicated logic and no gateway enforcement
Single frontier modelOne constantTrivialPaying the top tier for routine work

What we did not verify

  • We did not measure routing overhead, latency or throughput. The statement that the router runs before inference is architectural, not a performance result.
  • We did not review a production routing log or a customer’s rule set. The metrics above are a suggested method.
  • We did not benchmark model quality across all public model IDs, and no accuracy or cost-saving percentage is claimed.
  • We did not confirm how every SDK handles an unknown model value; check the current routing documentation before shipping the example.
  • We did not test fallback behaviour under a real provider incident.

Frequently asked questions

How does Plugsky know which model to use?

For the preset strategies, each request is classified using signals such as token count, tool-call presence and prompt heuristics. For custom routing, you write the ordered rules. A named model in the request bypasses routing entirely.

Can I override routing per request?

Yes. Passing a specific model name such as plugsky-pro bypasses routing for that request. Keep the override visible in your application code and in the logs, because it is also a way to bypass cost controls.

Does routing add latency?

The router runs inside the API gateway before inference starts, so it adds work ahead of generation rather than inside it. The overhead is not zero, and it is not something to assume: measure it on your own traffic and include it in the budget you set for each workload.

Can I see routing decisions in logs?

Yes. Request logs record the chosen model, the strategy and, for custom routing, the rule that matched. That record is what lets you explain a quality change or a cost shift after the fact.

Which strategy should I start with?

Start with Balanced, compare quality against your current single-model setup on a fixed evaluation set, then move specific workloads to Cost saver or Max quality. Changing the strategy and the prompt at the same time makes the result impossible to attribute.

Does routing work with fallbacks?

Yes. Combine routing with a fallback chain so an unavailable model shifts traffic to a same-profile peer instead of failing the request. Test the fallback path deliberately, because an untested fallback is a second production system nobody has run.

Is model routing the same as a gateway?

No. Routing is one policy a gateway can enforce. A gateway also handles authentication, rate limits, retries, logging and provider credentials. The AI gateway page covers the wider product; this page covers the routing decision itself.

Will routing always reduce cost?

No. Routing reduces spend only when a cheaper model meets the quality bar for that class of request. If the router sends work to a cheap model that then fails and is retried on a strong model, total cost can rise. Measure cost per completed task, not cost per call.

Related pages

Start with one workload and a fixed evaluation set

Enable Balanced, keep the log, and only then move a high-volume path to Cost saver.

Start free See pricing

Cite this page

Plugsky (2026). “Model Routing: Cost, Quality and Fallback Strategy”. Plugsky. Available at: https://plugsky.com/articles/model-routing (last updated 20 November 2026).

By Plugsky Research · Last updated 20 November 2026.

Sources

Primary references were checked on 20 November 2026. Routing behaviour comes from the Plugsky product documentation; the general principles come from the specifications below.

Last checked 20 November 2026. Approved product facts live at /facts; plan terms live at /pricing. Legal: Terms and SLA.

Sources and dated checks

Checked 20 November 2026. Primary sources checked 20 November 2026: OpenAI API reference, Anthropic API getting started, Cloudflare Workers AI. Confirm current limits and pricing in the provider console before capacity planning.