|
1 | 1 | package localaitools |
2 | 2 |
|
3 | | -import ( |
4 | | - "time" |
5 | | - |
6 | | - "github.com/mudler/LocalAI/core/services/voiceprofile" |
7 | | -) |
| 3 | +import "github.com/mudler/LocalAI/core/services/voiceprofile" |
8 | 4 |
|
9 | 5 | // DTOs for the LocalAIClient interface. Where the same shape already exists |
10 | 6 | // elsewhere (config.Gallery, gallery.Metadata, schema.KnownBackend, |
@@ -119,25 +115,19 @@ type SetNodeVRAMBudgetRequest struct { |
119 | 115 | Budget string `json:"budget,omitempty" jsonschema:"VRAM allocation cap as a percentage (e.g. 80%) or absolute amount (e.g. 12GB). Empty string clears the override."` |
120 | 116 | } |
121 | 117 |
|
122 | | -// ModelSchedulingConfig is the REST/MCP wire shape for one per-model |
123 | | -// distributed scheduling rule. Keep this DTO explicit instead of aliasing the |
124 | | -// node-registry model so MCP contracts remain owned by localaitools while still |
125 | | -// matching /api/nodes/scheduling JSON. |
| 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. |
126 | 121 | type ModelSchedulingConfig struct { |
127 | | - ID string `json:"id"` |
128 | | - ModelName string `json:"model_name"` |
129 | | - NodeSelector string `json:"node_selector,omitempty"` |
130 | | - MinReplicas int `json:"min_replicas"` |
131 | | - MaxReplicas int `json:"max_replicas"` |
132 | | - SpreadAll bool `json:"spread_all,omitempty"` |
133 | | - RoutePolicy string `json:"route_policy,omitempty"` |
134 | | - BalanceAbsThreshold int `json:"balance_abs_threshold,omitempty"` |
135 | | - BalanceRelThreshold float64 `json:"balance_rel_threshold,omitempty"` |
136 | | - MinPrefixMatch float64 `json:"min_prefix_match,omitempty"` |
137 | | - UnsatisfiableUntil *time.Time `json:"unsatisfiable_until,omitempty"` |
138 | | - UnsatisfiableTicks int `json:"unsatisfiable_ticks"` |
139 | | - CreatedAt time.Time `json:"created_at"` |
140 | | - UpdatedAt time.Time `json:"updated_at"` |
| 122 | + ModelName string `json:"model_name"` |
| 123 | + NodeSelector string `json:"node_selector,omitempty"` |
| 124 | + MinReplicas int `json:"min_replicas"` |
| 125 | + MaxReplicas int `json:"max_replicas"` |
| 126 | + SpreadAll bool `json:"spread_all,omitempty"` |
| 127 | + RoutePolicy string `json:"route_policy,omitempty"` |
| 128 | + BalanceAbsThreshold int `json:"balance_abs_threshold,omitempty"` |
| 129 | + BalanceRelThreshold float64 `json:"balance_rel_threshold,omitempty"` |
| 130 | + MinPrefixMatch float64 `json:"min_prefix_match,omitempty"` |
141 | 131 | } |
142 | 132 |
|
143 | 133 | // SetSchedulingRequest is the input for set_scheduling. It mirrors |
|
0 commit comments