Local Inference Stack Architecture
Status: active Last verified: 2026-07-19 (against the current AI platform overview, evaluation contract, and attended vision-canary runbook) Scope: model routing, capability lanes, readiness checks, and promotion boundaries
The local inference stack provides private, OpenAI-compatible model access for chat, coding agents, retrieval-assisted tools, and unattended services. It is an internal platform rather than a public API.
This page describes capability boundaries and change controls. Deployment addresses, management endpoints, model paths, prompts, and credentials remain in private operations documentation.
Request path
LiteLLM is the stable front door. Callers request a capability alias instead of binding themselves to a particular model build or inference server. LiteLLM then forwards the request to the corresponding vLLM lane.
chat, agents, and internal services
↓
LiteLLM model front door
↙ ↘
fast vLLM lane deep vLLM lane
short tasks reasoning, tools,
long context, vision
The aliases separate the client contract from the model lifecycle. A model can be evaluated, rejected, promoted, or rolled back behind a lane without changing every consumer.
Retrieval is adjacent to inference rather than embedded inside it. Retrieval services assemble grounded context; the selected model lane reasons over that context. A retrieval failure and an inference failure therefore remain distinguishable operational problems.
Lane roles
| Lane | Intended work | Design priority |
|---|---|---|
| Fast | Classification, routing, extraction, and short plumbing tasks | Low startup and response cost |
| Deep | Complex reasoning, code, long-context synthesis, native tool calls, and bounded image understanding | Capability and answer quality |
The lanes are roles, not permanent model identities. Current implementations use models from the Qwen family, but callers depend on fast and deep, not on a specific checkpoint name.
Workload owners choose the lane deliberately. Short mechanical work should not consume the deep lane merely because it is available, while tool use or difficult synthesis should not be sent to the fast lane without evidence that it satisfies the required contract.
Readiness is more than a running container
A lane is ready only after the complete request path has been exercised. Validation checks that:
- The front door advertises the expected capability aliases.
- A normal completion succeeds through the routed path.
- Native tool calls produce structurally valid arguments rather than tool-shaped prose.
- Required retrieval and agent consumers can still reach the model front door.
- The serving process has no new out-of-memory events, restart loops, or active health alerts.
Multimodal readiness adds bounded image cases while preserving the existing text, tool, and long-context behavior. Passing a new capability does not excuse a regression in an old one.
Candidate promotion
Model and serving changes use an attended, fail-closed canary:
- Freeze the evaluation corpus, answer keys, and numeric rejection thresholds.
- Verify that rollback material and monitoring are available.
- Capture an immediate production baseline with the same prompts and sampling settings.
- Apply one reversible candidate change.
- Record raw responses, transport failures, tool parsing, latency, truncation, and resource health.
- Promote only when every applicable hard gate passes.
- Restore the baseline before investigating a failed candidate.
- Recheck routed requests, downstream consumers, restart state, and alerts after either promotion or rollback.
The candidate model does not grade itself. Exact answers and structural checks are primary; any qualitative tie-break uses an independent judge with the raw judgments retained.
Deployment and evaluation are intentionally separate. The evaluation runner measures a candidate but does not deploy, restart, reroute, or restore services. Those mutations stay in an attended runbook with an explicit rollback checkpoint.
Failure boundaries
| Failure | Expected effect |
|---|---|
| One inference lane is unavailable | Requests assigned to that capability fail unless the caller has an independently verified fallback |
| Shared model front door is unavailable | Both local capability aliases become unreachable through the normal path |
| Retrieval service is unavailable | Grounded project or infrastructure context is unavailable even if raw inference still works |
| Candidate misses a hard gate | Promotion stops and the known baseline is restored |
| Model behavior regresses after promotion | Roll back the lane, then verify routing, consumers, process health, and alerts |
| GPU capacity is exhausted | Admission slows or fails; health and resource evidence determine recovery rather than blind restart loops |
The platform favors explicit capability contracts over transparent magic. Routing is simple enough to inspect, promotion evidence is preserved, and rollback is part of the change result rather than optional cleanup.
Related documentation
- AI Inference VM — compute and GPU platform context
- Dual-3090 Model Bakeoff — measured model-selection evidence
- Monitoring — operational visibility and alert routing
- Lab Philosophy — authority and automation boundaries