Nodes show their engines' versions and GPUs' capability; a profile can ask for an engine version

NodeView carries engine_versions and compute_capabilities; ctl nodes shows
llamacpp b10991 and 6000-24g (7.5). A profile's engine_version restricts it
to nodes whose engine version starts with it, and explain-placement says
which version a node has, or which engines it has when it lacks the one
asked for.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-07 13:06:57 +02:00
1 parent e4e15200d6
commit 619dd751ab
9 files changed
+158 -21

No files matched your search

+16
View File
@@ -12,6 +12,7 @@ import (
"errors"
"fmt"
"io"
"maps"
"net/http"
"net/url"
"slices"
@@ -228,6 +229,12 @@ type NodeView struct {
// which is not the same as having none — placement treats it that way too,
// or a control plane upgrade would empty a fleet.
Engines []string `json:"engines,omitempty"`
// EngineVersions are the installed engines with their versions:
// llamacpp → b10991. ComputeCapabilities are its GPUs' CUDA compute
// capabilities, 7.0 for a V100, so an engine build's support can be read
// against them.
EngineVersions map[string]string `json:"engine_versions,omitempty"`
ComputeCapabilities []string `json:"compute_capabilities,omitempty"`
// Provision is where installing each wanted engine stands. An engine is in
// Engines only once its installation here is ready.
Provision []inventory.EngineInstall `json:"provision,omitempty"`
@@ -647,6 +654,15 @@ func (a *API) Nodes() []NodeView {
v.Engines = append(v.Engines, name)
}
slices.Sort(v.Engines)
if len(n.EngineVersions) > 0 {
v.EngineVersions = maps.Clone(n.EngineVersions)
}
for _, g := range n.GPUs {
if g.ComputeCapability != "" && !slices.Contains(v.ComputeCapabilities, g.ComputeCapability) {
v.ComputeCapabilities = append(v.ComputeCapabilities, g.ComputeCapability)
}
}
slices.Sort(v.ComputeCapabilities)
v.Provision = n.Provision
if ch := a.ctl.EngineChoices(); ch != nil && len(n.GPUs) > 0 {
chosen := ch.For(n.ID)