The brief
laya-code-router is our open-source router for Claude Code. It sends each turn to the model the job needs: Haiku for lookups, Sonnet for ordinary coding, Opus for hard work. A small model on your own Mac makes the call, so the prompt never leaves the machine. The README explains that to developers who already care. We wanted a short film that explains it to anyone, and backs it with the router's own measured numbers instead of claims.
What we made
- A 78-second film, 1920x1080 at 30 fps, 2,342 frames
- Eight scenes: the problem, the idea, thirteen real turns, the cost, the app, what we got wrong, answer quality, and what it does not show
- Every frame drawn in code with React and Remotion, with no video model and no generated images
- A real screen recording of the menu-bar app, played at normal speed
- No number typed in by hand. The film reads every figure from the run files when it renders
How it works
Two measured files drive the film. run1.json holds 13 real turns sent through the router, each with its prompt, the model it went to and how long the decision took. quality.json holds ten questions about a small test project, each asked of Haiku and of Opus and checked against the code.
One data file works out everything the film states from those rows: the split (9 turns to Haiku, 2 to Sonnet, 2 to Opus), the median decision time of 559 ms, and how many turns the router sent somewhere other than our label. Change the run, render again, and the film changes with it.
Answers are scored by a rule, not by another model. An answer passes only if it states the true fact from the code. Haiku and Opus both got 10 of 10.
Each scene overlaps the next by 18 frames and draws something on its first frame, so no cut ever passes through a black frame.
What we threw away
Our own labels. Before the run we marked every prompt easy, ordinary or hard. The router disagreed on 8 of 13. Five of the "ordinary" prompts went to Haiku, two of the "hard" ones went to Sonnet, and one easy lookup went to Opus. We kept the router's answers and put the disagreement on screen, in a scene called "What I got wrong", instead of quietly relabelling to make the chart look tidy.
That raised the obvious question, so the next scene answers it: were the cheaper answers right? On the ten questions, Haiku matched Opus answer for answer.
Limits
The sample is small: 13 routed turns and ten checked questions per model, on one machine, one small project, read-only prompts. The quality test covers lookups and short reasoning, not the three hard prompts the router sent up. The router's thresholds were fitted on 116 other labelled prompts, not these 13. The film has no sound, and its smaller text is hard to read on a phone. The router is a port of an MIT-licensed project, jev-router. The hosted decision call was replaced with LAYA, an open model we did not make, running locally, and the app, installer and usage tracking are new. On 2026-11-04 its test suite passed 854 of 854 on one run. An earlier run that day had two failures in timing-sensitive tests.









