Skip to content
Opod

Endpoints

The plan

Every field of an endpoint's plan (apiVersion opod.io/v1) — model, workers, gangs, autoscale, workload, routing, doors, canary, eval and adapters.

The plan is an endpoint's desired state. Read it with GET /api/v1/endpoints/{id}/plan. Change it with PUT /api/v1/endpoints/{id}/plan (an edit, applied at once) or POST /api/v1/endpoints/{id}/rollouts with the plan as the body (a verified rollout). Add ?dryRun=true to the PUT to validate only. Both need the operator role; in 0.3.0 a machine token with scope plans:write may make them too.

Every write is judged by the planner and stored with the next revision. In 0.3.0, every revision is also kept in the plan history with its cause (create, edit, rollout, rollback, scale, sleep, wake, grant, adapters, imported), and a plan edit is refused E-RUN-ACTIVE while a rollout, rollback or create runs on the endpoint.

apiVersion: opod.io/v1
revision: 3
placement: explicit
model: { id: llama-3.2-3b, source: catalog, format: gguf, engine: llamacpp }
colocation: shared
workers:
  - { node: node-c, gpu: 0, vramBudgetGb: 6, engine: llamacpp, replicas: 1, flags: { ctx: "8192" } }
shardGroups: []
autoscale: { floor: 1, max: 3, unit: workers }
door: { alias: chat }

In short

The plan is one YAML or JSON document that says what an endpoint runs: the model, the workers or gangs, the autoscale bounds, the doors and the rollout gates. You never edit pods. You change the plan, and the control plane makes the cluster match it. Every change is checked first, so a plan that cannot run is refused before anything moves.

When you need it

  • To change what an endpoint runs: a bigger context, another engine, more workers, a tensor split.
  • To turn on a feature that lives in the plan: front doors, the cell door alias, a canary, an eval gate, LoRA adapters.
  • To read why an endpoint looks the way it does: resolved, images and advisories.

Do it

  1. Read the stored plan

    curl -s -H "$H" https://cp.example.com/api/v1/endpoints/<id>/plan > plan.json
    jq '{revision, placement, workers}' plan.json
  2. Change one thing

    For example, raise vLLM's context window on every worker row:

    jq '.workers[].flags.max_model_len = "16384"' plan.json > new.json
  3. Validate it without applying

    curl -s -H "$H" -H 'Content-Type: application/json' -X PUT \
      "https://cp.example.com/api/v1/endpoints/<id>/plan?dryRun=true" -d @new.json | jq '.workers'

    A 200 answers the plan as it would be stored, and nothing changes. A 400 names the rule and, for a planner refusal, an E-… code in details.code. Once a plan is stored, GET /api/v1/endpoints/{id} carries the planner's advisories for it.

  4. Roll it out

    curl -s -H "$H" -H 'Content-Type: application/json' -X POST \
      "https://cp.example.com/api/v1/endpoints/<id>/rollouts?note=context%2016k" -d @new.json | jq '{id, state}'

    A verified rollout proves each step and puts the old plan back when a step fails. Use PUT …/plan without dryRun only when you want the change applied at once, with no proof steps.

Check it worked

curl -s -H "$H" https://cp.example.com/api/v1/endpoints/<id>/plan | jq '{revision, flags: [.workers[].flags.max_model_len]}'
curl -s -H "$H" https://cp.example.com/api/v1/endpoints/<id>/status | jq '{phase, rollingOut}'

A good answer: revision is one higher, the flag reads "16384", phase is serving and rollingOut is empty. In the console, the endpoint page shows the new revision; from 0.3.0 its History tab shows the diff.

If it fails

Symptom or codeCauseFix
400 naming an unknown flag keythe engine does not take that flag; the message lists the keys it knowsuse a listed key, or pass it as plain tokens in flags.extra
400 naming a model that is not in the cataloga model id the catalog does not know needs model.repoadd model.repo (and model.file for GGUF), or add the model first (Models)
E-ENGINE-MODELthe engine cannot load the model's formatanother engine, or another format
E-UNVERIFIEDverifiedOnly is on and the path was never provenprove it with opodcp verify, or turn verifiedOnly off
E-MTLS-REPLICAS, E-MTLS-GANGworkers.mtls=require and the plan has replicas or gangssee Refusals below
E-RUN-ACTIVE (0.3.0)a rollout, rollback or create runs on the endpointwait for it, or cancel it
A rollout ends rolled-backa step failed; the old revision is backread the failed step's error and code (Rollouts)

Top-level fields

FieldDefaultMeaning
apiVersionopod.io/v1schema version; a missing one is filled, an unknown one refused
revisionset by the serverbumped by every write
placementexplicitexplicit or auto; see Placement
resolvedset by the serverthe auto ladder's pinned answer; re-resolved only by a rollout
model—what is served (below)
colocationdedicateddedicated (a whole GPU per worker) or shared (packed by vramBudgetGb); anything else is refused
workers[][]single-pod workers (below). A plan needs at least one worker or one gang
shardGroups[][]gangs; see Gangs
autoscalefixed sizesee Autoscaling
workloadnonethe expected traffic; the planner sizes memory from it. See KV cache and sizing. New in 0.3.0
routing.cacheIsolationteamwho may share the prefix cache: team, key or none. New in 0.3.0
routing.sessionon: ttlSec: 300, signedRoute: true, turnPriority: truefrom 0.3.3: how a conversation (named by X-Opod-Session or the OpenAI user field) keeps its worker, across front doors; disabled: true pins per key as before. ttlSec 0 … 86400. See Routing → Sticky sessions
kvEventsfalsevLLM workers report the KV blocks they hold, for cache-aware routing; a launch flag, so it rides a rollout
gatewaysofffront doors: enabled, replicas (pin the count), max (cap a derived count, default 8)
door.alias""the endpoint's name on the cell door; unique in the cell
exposure.inferencePool""join a Gateway API InferencePool of this name. New in 0.3.0
speculativeabsent (off)from 0.3.6, with a leader and workers from core v0.4.5: speculative decoding for every worker, {method: ngram, tokens: 4} — the engine guesses the next tokens (1–16) by looking them up in the prompt and the model checks them in one step, so answers are unchanged. vLLM, SGLang and llama.cpp on NVIDIA; another vendor or a gang is refused E-SPEC-UNSUPPORTED. method: draft with model: <id> (a small model of the same family proposes the tokens) arrives in the release after 0.3.6: the draft must be a registered model with a size — it is counted with the model's in every sizing — and loadable as a draft (a GGUF file for llama.cpp, a safetensors repo for vLLM and SGLang), else E-SPEC-DRAFT. On the cell's 8 GB cards a draft only a third the size of the model made chat 20–51 % slower: a draft pays when the model is many times larger. On the design-partner cell a copy-heavy load ran 2.9–3.5× faster at 1 stream on all three engines and 1.6–2.2× at 16; plain chat ran 1–8 % slower on vLLM and llama.cpp and 22–30 % faster on SGLang. CLI `opodcp endpoint speculative --method ngram
exposure.vertexfalseserve Vertex AI's custom-container routes on the leader. New in 0.3.0
canarynoneholdSeconds (default 600) and weight (percent of requests) for a rollout's canary step
evalnonesuite, image, minScore, timeoutSeconds (default 900) for a rollout's eval step
adapters[][]LoRA adapters: name, source, rank; vLLM only, at most 16
verifiedOnlyfalserefuse any placement path this control plane has not proven (E-UNVERIFIED)
imagesset by the serverthe digest-pinned images the plan runs, keyed leader or <engine>/<vendor>; written for missing keys at create and re-pinned only by a rollout, never by an autoscale edit
extranonefree-form data kept with the plan; nothing in the control plane reads it

The endpoint's SLO (ttftMs, latencyMs, tpotMs, availabilityPct) is not part of the plan: set it with PUT /api/v1/endpoints/{id}/slo, or in the create body. It rolls nothing. An empty body clears it.

model

FieldMeaning
idthe model id; for a remote endpoint, the vendor's id
sourcecatalog, hf, oci, s3 or remote
formatgguf or safetensors (or fp8 and other formats a catalog entry states)
enginellamacpp, vllm, sglang, trtllm; resolved from the catalog when empty. A remote endpoint's engine is stored as openaicompat
repo, filethe Hugging Face repo and, for GGUF, the file
versiona registered model version; resolved to revision and sha256 when the plan is stored
revision, sha256pin exact bytes, with or without a version name
remoteUrla remote endpoint's base URL

One endpoint serves one model identity. A model id that is not in the catalog needs model.repo (and model.file for GGUF), or the plan is refused 400. The planner refuses an engine that cannot load the model's format (E-ENGINE-MODEL). Pinning an archived version is refused E-VERSION-ARCHIVED. With approval required, pinning an unapproved version is refused E-MODEL-UNAPPROVED; see Models → Approval.

workers[]

FieldMeaning
node, gpuwhere it runs; empty node lets the placer choose
vramBudgetGbthe VRAM it may hold on a shared card. From 0.3.0, a shared worker that states none is sized from its model (weights, KV pool and overhead); in 0.2.1 it is required. See Placement. A model with no recorded size or architecture still needs one
enginethe worker's engine; every worker of an endpoint runs the plan's engine
replicasidentical copies of this row, at least 0. Omitted means 1 when autoscaling is off; under autoscale, 0 is a parked row that keeps its node and flags
parallelismtensor (a power of two the node can hold); pipeline and data above 1 are gang shapes and replicas. A shared worker is one card, so tensor above 1 there is refused. expert: true asks for expert parallelism on a mixture-of-experts model: a gang shape only, vLLM or SGLang, dedicated, inside one machine unless a passed fabric proof measured all-to-all between machines; see Gangs
flagsengine settings passed to core (below)
imageoverride the cell's image for this engine and vendor
roleprefill or decode for one half of a disaggregated pair; empty = a complete server. Roles come in pairs: a plan with one role only is refused
kvOffloada KV cache tier below VRAM: tier, sizeGb, maxGb, diskGb. See KV cache and sizing. maxGb and diskGb are new in 0.3.0
modelSpecthe ConfigMap holding a Tenstorrent worker's vendor model spec; required on a Tenstorrent node, refused on any other (E-TT-SPEC)
sleepingset by the autoscaler while the worker's engine sleeps
shapeset by the autoscaler on a row it grew from a growth shape. New in 0.3.0

Common flags

Each engine accepts its own set of keys. Any other key is refused 400 and the message lists the keys that engine knows.

FlagEngineMeaning
ctxllama.cppcontext size, 512 to 4,194,304
parallelllama.cppslots, 0 to 4096
nglllama.cpplayers offloaded to the GPU, 0 to 4096
kv_cache_typellama.cppthe KV cache element type
kv_unifiedllama.cpptrue (one shared KV pool) or false (one per slot); from 0.3.0 the planner writes it from the colocation class
tensor_splitllama.cppeach device's share, for example "12,8"
max_model_lenvLLM, SGLang, TensorRT-LLMmaximum request length, 512 to 4,194,304
max_num_seqsvLLM, TensorRT-LLMrequests served at once, 0 to 4096; the leader admits by it (default 256)
max_running_requestsSGLangrequests served at once, 0 to 4096
gpu_memory_utilizationvLLMthe engine's memory fraction, 0.05 to 0.95
mem_fraction_staticSGLangthe engine's memory fraction, 0.05 to 0.95. SGLang with a speculative draft on an 8 GB card needs more than its default share; from core v0.4.6 (pinned by the chart in the release after 0.3.6) the endpoint's error names the value to set here
kv_cache_free_gpu_memory_fractionTensorRT-LLMthe KV cache's memory fraction, 0.05 to 0.95
pp_layer_partitionvLLM, SGLanglayers per pipeline stage, for example "8,12,12,8"
kv_cache_dtypevLLM, SGLang, TensorRT-LLMan 8-bit KV cache; opt-in. TensorRT-LLM takes it, and over weights it is not proven with it is refused E-KV-DTYPE, from 0.3.0
tpvLLM, SGLang, TensorRT-LLMdeprecated: a power of two from 1 to 64. Use parallelism.tensor; a tp that disagrees with it is refused
extraallfurther engine arguments as plain tokens

Split flags take numbers and commas only. Core passes a fixed set of flag keys to each engine and plain tokens in extra; an argument in JSON form in extra is dropped. A KV-cache connector typed into extra is refused: ask for a tier with kvOffload.

Nested objects

The pages linked below hold each block's rules and refusals. This section lists every field once, so the plan can be read from one place. A field marked server is written by the control plane; a value you send for it is ignored or replaced.

autoscale

FieldTypeDefaultMeaning
floorint0minimum workers or gangs; 0 = may scale to zero
maxint0maximum; 0 = autoscaling off, the worker set is fixed
unitstringworkersworkers or gangs
targetInflightint2in-flight requests one worker carries before another is added
idleSecondsint120how long demand stays below the current size before one worker parks
kvPressurePctint85grow when the busiest worker's KV cache reaches this percent; 0 = off
ttftBudgetMsint0TTFT p95 budget in ms; over it the endpoint grows, never shrinks; 0 = none
sleepSecondsint0idle seconds before the engine sleeps (vLLM on NVIDIA); 0 = no sleep tier
sleepCardstringkeepkeep holds the card while asleep; free releases it (shared plans only)
scaleInstringdraindrain lets running requests finish; now stops the worker at once
drainSecondsint120the longest a drain may take
wakeSloMsint0advisory wake target; it gates nothing
grantHeadroomint1workers reserved beyond what runs, for an external scaler (KEDA) during an outage
growth[]listnoneordered growth shapes: name (default the vendor), vendor, max (0 = up to autoscale.max), vramBudgetGb (0 = the template's), flags (laid over the template's, key by key), parallelism (empty = the template's), image (empty = the cell's image for that engine and vendor)
granted[]listserverthe capacity reserved for an external scaler, one {node, gpu} per slot
reservedboolservera shared row's card holds every replica's budget up to max

See Autoscaling. growth, sleepCard, scaleIn and drainSeconds are new in 0.3.0.

shardGroups[]

FieldTypeDefaultMeaning
idstringrequiredthe gang's id, at most 28 characters
enginestringthe model's enginemust equal it
parts[]listrequirednode, gpu, vramBudgetGb (required on a shared plan), devices (GPUs per part, default 1, the same on every part)
headstringthe first part's nodethe node of the coordinating part
parallelismobjectpipeline = the number of parts, tensor = devices per partas on a worker, expert included
flagsmapnonethe engine flags for every part, for example tensor_split
kvOffloadobjectnonea CPU KV tier for a vLLM gang; sizeGb is the gang's total
parkedboolserverthe autoscaler parked the gang as a unit
gaveUpobjectserver{at, attempts, code, reason, revision} after three failed heals; a rollout clears it
shapestringserverthe growth shape the autoscaler grew this gang from

See Gangs. kvOffload, gaveUp and shape are new in 0.3.0.

workload

FieldTypeDefaultMeaning
inputTokens, outputTokensint0one typical request's prompt and answer
maxContextintinputTokens + outputTokensthe longest request, prompt and answer together
peakConcurrencyint1requests in flight at the busiest moment; memory is sized from it
peakRpsnumber0recorded and said back, never sized from
headroomPctint15the margin over the pool; 0 is a stated "no margin"

See KV cache and sizing. The block is new in 0.3.0.

resolved (server)

With placement: auto, the ladder's pinned answer: path (the capability-graph key a proof is recorded against), shape (worker or gang), engine, parallelism, nodes, needGb (the memory it sized against; 0 = unknown), why[] (one {step, chosen, reason, rejected[]} per rung), verified (none, integration or fleet), resolvedAt and revision. Only a rollout re-resolves it. See Placement.

Every field in one plan

apiVersion: opod.io/v1
placement: explicit
model:
  id: qwen2.5-32b-instruct
  source: hf
  format: safetensors
  engine: vllm
  repo: Qwen/Qwen2.5-32B-Instruct
  version: v3                      # resolved to revision + sha256 when stored
colocation: dedicated
workers:
  - node: node-a
    gpu: 0
    engine: vllm
    replicas: 1
    parallelism: { tensor: 2 }
    flags: { max_model_len: "32768", gpu_memory_utilization: "0.90" }
    kvOffload: { tier: cpu, sizeGb: 64 }
autoscale:
  floor: 1
  max: 4
  unit: workers
  targetInflight: 4                # add a worker past 4 requests in flight each
  idleSeconds: 300                 # 5 minutes below the current size parks one
  kvPressurePct: 80
  ttftBudgetMs: 1500
  sleepSeconds: 0
  scaleIn: drain
  drainSeconds: 180
  wakeSloMs: 60000                 # advisory
  grantHeadroom: 1
  growth:
    - { name: a6000, vendor: nvidia, max: 3 }                                  # tried first
    - { name: big-card, vendor: nvidia, max: 1, parallelism: { tensor: 1 }, vramBudgetGb: 0 }   # then one card per worker
workload: { inputTokens: 2000, outputTokens: 500, maxContext: 32768, peakConcurrency: 40, peakRps: 8, headroomPct: 15 }
routing: { cacheIsolation: team }
kvEvents: true
gateways: { enabled: true, max: 4 }
door: { alias: qwen-32b }
exposure: { inferencePool: "", vertex: false }
canary: { holdSeconds: 600, weight: 10 }
eval: { suite: mmlu-mini, image: registry.example.com/evals/mmlu@sha256:…, minScore: 0.82, timeoutSeconds: 900 }
adapters: []                       # LoRA adapters: vLLM only, at most 16, for example { name: sql, source: org/sql-lora, rank: 16 }
verifiedOnly: false
extra: { owner: search-team, ticket: OPS-1432 }

A gang plan replaces workers with shardGroups:

colocation: dedicated
workers: []
shardGroups:
  - id: g0
    engine: vllm
    head: node-a
    parts:
      - { node: node-a, gpu: 0, devices: 2 }
      - { node: node-b, gpu: 0, devices: 2 }
    parallelism: { tensor: 2, pipeline: 2 }
    flags: { max_model_len: "16384" }
autoscale: { floor: 1, max: 2, unit: gangs }

Send either with PUT /api/v1/endpoints/{id}/plan?dryRun=true first, then without dryRun, or as the body of POST /api/v1/endpoints/{id}/rollouts:

yq -o json plan.yaml > plan.json
curl -s -H "$H" -H 'Content-Type: application/json' -X PUT "https://cp.example.com/api/v1/endpoints/<id>/plan?dryRun=true" -d @plan.json
curl -s -H "$H" -H 'Content-Type: application/json' -X POST "https://cp.example.com/api/v1/endpoints/<id>/rollouts?note=tp2%20on%20node-a" -d @plan.json

Advisories

The planner says what it noticed and did not refuse as advisories[] on Preview, on create, and on the endpoint: { kind, where, path, reason }. GET /api/v1/endpoints/{id} also carries advisoriesRevision and advisoriesStale (the advisories were judged on an earlier revision). Examples: placement (tensor parallel over PCIe or across nodes, with its cost), weights (from the release after 0.3.6: the weights alone are larger than the card, or than a gang's cards together, so the engine cannot load them and the worker fails at start — a warning, not a refusal; it names a larger card, tensor parallel or a smaller model, and for llama.cpp flags.n_gpu_layers), context (the context window will not fit the budget, and the engine will shorten it), engine (an engine the catalog does not recommend), workload (the sizing arithmetic), unproven (a path this control plane never proved), budget-sized, card-filled, endpoint.single-point (one failure would stop it), workers.stacked, workers.outside-use, doors.capped, host-ram, gang, gang-kv, kv-no-store (up to 0.3.6; from the release after 0.3.6 a peer tier with no store is refused instead), kv-disk, kv-peer, kv-signal, sleep-card, wake-hold, pd, pd-roles, pd-split, cache-isolation, vertex-keyless, leader-tls, growth-no-node. Several of these are new in 0.3.0 with the features they describe.

Refusals

A refusal is a 400 with { "error", "code": "invalid", "details": { "code": "E-…", "alternatives": [ … ] } }. Preview and create answer identically. A rule with no named code (a negative count, an unknown enum value, a bad flag value) is the same 400 with the rule in error and the field in details.field. See Error codes.

Refusals that judge the plan as a whole, beside the ones each page lists:

CodeWhenFix
E-MTLS-REPLICASworkers.mtls=require (workers identified by certificate) and a worker row has more than one replica, or autoscale.max is above 1: every replica of a row would share one certificateone worker row per node, autoscale.max: 1, gangs, or workers.mtls=allow
E-MTLS-GANGworkers.mtls=require and the plan has an active ganga single-pod shape, or workers.mtls below require
E-UNVERIFIEDverifiedOnly is on and the path was never provenprove it with opodcp verify, or turn verifiedOnly off
E-ENGINE-RERANKa rerank endpoint on an engine that cannot score documentsan engine that serves rerank
E-RUN-ACTIVEa run already holds the endpoint (0.3.0)wait for it to finish, or cancel it

Plan history

Plan history is new in 0.3.0.

curl -s -H "$H" "https://cp.example.com/api/v1/endpoints/<id>/revisions?limit=20"
curl -s -H "$H" "https://cp.example.com/api/v1/endpoints/<id>/revisions/3" | jq .doc > rev3.json
curl -s -H "$H" -H 'Content-Type: application/json' -X POST \
  "https://cp.example.com/api/v1/endpoints/<id>/rollouts?note=back%20to%20rev%203" -d @rev3.json

Every revision is kept with who wrote it, why and the run that did, and it outlives a delete. The endpoint page's History tab diffs a revision against the one before and rolls back to any of them as a verified rollout.

Last updated · Source: content/docs/control-plane-endpoints/plan.mdx · View as Markdown