Add remote instance management functionality and configuration support

This commit is contained in:
2025-09-30 21:09:05 +02:00
parent 1e5e86d2c3
commit 2759be65a5
5 changed files with 268 additions and 0 deletions

View File

@@ -287,3 +287,14 @@ func (i *Process) UnmarshalJSON(data []byte) error {
return nil
}
func (i *Process) IsRemote() bool {
i.mu.RLock()
defer i.mu.RUnlock()
if i.options == nil {
return false
}
return len(i.options.Nodes) > 0
}

View File

@@ -27,6 +27,8 @@ type CreateInstanceOptions struct {
BackendType backends.BackendType `json:"backend_type"`
BackendOptions map[string]any `json:"backend_options,omitempty"`
Nodes []string `json:"nodes,omitempty"`
// Backend-specific options
LlamaServerOptions *llamacpp.LlamaServerOptions `json:"-"`
MlxServerOptions *mlx.MlxServerOptions `json:"-"`