Panda Orchestrator: A 32M-Parameter Model That Routes Your AI Coding Tasks Panda Code's Panda Orchestrator, built around a 32-million-parameter router model called Panda Router, picks the cheapest capable AI model for each coding task and, with escalation and up to two retries, raised success on 150 held-out tasks with a nine-model pool from about 77-79 out of 100 to roughly 91, close to the theoretical best case of 94. Panda Router was distilled from a 150-million-parameter teacher trained on Modal, quantized to int8, and exported to ONNX at roughly 31 MB, running on CPU in 10 to 25 milliseconds; training used DeepSeek V4.1 Flash to label about 8,000 tasks for $2.77 plus an attempt-and-grade process, for roughly $44 to $50 total. The router is built into Panda Code in Rust with an embedded ONNX runtime and is also available standalone as an MIT-licensed CLI, HTTP server, Python API, and MCP server. Panda Orchestrator: A 32M-Parameter Model That Routes Your AI Coding Tasks A tiny local router model picks the cheapest capable AI model for each coding task, cutting cost while nearly matching perfect routing in tests. What is Panda Orchestrator? Panda Orchestrator is a system built around a small local model, called Panda Router, that decides which AI model should handle a given coding task. Instead of sending every task to one expensive model or guessing with a cheap one, the router reads the task, scores it against a pool of available models, and picks the one most likely to succeed at the lowest cost. It was built as part of Panda Code, an open-source workspace for running Claude Code, Codex, Kimi, Open Code, and other coding agents side by side. TL;DR - Panda Router is a 32-million-parameter decision model , distilled from a 150-million-parameter teacher trained on Modal, quantized to int8, and exported to ONNX at roughly 31 MB, small enough to run on a CPU in 10 to 25 milliseconds with no GPU required. - The router doesn’t write code or judge quality itself : it outputs a task category, a difficulty score from 1 to 10, required skills, and flags like tool or image needs, then a separate rules-based scoring system not a neural network matches that profile against model cards for cost, speed, and chance of success. - Training leaned on cheap synthetic labeling plus real outcome data : DeepSeek V4.1 Flash labeled about 8,000 tasks for $2.77, while an “attempt and grade” process had real models actually try tasks and a strict judge score pass or fail, until credits ran out around $44 to $50 total. - The escalation ladder is the core trick : each task starts on the cheapest model likely to succeed, and if it fails a check, the task moves to a strictly stronger model next, never down, capped at two retries. - Benchmark results on 150 held-out tasks with a nine-model pool showed single-pick routing matching an always-use-the-best-model baseline at lower cost , and escalation with up to two retries pushed success from about 77-79 out of 100 up to roughly 91, close to the theoretical best case of 94. - The whole project cost around $50 in compute and training and went from an empty repository to a working version in about three days, according to its creator. - The router is now built directly into Panda Code in Rust with an embedded ONNX runtime , so it runs with no Python dependency, and it’s also available standalone as an MIT-licensed CLI, HTTP server, Python API, and MCP server for use with other agent frameworks. regulatory compliance and security. - Name - Maria Alvarez - Date of birth - SSN - Diagnosis - Balance due - $412.80 How does the router actually decide which model to use? The system splits judgment and policy into two separate layers on purpose. The neural network only produces a profile of the task: its category, a 1-10 difficulty rating, the skills it needs, and flags for things like tool use or image input. A conventional piece of code then takes that profile and scores every available model against three factors: estimated chance of success, expected cost, and speed. Keeping the scoring logic in plain code rather than inside the model matters for debugging. If the router makes an odd choice, the rules can be inspected and adjusted directly instead of requiring retraining. Every model in the pool is represented by a small JSON card containing skill ratings, price, context window, and latency. When a new model launches, which now happens almost constantly, adding a card is enough. No retraining is needed for the router to account for it. How was Panda Router trained? The profiler architecture is based on Etin, a family of small MIT-licensed encoder models trained on open data that includes code, with all sizes sharing one tokenizer. That let the builder train a larger 150-million-parameter teacher model on Modal and distill it down into the 32-million-parameter student that ships in production. Getting training data was the harder problem. Labeling roughly 8,000 tasks with DeepSeek V4.1 Flash cost under $3, but those labels only reflect guesses about difficulty, not real outcomes. To get actual outcome data, the process called “attempt and grade” had real models try tasks for real, with a strict judge grading each attempt as pass or fail. That data is what let the system learn which models genuinely succeed at which kinds of tasks, not just which ones look capable on paper. From those real outcomes, a separate “success head” was trained to output a calibrated probability of success per model, plus a lower-confidence bound. The router makes its decisions using that lower bound rather than the optimistic estimate, so it avoids betting on a model that only looks good in aggregate. Cost comparisons also factor in the cost of failed attempts, since a cheap model that fails half the time isn’t actually cheap once retries are counted. Two training details stand out. The difficulty-rating loss function was deliberately lopsided: if the model has to err, it’s tuned to overestimate difficulty rather than underestimate it, since underrating a task is the costlier mistake. Separately, the router was fine-tuned on about 1,500 deliberately vague prompts “make the app better” with no scope , which are rated as harder tasks since any model struggles with ambiguous requirements. What results did it actually produce? 1,284 37 6 | Vendor | Tier | Risk | Approval