Key facts
| Router model | plugsky-fusion escalates per request across coding and general tiers (live) |
| Coder tiers | plugsky-coder and plugsky-coder-fast are live coding models |
| Models | 30+ models; route completions by task complexity |
| Strategy | cost_saver for boilerplate, balanced for edits, max_quality for architecture |
| Pricing | Flat monthly self-serve plans with no per-token charges on self-serve |
| Free tier | plugsky-micro and plugsky-lite on the free plan, no card required |
| Streaming | Live via server-sent events for progressive completions |
| Roadmap | The batch endpoint is coming soon for offline generation jobs |
TL;DR
- Output length drives code-generation cost; cap it per task.
- Use fast coder tiers for autocomplete, boilerplate and tests.
- Escalate multi-file edits and architecture questions.
- Gate any tier downgrade behind passing tests, not vibes.
- Send the minimum file context needed for the edit.
How it works, step by step
- Categorise code requests: completion, boilerplate, tests, refactor, architecture, debugging.
- Assign a default tier per category, starting conservatively and moving one category at a time.
- Cap max_tokens per category and stop at a natural completion boundary.
- Build a test-based evaluation set: run generated code, don't just read it.
- Downgrade a category only when its tests pass at the same rate as before.
- Cache repeated prompts such as templates and scaffolds.
- Review per-category quality and generation volume monthly.
Try it yourself
Open the best-model-for-coding selector →
Why code costs more per call
Generated code is long. A completion that writes a module can emit thousands of tokens where a chat reply emits dozens, so output volume, not input, is usually the bill. Long inputs make it worse: pasting whole repositories into context raises the input side and degrades instruction-following at the same time.
The response is task segmentation. Autocomplete and boilerplate have narrow, predictable outputs; refactors and debugging need more reasoning; architecture questions need the strongest model and a human in the loop. Assigning one model to all four categories means overpaying for the easy three.
A two-tier coding pipeline
Most teams settle on a fast coder tier plus a strong reasoning tier. Use plugsky-coder-fast or similar for completions, tests and repetitive edits, and escalate to a stronger coding model for multi-file changes, unfamiliar APIs and debugging sessions. Fusion strategies express the default; per-key or per-feature rules pin exceptions for critical repositories.
- Send the current function plus direct dependencies — not the whole file tree.
- Ask for a diff or a patch rather than a full rewrite; output is the expensive part.
- Cap completion length and continue explicitly if the answer was truncated.
- Log which tier produced which suggestion so quality issues are attributable.
Testing is the quality gate
Code quality is measurable, which makes routing evidence-based. Run generated code through the test suite instead of reading it, and compare pass rates per category per tier. A fast model that passes the same tests at the same rate is a genuine saving; one that needs two review cycles is not.
Re-run the evaluation after model updates, prompt changes and framework upgrades, because all three shift performance. On self-serve plans there are no per-token charges, so the practical effect of routing is latency and throughput rather than a variable bill; see the live pricing page for plan detail. Build on the free plan with plugsky-micro and plugsky-lite, and use the 14-day full-access trial to compare coding tiers on your own repositories.
Honest comparison
| Code task | Routed pipeline on Plugsky | Strongest model always | One cheap model always |
|---|---|---|---|
| Autocomplete and boilerplate | Fast coder tier | Strong tier for trivia | Often adequate |
| Multi-file refactor | Escalated to strong coder | Native strength | Misses context |
| Debugging | Escalated with logs | Native strength | Weak reasoning |
| Output length | Diff-style, capped | Full rewrites unless prompted | Verbose or truncated |
| Quality evidence | Test pass rates per tier | Usually unmeasured | Usually unmeasured |
Frequently asked questions
Why is code generation expensive?
Generated code is long, and output tokens dominate cost. Pasting large context also adds input tokens and can reduce output quality, so output length and context trimming are the main levers.
Which model should handle autocomplete?
A fast coder tier such as plugsky-coder-fast handles completions, boilerplate and tests well. Escalate multi-file edits, debugging and architecture questions to stronger coding models.
How do I verify a cheaper model is good enough?
Run generated code through your test suite and compare pass rates per category per tier. Reading the output is not evidence; tests are.
Should I send the whole repository as context?
No. Send the function being edited plus its direct dependencies, and reference interfaces rather than pasting implementations. Smaller context is cheaper and usually more accurate.
Do I need a diff or a full file?
Ask for patches or diffs. Output is the expensive side of the request, and full rewrites also create review noise.
Is the batch endpoint available?
Not yet — batch is coming soon. For large offline generation jobs today, use bounded-concurrency workers with a queue and per-job status.
How does routing interact with flat pricing?
Self-serve plans are flat monthly with no per-token charges, so routing mainly affects latency and throughput. See the live pricing page for current plans.
Can I test coding tiers for free?
Yes. Start on the free plan with plugsky-micro and plugsky-lite, and use the 14-day full-access trial to benchmark coding models on your repositories.