{
  "schemaVersion": 1,
  "generatedAt": "2026-08-12T23:39:59.243Z",
  "generationKey": "3158915606d5df1e46812c0880b7fc4ebaddab7106234f9d009e07bd46a2d7e6",
  "metadataPayloadSha256": "16b35333e0893dd869dca87980737f1b0306b4005da2174d29ecc3eeac75f57b",
  "diagram": {
    "id": "llm-model-routing-631e93d7",
    "title": "LLM model routing",
    "description": "request → features + embedding → per-model scoring + cost → policy → decision. The dotted edge is shadow mode, the rollout default: the decision is logged next to the model the host actually used, and realized cost/latency/quality flow back as RewardSignal feedback either way.",
    "status": "current",
    "canonicalAppearanceKey": "tsx:src/app/(docs)/docs/concepts/llm-router/page.tsx:routerChart#1"
  },
  "aliases": [],
  "concepts": [
    "LLM router",
    "Router"
  ],
  "keywords": [
    "models.yaml: price, tier, capabilities",
    "engineered features",
    "sentence embedding",
    "LightGBM scorer",
    "model catalog",
    "cost model",
    "rollout default",
    "gateway (litellm)",
    "RewardSignal feedback",
    "messages · required capabilities · budget",
    "~45 signals: code, format, depth, domain",
    "MiniLM 384-dim · hash fallback",
    "per-model quality + confidence",
    "token estimate → expected USD per model",
    "chosen model · scored slate · fallback chain",
    "shadow (rollout default)",
    "execute + fallback on error",
    "realized cost · latency · quality",
    "eligibility → quality floor → quality-per-dollar",
    "RouteRequest",
    "policy",
    "RouteDecision",
    "active"
  ],
  "mermaid": {
    "type": "flowchart",
    "direction": "TB",
    "sourceSha256": "631e93d71b118dd16c0fe9b0407201f6baff19e073a452abd1e7e431cd6611e5"
  },
  "provenance": [
    {
      "appearanceKey": "tsx:src/app/(docs)/docs/concepts/llm-router/page.tsx:routerChart#1",
      "surface": "route",
      "sourcePath": "src/app/(docs)/docs/concepts/llm-router/page.tsx",
      "line": 27,
      "route": "/docs/concepts/llm-router",
      "symbol": "routerChart",
      "caption": "request → features + embedding → per-model scoring + cost → policy → decision. The dotted edge is shadow mode, the rollout default: the decision is logged next to the model the host actually used, and realized cost/latency/quality flow back as RewardSignal feedback either way."
    }
  ],
  "embeddedMetadata": [
    {
      "sourcePath": "src/app/(docs)/docs/concepts/llm-router/page.tsx",
      "caption": "request → features + embedding → per-model scoring + cost → policy → decision. The dotted edge is shadow mode, the rollout default: the decision is logged next to the model the host actually used, and realized cost/latency/quality flow back as RewardSignal feedback either way."
    }
  ],
  "generation": {
    "application": {
      "name": "eli-ai",
      "version": "0.1.0"
    },
    "environment": {
      "node": "v26.3.1",
      "yarn": "4.17.1",
      "platform": "linux",
      "architecture": "x64",
      "containerImage": "playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109"
    },
    "packages": {
      "mermaid": "11.16.0",
      "mermaidCli": "11.16.0",
      "playwright": "1.62.1",
      "playwrightCore": "1.62.1",
      "puppeteer": "25.6.0",
      "puppeteerCore": "25.6.0"
    },
    "renderer": {
      "mermaidConfigSha256": "68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101",
      "themeCssSha256": "c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033",
      "browser": {
        "name": "chromium",
        "revision": "1234",
        "version": "151.0.7922.34",
        "executableSha256": "0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71"
      },
      "font": {
        "family": "Eli Diagram Inter Variable",
        "fileSha256": "3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62",
        "licenseSha256": "3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345"
      }
    },
    "adapterVersions": {
      "diagramGenerator": "2",
      "drawioFlowchart": "1",
      "drawioSequence": "1",
      "drawioState": "1",
      "drawioGantt": "1"
    }
  },
  "artifacts": {
    "mmd": "/diagrams/llm-model-routing-631e93d7/llm-model-routing-631e93d7.mmd",
    "svg": "/diagrams/llm-model-routing-631e93d7/llm-model-routing-631e93d7.svg",
    "png": "/diagrams/llm-model-routing-631e93d7/llm-model-routing-631e93d7.png",
    "drawio": "/diagrams/llm-model-routing-631e93d7/llm-model-routing-631e93d7.drawio",
    "json": "/diagrams/llm-model-routing-631e93d7/llm-model-routing-631e93d7.json"
  },
  "artifactSha256": {
    "mmd": "20b87d78241f9498508020e56b3e9203cf4dec0a49227c56ef70e033b0d1574c",
    "svg": "490eefedf2bef03f3843d327e0377994d7c6db2d9ae9bc951ae81cf1661dbd46",
    "png": "7ebccc4ea60908466d8b4649d7cb56aeeb8c28ec2b89078276ab2ccc4f68db5f",
    "drawio": "ba811247eab52fcc9e0f7a7741525461a1123efc7eeefb8dbadc8d48709cec95"
  }
}
