UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

16 lines (15 loc) • 748 B
/** * Pluggable pre-call request router types. * * A RequestRouter is a host-supplied async function that inspects lightweight * request characteristics (token estimate, tools, vision, thinking) and * returns an optional provider/model/region override. The router runs only * when the host opts in (by passing `requestRouter` or `modelPool` to * the NeuroLink constructor) and only when the user did NOT explicitly set * BOTH `options.provider` AND `options.model` on the call (a partial pin — * e.g. only `options.provider` — still allows the router to run). * * Everything fails open: if the router throws or returns an empty decision the * call proceeds with whatever provider/model was configured by the caller. */ export {};