You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/mcp/localaitools/dto.go
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,41 @@ type SetNodeVRAMBudgetRequest struct {
115
115
Budgetstring`json:"budget,omitempty" jsonschema:"VRAM allocation cap as a percentage (e.g. 80%) or absolute amount (e.g. 12GB). Empty string clears the override."`
116
116
}
117
117
118
+
// ModelSchedulingConfig is the MCP wire shape for one per-model distributed
119
+
// scheduling rule. Keep this DTO explicit instead of aliasing the node-registry
120
+
// model so the MCP contract only exposes operator-facing scheduling fields.
// SetSchedulingRequest is the input for set_scheduling. It mirrors
134
+
// /api/nodes/scheduling so standalone MCP and REST callers preserve the same
135
+
// PATCH-style semantics for the optional prefix-cache routing fields.
136
+
typeSetSchedulingRequeststruct {
137
+
ModelNamestring`json:"model_name" jsonschema:"Installed model name whose distributed scheduling rule should be created or updated."`
138
+
NodeSelectormap[string]string`json:"node_selector,omitempty" jsonschema:"Optional node-label selector. Empty means any healthy backend node."`
139
+
MinReplicasint`json:"min_replicas" jsonschema:"Minimum desired replicas. Mutually exclusive with spread_all."`
140
+
MaxReplicasint`json:"max_replicas" jsonschema:"Maximum desired replicas. Must be >= min_replicas when non-zero. Mutually exclusive with spread_all."`
141
+
SpreadAllbool`json:"spread_all,omitempty" jsonschema:"When true, keep one replica on every matching node. Mutually exclusive with min_replicas/max_replicas."`
142
+
RoutePolicy*string`json:"route_policy,omitempty" jsonschema:"Optional prefix-cache route policy override. Omit to preserve the existing value on updates."`
143
+
BalanceAbsThreshold*int`json:"balance_abs_threshold,omitempty" jsonschema:"Optional absolute imbalance threshold override. Omit to preserve the existing value on updates."`
144
+
BalanceRelThreshold*float64`json:"balance_rel_threshold,omitempty" jsonschema:"Optional relative imbalance threshold override. Omit to preserve the existing value on updates."`
145
+
MinPrefixMatch*float64`json:"min_prefix_match,omitempty" jsonschema:"Optional minimum prefix match threshold override. Omit to preserve the existing value on updates."`
146
+
}
147
+
148
+
// DeleteSchedulingRequest identifies the model scheduling rule to remove.
149
+
typeDeleteSchedulingRequeststruct {
150
+
ModelNamestring`json:"model_name" jsonschema:"Installed model name whose scheduling config should be removed."`
151
+
}
152
+
118
153
// ImportModelURIRequest is the input for import_model_uri. It mirrors the
119
154
// REST surface (`/models/import-uri`) closely so both clients can produce
120
155
// identical responses; the BackendPreference is a flat field rather than the
0 commit comments