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,imagesandadvisories.
Do it
Read the stored plan
curl -s -H "$H" https://cp.example.com/api/v1/endpoints/<id>/plan > plan.json jq '{revision, placement, workers}' plan.jsonChange one thing
For example, raise vLLM's context window on every worker row:
jq '.workers[].flags.max_model_len = "16384"' plan.json > new.jsonValidate 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
200answers the plan as it would be stored, and nothing changes. A400names the rule and, for a planner refusal, anE-…code indetails.code. Once a plan is stored,GET /api/v1/endpoints/{id}carries the planner'sadvisoriesfor it.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 …/planwithoutdryRunonly 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 code | Cause | Fix |
|---|---|---|
400 naming an unknown flag key | the engine does not take that flag; the message lists the keys it knows | use a listed key, or pass it as plain tokens in flags.extra |
400 naming a model that is not in the catalog | a model id the catalog does not know needs model.repo | add model.repo (and model.file for GGUF), or add the model first (Models) |
E-ENGINE-MODEL | the engine cannot load the model's format | another engine, or another format |
E-UNVERIFIED | verifiedOnly is on and the path was never proven | prove it with opodcp verify, or turn verifiedOnly off |
E-MTLS-REPLICAS, E-MTLS-GANG | workers.mtls=require and the plan has replicas or gangs | see Refusals below |
E-RUN-ACTIVE (0.3.0) | a rollout, rollback or create runs on the endpoint | wait for it, or cancel it |
A rollout ends rolled-back | a step failed; the old revision is back | read the failed step's error and code (Rollouts) |
Top-level fields
| Field | Default | Meaning |
|---|---|---|
apiVersion | opod.io/v1 | schema version; a missing one is filled, an unknown one refused |
revision | set by the server | bumped by every write |
placement | explicit | explicit or auto; see Placement |
resolved | set by the server | the auto ladder's pinned answer; re-resolved only by a rollout |
model | — | what is served (below) |
colocation | dedicated | dedicated (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 |
autoscale | fixed size | see Autoscaling |
workload | none | the expected traffic; the planner sizes memory from it. See KV cache and sizing. New in 0.3.0 |
routing.cacheIsolation | team | who may share the prefix cache: team, key or none. New in 0.3.0 |
routing.session | on: ttlSec: 300, signedRoute: true, turnPriority: true | from 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 |
kvEvents | false | vLLM workers report the KV blocks they hold, for cache-aware routing; a launch flag, so it rides a rollout |
gateways | off | front 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 |
speculative | absent (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.vertex | false | serve Vertex AI's custom-container routes on the leader. New in 0.3.0 |
canary | none | holdSeconds (default 600) and weight (percent of requests) for a rollout's canary step |
eval | none | suite, image, minScore, timeoutSeconds (default 900) for a rollout's eval step |
adapters[] | [] | LoRA adapters: name, source, rank; vLLM only, at most 16 |
verifiedOnly | false | refuse any placement path this control plane has not proven (E-UNVERIFIED) |
images | set by the server | the 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 |
extra | none | free-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
| Field | Meaning |
|---|---|
id | the model id; for a remote endpoint, the vendor's id |
source | catalog, hf, oci, s3 or remote |
format | gguf or safetensors (or fp8 and other formats a catalog entry states) |
engine | llamacpp, vllm, sglang, trtllm; resolved from the catalog when empty. A remote endpoint's engine is stored as openaicompat |
repo, file | the Hugging Face repo and, for GGUF, the file |
version | a registered model version; resolved to revision and sha256 when the plan is stored |
revision, sha256 | pin exact bytes, with or without a version name |
remoteUrl | a 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[]
| Field | Meaning |
|---|---|
node, gpu | where it runs; empty node lets the placer choose |
vramBudgetGb | the 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 |
engine | the worker's engine; every worker of an endpoint runs the plan's engine |
replicas | identical 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 |
parallelism | tensor (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 |
flags | engine settings passed to core (below) |
image | override the cell's image for this engine and vendor |
role | prefill 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 |
kvOffload | a KV cache tier below VRAM: tier, sizeGb, maxGb, diskGb. See KV cache and sizing. maxGb and diskGb are new in 0.3.0 |
modelSpec | the ConfigMap holding a Tenstorrent worker's vendor model spec; required on a Tenstorrent node, refused on any other (E-TT-SPEC) |
sleeping | set by the autoscaler while the worker's engine sleeps |
shape | set 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.
| Flag | Engine | Meaning |
|---|---|---|
ctx | llama.cpp | context size, 512 to 4,194,304 |
parallel | llama.cpp | slots, 0 to 4096 |
ngl | llama.cpp | layers offloaded to the GPU, 0 to 4096 |
kv_cache_type | llama.cpp | the KV cache element type |
kv_unified | llama.cpp | true (one shared KV pool) or false (one per slot); from 0.3.0 the planner writes it from the colocation class |
tensor_split | llama.cpp | each device's share, for example "12,8" |
max_model_len | vLLM, SGLang, TensorRT-LLM | maximum request length, 512 to 4,194,304 |
max_num_seqs | vLLM, TensorRT-LLM | requests served at once, 0 to 4096; the leader admits by it (default 256) |
max_running_requests | SGLang | requests served at once, 0 to 4096 |
gpu_memory_utilization | vLLM | the engine's memory fraction, 0.05 to 0.95 |
mem_fraction_static | SGLang | the 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_fraction | TensorRT-LLM | the KV cache's memory fraction, 0.05 to 0.95 |
pp_layer_partition | vLLM, SGLang | layers per pipeline stage, for example "8,12,12,8" |
kv_cache_dtype | vLLM, SGLang, TensorRT-LLM | an 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 |
tp | vLLM, SGLang, TensorRT-LLM | deprecated: a power of two from 1 to 64. Use parallelism.tensor; a tp that disagrees with it is refused |
extra | all | further 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
| Field | Type | Default | Meaning |
|---|---|---|---|
floor | int | 0 | minimum workers or gangs; 0 = may scale to zero |
max | int | 0 | maximum; 0 = autoscaling off, the worker set is fixed |
unit | string | workers | workers or gangs |
targetInflight | int | 2 | in-flight requests one worker carries before another is added |
idleSeconds | int | 120 | how long demand stays below the current size before one worker parks |
kvPressurePct | int | 85 | grow when the busiest worker's KV cache reaches this percent; 0 = off |
ttftBudgetMs | int | 0 | TTFT p95 budget in ms; over it the endpoint grows, never shrinks; 0 = none |
sleepSeconds | int | 0 | idle seconds before the engine sleeps (vLLM on NVIDIA); 0 = no sleep tier |
sleepCard | string | keep | keep holds the card while asleep; free releases it (shared plans only) |
scaleIn | string | drain | drain lets running requests finish; now stops the worker at once |
drainSeconds | int | 120 | the longest a drain may take |
wakeSloMs | int | 0 | advisory wake target; it gates nothing |
grantHeadroom | int | 1 | workers reserved beyond what runs, for an external scaler (KEDA) during an outage |
growth[] | list | none | ordered 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[] | list | server | the capacity reserved for an external scaler, one {node, gpu} per slot |
reserved | bool | server | a 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[]
| Field | Type | Default | Meaning |
|---|---|---|---|
id | string | required | the gang's id, at most 28 characters |
engine | string | the model's engine | must equal it |
parts[] | list | required | node, gpu, vramBudgetGb (required on a shared plan), devices (GPUs per part, default 1, the same on every part) |
head | string | the first part's node | the node of the coordinating part |
parallelism | object | pipeline = the number of parts, tensor = devices per part | as on a worker, expert included |
flags | map | none | the engine flags for every part, for example tensor_split |
kvOffload | object | none | a CPU KV tier for a vLLM gang; sizeGb is the gang's total |
parked | bool | server | the autoscaler parked the gang as a unit |
gaveUp | object | server | {at, attempts, code, reason, revision} after three failed heals; a rollout clears it |
shape | string | server | the growth shape the autoscaler grew this gang from |
See Gangs. kvOffload, gaveUp and shape are new in 0.3.0.
workload
| Field | Type | Default | Meaning |
|---|---|---|---|
inputTokens, outputTokens | int | 0 | one typical request's prompt and answer |
maxContext | int | inputTokens + outputTokens | the longest request, prompt and answer together |
peakConcurrency | int | 1 | requests in flight at the busiest moment; memory is sized from it |
peakRps | number | 0 | recorded and said back, never sized from |
headroomPct | int | 15 | the 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.jsonAdvisories
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:
| Code | When | Fix |
|---|---|---|
E-MTLS-REPLICAS | workers.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 certificate | one worker row per node, autoscale.max: 1, gangs, or workers.mtls=allow |
E-MTLS-GANG | workers.mtls=require and the plan has an active gang | a single-pod shape, or workers.mtls below require |
E-UNVERIFIED | verifiedOnly is on and the path was never proven | prove it with opodcp verify, or turn verifiedOnly off |
E-ENGINE-RERANK | a rerank endpoint on an engine that cannot score documents | an engine that serves rerank |
E-RUN-ACTIVE | a 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.jsonEvery 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