Dispatch guard¶
Before a run that calls a model is dispatched, the model side of it is checked. The guard either releases the run, or holds it, or blocks it with a reason. It is the gate that keeps a run from being sent at a model that cannot serve it.
The order of checks¶
flowchart TB
A["Binding resolution"]
B["Interface compatibility"]
C["Endpoint readiness"]
D["Dispatch proceeds"]
E["Blocked, with a reason"]
F["Held, until the endpoint is ready"]
A -->|resolved| B
A -->|failed| E
B -->|compatible| C
B -->|incompatible| E
C -->|healthy endpoint| D
C -->|not ready| F
What the guard reads¶
flowchart LR
SCH["Scheduled run<br/>calls a model"]
G{{"Dispatch guard"}}
subgraph ST["RECORDS IT READS"]
direction TB
B[("Binding")]
I[("Model interface")]
E[("Endpoint readiness")]
end
DQ["Dispatch"]
SCH --> G
G -.-> B
G -.-> I
G -.-> E
G --> DQ
The guard sits between scheduling and dispatch and reads three records, one per check. A held or blocked run is explained by the state of the record its check read.
The order matters for diagnosis. A run that is held passed binding and compatibility and is waiting on readiness; a run that is blocked failed one of the first two and will not proceed without a change.
Binding resolution¶
A binding that does not resolve blocks the run, and the block carries both the reason and a reason code, recorded against the alias that failed:
The block is keyed so that the same failure does not append a new event on every cycle. A run stuck on an unresolvable binding produces one record per distinct cause rather than a stream of identical ones.
Interface compatibility¶
The run's expectation about the model's interface is checked against what the model actually presents. Three reasons come out of it:
| Reason | Means |
|---|---|
invalid_expected_interface |
The expected interface is not a recognised one |
interface_mismatch |
The model's interface is not the expected one |
api_standard_mismatch |
The interface matches and the API standard does not |
The expectation carries its own source, so a mismatch record says where the expectation came from rather than only that there was one.
A compatibility block is cleared when the condition clears. The guard removes the block rather than leaving a stale one behind, so a model that was redeployed with the right interface releases the run without intervention.
Endpoint readiness¶
A model is ready when its endpoint health is healthy and an endpoint is
actually present. Both conditions, not either.
A ready model resumes the run. A model that is not ready holds it, under a hold key derived from the node and the model traffic, so the hold is per target rather than per attempt.
Hold is not failure¶
This is the mechanism behind waking a model that scaled to zero. The run is held while the model comes up and released when the endpoint reports healthy, rather than failing and relying on a retry.
The same hold covers a model that is unhealthy for any other reason, which is why a run waiting on a model looks identical whether the cause is a cold start or an unhealthy runtime. The distinction is in the model's own state, not in the run's.
See Serve runtime, scaling, and scale to zero for the wake path, and Binding routing and locality for what has to resolve before binding succeeds.
Everything the guard does is recorded¶
Blocks, holds and resumes all produce governance events with their attribution attached. A run's history therefore states why it waited and for how long, rather than only that it did. See Governance events.