Model versions and project bindings¶
A project version is tested against a model version, and it should keep calling that model version after both have moved on. Xratu makes that the normal case. Every model version is immutable and runs as its own runtime, several versions of one model run side by side, and each project version's model aliases are bound to a model version independently. A new model version can go live for the newest project while an older project version keeps the model it was certified with, and every run records which model version answered it. This page shows what runs on your nodes when versions of projects and models coexist, how a run finds its model version, and how a model rollout moves through them.
For the records the control plane keeps, the release routes and the bindings, see Versioned release routes and bindings.
Versions side by side¶
flowchart TB
subgraph CP["CONTROL PLANE"]
direction LR
PR[("Project release route<br/>orders: target 1.5.0")]
BD[("Bindings<br/>per project version and alias")]
MR[("Model release route<br/>llm-small: target 2.2.0")]
end
subgraph PV["PROJECT RUNTIMES, orders"]
direction LR
P13["1.3.0"]
P14["1.4.0"]
P15["1.5.0<br/>route target"]
end
subgraph MV["MODEL RUNTIMES, llm-small"]
direction LR
M20["2.0.0<br/>Deployment and Service"]
M21["2.1.0<br/>Deployment and Service"]
M22["2.2.0<br/>route target"]
end
PR -->|"target_version"| P15
MR -->|"target_version"| M22
BD -.-> PV
P13 -->|"summariser pinned to 2.0.0"| M20
P14 -->|"summariser pinned to 2.1.0"| M21
P15 -->|"summariser follows the route"| M22
Three versions of the project and three versions of the model run at once. Each model version is a separate serve deployment on your nodes, with its own Deployment, Service, weights and evidence. The edges between the two groups are bindings: two are pinned to a model version, and one follows the model's release route.
A worked example¶
The project orders calls a model through the alias summariser, declared in
its deploy.xratu. Three versions of orders are deployed, and three versions
of the model llm-small.
The bindings:
xratu model bind orders summariser llm-small 2.0.0 1.3.0
xratu model bind orders summariser llm-small 2.1.0 1.4.0
1.5.0 has no binding of its own, and its deploy.xratu declares summariser
as llm-small with no version. For each project version, the effective binding
is the first source that exists:
| Project version | Effective binding | Model version called |
|---|---|---|
1.3.0 |
override.project_version, llm-small 2.0.0 |
2.0.0 |
1.4.0 |
override.project_version, llm-small 2.1.0 |
2.1.0 |
1.5.0 |
deploy_spec, llm-small with no version |
The model route's target, 2.2.0 |
orders traffic goes to 1.5.0, the project route's target. Every run of
1.4.0 still reaches llm-small 2.1.0, exactly as when it was certified.
What runs on the node¶
Each model version is deployed by its own model.serve.v1 assignment. The
assignments for 2.0.0, 2.1.0 and 2.2.0 are independent: each materializes
its own weights, runs its own engine Deployment and Service, is probed on its
own, and reports its own evidence and trace chain. See
Serve materialization and contract projection
and
Serve observation and evidence.
Each report carries the model release route's generation and hash at the time the assignment was made. The control plane refuses a report made under a route that has since moved, so a late report from a version the route has left behind cannot change the model's state.
How a run reaches its model version¶
flowchart TB
RN["Run node<br/>calls alias summariser"]
subgraph RES["CONTROL PLANE, at dispatch"]
direction TB
EB{{"Effective binding<br/>for this project version"}}
MRC[("Model route contract<br/>model.release_route.v1")]
EB --> MRC
end
subgraph NODE["PROJECT NODE"]
direction TB
AS["Flow-execution assignment<br/>carries the contract"]
K["Project kernel<br/>calls selected_endpoint"]
AS --> K
end
MV["llm-small 2.1.0<br/>its Service"]
RN --> EB
MRC --> AS
K --> MV
When a run node calls a model, the control plane resolves the alias through the effective binding for the run's project version and stamps the model route contract into the flow-execution assignment:
model_name llm-small
target_version 2.2.0 the model route's target
selected_version 2.1.0 the version this binding resolved to
selected_endpoint that version's endpoint
stable_endpoint the model's endpoint that follows its route
route_generation, route_hash
selection_reason
selected false 2.1.0 is not the route's target
The kernel calls the selected endpoint. The model version is fixed when the run is dispatched, so a model rollout during the run leaves the run on the version it started with. When the model runs on another node, the endpoint is the local binding Service the binding fabric put in the project's namespace. See Binding fabric.
A model rollout¶
When llm-small 2.3.0 is deployed and becomes ready, the control plane moves
the model's release route to it, with the selection reason latest_deployed.
What changes:
| Binding | Before | After |
|---|---|---|
orders 1.3.0, pinned |
2.0.0 |
2.0.0 |
orders 1.4.0, pinned |
2.1.0 |
2.1.0 |
orders 1.5.0, follows the route |
2.2.0 |
2.3.0, for runs dispatched after the move |
Pinned project versions are unaffected. The project version that follows the
route moves to the new model version for new runs, and runs already dispatched
finish on the version they were given. Moving the route stops no model
version; a version stops only through its own serve_stop assignment.
To hold 1.5.0 on 2.2.0 through the rollout, pin it before the new version
deploys:
Every call is on the record¶
Each step leaves a record that names the versions involved:
| Record | Names |
|---|---|
model_binding.bind, audited when a binding is set |
The project, its version, the alias, the model and its version, the actor |
project.release_route.set, audited when the project route moves |
The previous and next target versions, the reason, the actor |
| The model route's selection reason | Why the model's target is the version it is |
| The run's model route contract | The model version each call in the run used, and whether it was the route's target |
| The model's serve evidence and trace chain | The engine image and the weights that version served |
From these, the question "which model, built from which weights, answered this run, and why that version" is answered from records, never inferred. See Serve observation and evidence.