AI systems often begin as direct provider API calls. In production that leaves gaps around identity, policy, MCP tool governance, scaling, telemetry, cost visibility, and auditability. Every team reinvents rate limits, fallback, and audit trails in application code.
AI Runtime Platform
An AI runtime execution plane makes model calls behave like production infrastructure: governed, observable, scalable, and owned by platform contracts rather than scattered application code.
How it works
From request to a runtime decision.
AI Runtime Platform by Andrey Lesnikov — an OpenAI-compatible execution plane that routes to vLLM and KServe on Kubernetes using health, cost, and canary policy.
-
01
Ingress the request
Clients hit an OpenAI-compatible FastAPI gateway — one boundary for apps and agents instead of scattered provider SDKs.
-
02
Decide the runtime path
Health, latency, cost, canary weights, and fallback policy select the backend; the decision is visible on every completion response.
-
03
Serve on Kubernetes
vLLM and KServe paths run with probes, ServiceMonitors, and KEDA queue autoscaling — GPU or local CPU compose for demos.
-
04
Observe and deliver
OpenTelemetry traces the intent-to-model path; Argo CD ships the plane with SBOM, cosign, and supply-chain gates.
Evidence
From problem to proof.
How the system is framed, operated, and proven — not a slide deck summary.
The runtime plane combines an OpenAI-compatible gateway, MCP governance, intent proxying, KServe/vLLM serving paths, KEDA scaling, Redis state, OIDC identity, and OpenTelemetry traces. Policy and quotas sit in front of model execution; traces follow the request from client intent to provider response.
Platform owns the contracts: who can call which tools, which models are allowed, which budgets apply, and which SLOs burn when latency or error rates climb. Application teams consume a stable interface instead of wiring providers ad hoc.
A runtime plane introduces more platform responsibility than direct SDK usage. The payoff is consistent governance, reusable observability, clearer failure isolation, and a better path from prototype to production.
Useful signals include policy decision logs, token and cost metrics, provider fallback counts, KEDA scale events, and end-to-end traces that name the intent, tool, and model path.
Fleet-wide Redis admission: tenant × model concurrency is a Redis-backed distributed semaphore (atomic Lua acquire, TTL leases with fencing tokens, renewal during streams), so the limit holds across gateway replicas and capacity returns after a pod dies. Redis unavailable → 503 admission_store_unavailable by default (fail_closed). Platform e2e covers two replicas sharing one limit and SIGKILL mid-stream (CI run 38121712037). GOVERNANCE_MODE defaults to enforce (PR #100): enforce without CONTROL_PLANE_URL fails readiness (503) and chat returns 503 governance_misconfigured — governance is never silently skipped; disabled must be set explicitly. Golden path: block → 403, approval → 409 then 200, Redis down → /readyz 503; suite 21.5 s on Compose (run 38060436977, docs/results.md).
v2.5.0 adds an opt-in Inference Budget Guard on the gateway chat path (INFERENCE_BUDGET_ENABLED): reserve estimated spend → execute → settle actual usage, with atomic Redis Lua reservation (shared across replicas) or an in-process lock when Redis is unset. Money is integer micro-USD. Fail-closed: 503 when the store is down, times out, or returns corrupt data (and on malformed policy); 429 when over budget — the backend is not called. On this test suite, real Redis with 8 OS processes × 25 concurrent reserves × 10 rounds held the invariant (allows/round=[142], expected 142; max reserved 994000 of 1000000 micro-USD; overspend_events=0); concurrent settle was exact in 10/10 rounds with leaked_reserved_micros=0; legitimate within-budget false_deny_count=0 (80 tests passed; docs/EVIDENCE.md, docs/results.json, docs/budget-guard.md). Documented limits on this test suite: the pre-request estimate uses the budget policy's prices while settlement uses the gateway's model prices; if Redis fails after the upstream call, that spend is lost (reservation held until TTL, then released); without Redis the budget is per gateway process.
OpenAI-compatible interfaces, MCP tool boundaries, model-serving latency, Kubernetes autoscaling, OIDC, audit trails, cost visibility, and opt-in inference budget admission (integer micro-USD).
Deep dive
Model calls as infrastructure, not SDK litter.
AI Runtime Platform turns inference into a governed execution plane: one OpenAI-compatible boundary, a visible routing decision, Kubernetes serving paths, and traces from intent to model response.
Applications and agents call an OpenAI-compatible gateway. The gateway evaluates health, latency, cost, canary weights, and fallback policy, then routes to vLLM or KServe on Kubernetes. Every completion can expose why that backend was chosen. OpenTelemetry follows the path; GitOps (Argo CD) delivers the plane with supply-chain gates. Platform owns contracts; apps consume a stable interface.
Direct provider SDKs feel fast on day one. By week six every team has its own retries, keys, rate limits, and a Slack thread titled “which model are we on?”. Cost shows up as a surprise. Incidents show up as guesswork.
The execution plane exists so model access behaves like any other production dependency: identity at the edge, policy before work, scale designed not improvised, and telemetry that names the intent — not just the HTTP 200.
Request path
-
01
Ingress
Clients hit a FastAPI gateway — one boundary for services and agents instead of scattered provider SDKs.
-
02
Decide
Health, latency, cost, canary weights, and fallback policy select the backend. The decision is part of the response path.
-
03
Serve
vLLM and KServe paths run with probes and ServiceMonitors; KEDA scales on queue depth so GPU capacity follows demand.
-
04
Observe
OpenTelemetry ties intent → tool/policy → model path. Argo CD ships the plane with SBOM and signing gates.
What platform owns vs what apps own
Contracts and capacity
Identity (OIDC), backend catalog, canary and fallback rules, budgets, SLOs, traces, GitOps delivery, GPU/CPU serving paths.
Intent and product logic
Prompts, product workflows, agent graphs, and business retries that are truly domain-specific — not reinvented provider plumbing.
Error semantics
Rate limits, overloaded backends, and policy denies must be stable codes apps can handle without scraping HTML error pages.
Failure modes the plane is meant to absorb
Hot backend
Latency or error burn on primary → canary/fallback shifts traffic without every client shipping a new SDK config.
Cost spike
Token and spend metrics are first-class. Budgets fail closed or warn with ownership — not a month-end invoice autopsy.
Agent tool sprawl
MCP tools without identity become shadow APIs. Governance at the plane keeps allow-lists and audit in one place.
Demo-only serving
Local CPU compose exists for demos; production paths assume probes, autoscaling, and GitOps. Mixing those modes silently is how outages hide.
Signals on the operating dashboard
Share of traffic per backend / canary lane — sudden flips should correlate with health, not mystery.
Rising fallback is an early incident signal even when user-facing error rate still looks calm.
Cost per intent class beats average token price for finding the workload that actually burns money.
Gateway SLOs should page before GPU utilization dashboards become archaeology.
How to carry this
Platform hop
You accept a hop and platform ownership. Direct SDKs feel lighter in a prototype. The plane wins when more than one team consumes models or incidents need an explainable route.
Architecture Rehearsal
Use rehearsal when the change is new serving topology, tool surface, or fallback graph — not just a prompt tweak.
Ingress first
Start with one OpenAI-compatible ingress, decision headers, and cost metrics. Add canary/fallback once the golden path is trusted.
Guides
Read the guide.
Related
Nearby systems.
AI Infra Control Plane
Private AI platforms need shared governance across identity, policy, audit, cost, and SLO signals — not scattered service configs
Private AI with explicit platform contracts
Cloud-Native AI Gateway
AI usage needs routing, policy, budget awareness, and provider resilience
One boundary: rate, budget, fallback, OTel
LLM Infrastructure Runtime
LLM workloads move faster than traditional platform controls and can quickly become expensive, opaque, and hard to operate
LLM serving with operability signals
FAQ
Questions operators ask.
Direct SDKs scatter identity, retries, budgets, and fallback across every app. The execution plane centralizes those contracts behind an OpenAI-compatible gateway with visible routing decisions.
Health, latency, cost, canary weights, and fallback policy select vLLM or KServe backends. The decision is part of the completion path so incidents are explainable.
When agents call tools, allow-lists and identity belong in the same plane as model I/O — otherwise every agent reinvents shadow APIs.
Watch decision mix, fallback rate, token/cost by intent, and gateway SLO burn — not only GPU utilization charts.