madewithlaya

Catalog / LLM routing & guardrails

0088GitHub

laya_router: a model router with Laya matches GPT-5 nano's accuracy, 35x faster, free

Two routers behind one endpoint, measured on 180 labelled requests. Laya answers small/medium/powerful routing in one forward pass, against a GPT-5 nano router.

Open source ↗ github.comcostfree, localtime-
glukicov/laya_routerREADME ↗
Your model router runs on every request. Does it need to be a language model?</h2>

[](https://github.com/glukicov/laya_router/actions/workflows/ci.yml)
[](LICENSE)
[](.python-version)
[](https://github.com/astral-sh/uv)
[](https://github.com/astral-sh/ruff)
[](https://github.com/astral-sh/ty)
<br>
[](https://huggingface.co/convaiinnovations/laya)
[](https://platform.openai.com/docs/guides/structured-outputs)
[](https://fastapi.tiangolo.com)
[](https://kind.sigs.k8s.io)

**[Read the accompanying article on Medium](https://medium.com/@lukicov/smart-routing-with-an-open-source-system-1-model-laya-416fe771ce2e) · [Result](#result) · [Quickstart](#quickstart) · [The experiment](docs/EVAL.md) · [The data](data/README.md)**

</div>

**laya_router — a smart model router, with two brains.** Every request goes to the router first: it decides
whether a `small`, `medium` or `powerful` model should answer, then the work goes there. That decision is on
the critical path of every single request, so the router's own latency and bill are pure overhead.

Which makes routing a **System 1** job. In Daniel Kahneman's
[*Thinking, Fast and Slow*](https://en.wikipedia.org/wiki/Thinking,_Fast_and_Slow), System 1 is fast,
automatic and intuitive; System 2 is slow, deliberate and effortful. Deciding *which model should answer
this* is a reflex, not a deliberation — you want the snap judgement, and you want it before the real work
starts.

This repo puts two routers behind one endpoint and measures them on 180 labelled requests.
[**Laya**](https://huggingface.co/convaiinnovations/laya) is a 421M non-autoregressive decision model that
describes itself as a *System 1 decision engine* — its API method is literally `system_one()`. It answers
all three routing questions in **one forward pass** as prob

Also filed under LLM routing & guardrails

  1. 0100

    laya-jev-lab: a local-first cascade that matches Jev's accuracy at 1.8x the speed

    Independent Jev vs Laya measurements plus a cascade: Laya decides first, high confidence executes, low confidence escalates to Jev. At a 0.60 threshold it matched Jev's 78%.

    @yibie · LLM routing & guardrails · lower than pure Jev

  2. 0096

    Laya Ultrafast: browser-use's jev-ultrafast agent ported to local Laya on MLX

    A port of the jev-ultrafast browser agent that decides with laya-mlx instead of the hosted Jev API. DOM snapshot, executor, safety checks and inspector are the originals.

    @ipenywis · LLM routing & guardrails · free, local

  3. 0076

    laya-browser-agent: browser decisions on Laya, drop-in for jev-ultrafast tooling

    Local decider for the browser-agent loop: hand it a numbered table of page controls and it picks the operation and element. Playwright/CDP driver, speaks /v1/systemone.

    @ChenneyZhuang · LLM routing & guardrails · free, local, no screenshots

  4. 0075

    jevals: agent evals and guardrails as decisions, runnable on every trace

    Openlayer's library packs every eval for a trace into one decision request: tool choice, grounding, scope, injection, PHI. Runs on Jev, or on Kev or Laya locally on a Mac.

    Openlayer · LLM routing & guardrails · fractions of a cent (Jev) or free (local Laya) · a few hundred ms per trace