Skip to Content
UI Kit
Components (172)

Model Router

Model Router — how a gateway splits its traffic across models, in a single self-contained file.

Open preview
Loading Model Router…

Usage

import { ModelRouter } from "ui-kit/components/model-router";

Props

PropTypeDefaultDescription
models*RouterModel[]——
strategies*RouterStrategy[]——
live*RouterPolicy—The policy that's live now – the one the picked strategy is compared to
versionnumber1Its version – "Policy v14"
environmentstring—Where it runs – "chat-prod"
onDeploy(policy: RouterPolicy) => void | Promise<void>—Deploy the policy – while the promise runs the button says Deploying…
onChange(policy: RouterPolicy) => void——
titlestring"Model router"—
classNamestring——

On this page