choicemodel_tierWhich model tier should handle this request?
smallbalancedfrontier
LLM infrastructure
Choose a fast, balanced, or frontier model before sending the request into a more expensive inference path.
Use a typed choice as the policy layer that decides which downstream model should handle a request.
Prove whether the following Rust unsafe block can cause undefined behavior and explain the exact aliasing rule involved.
choicemodel_tierWhich model tier should handle this request?
noulneeds_reasoningDoes this request require deep technical reasoning?
from laya import Router
router = Router(preload=True)
state = {"request": "Prove whether this Rust unsafe block can cause undefined behavior."}
questions = {
"model_tier": {
"type": "choice",
"instructions": "Which model tier should handle this request?",
"criteria": {"small": "simple extraction", "balanced": "normal reasoning", "frontier": "deep technical reasoning"}
},
"needs_reasoning": {"type": "noul", "instructions": "Does this request require deep technical reasoning?"}
}
print(router.predict(state, questions))import { Laya } from "@receptron/laya";
const laya = await Laya.load();
const result = await laya.systemOne(
{ request: "Prove whether this Rust unsafe block can cause undefined behavior." },
{
model_tier: { type: "choice", instructions: "Which model tier?", criteria: { small: "simple", balanced: "normal reasoning", frontier: "deep technical reasoning" } },
needs_reasoning: { type: "noul", instructions: "Does this require deep technical reasoning?" },
},
);
console.log(result.answers);
await laya.close();