Docs

Model routing — full reference

Reference for plugsky-fusion model routing. Set model="plugsky-fusion" and Plugsky picks the right model per request. Strategies: Cost saver, Balanced, Max quality, Custom.

What is plugsky-fusion?

When you set model="plugsky-fusion", Plugsky inspects each request and routes it to the optimal model in your tier based on:

  • Token count (input + expected output)
  • Tool call presence and complexity
  • Prompt heuristics (domain, language, length)
  • Per-workspace strategy setting

Strategies

Set the strategy per-workspace, per-API-key, or per-request:

bash
curl https://api.plugsky.com/v1/chat/completions \
  -H "Authorization: Bearer $PLUGSKY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "plugsky-fusion",
    "fusion": {"strategy": "cost_saver"},
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Strategy options

Strategy Behavior
cost_saverCheapest model that can handle the call. Falls back to stronger on failure.
balancedDefault. Mid-tier for most calls, cheap for trivial, strong for hard.
max_qualityAlways the strongest model in your tier.
customUse your custom rules from the dashboard.

Custom rules

On the dashboard, define rules like:

  • Prompts with the word "refactor" → plugsky-pro
  • Prompts with > 4000 input tokens → plugsky-frontier
  • Prompts from free-plan users → plugsky-micro
  • Prompts during business hours (9-5 GMT) → plugsky-frontier

Rules are evaluated in order; first match wins.

Frequently asked questions

Does routing add latency?

No. The router runs in the API gateway, adding <5ms to the request.

Can I override routing per request?

Yes. Use a specific model name like plugsky-pro to bypass routing for that request.

Can I see routing decisions in logs?

Yes. Every request log includes the chosen model, the strategy, and the rule that fired (for Custom).

Can I set the strategy per API key?

Yes. Per-workspace, per-API-key, or per-request. Default is the workspace setting.

Try plugsky-fusion

Set model="plugsky-fusion" and Plugsky picks the right model per call.

Start $5 trial → See feature overview