mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +00:00
Fix missing vllm proxy setup
This commit is contained in:
@@ -105,6 +105,10 @@ func (i *Process) GetPort() int {
|
|||||||
if i.options.MlxServerOptions != nil {
|
if i.options.MlxServerOptions != nil {
|
||||||
return i.options.MlxServerOptions.Port
|
return i.options.MlxServerOptions.Port
|
||||||
}
|
}
|
||||||
|
case backends.BackendTypeVllm:
|
||||||
|
if i.options.VllmServerOptions != nil {
|
||||||
|
return i.options.VllmServerOptions.Port
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
@@ -123,6 +127,10 @@ func (i *Process) GetHost() string {
|
|||||||
if i.options.MlxServerOptions != nil {
|
if i.options.MlxServerOptions != nil {
|
||||||
return i.options.MlxServerOptions.Host
|
return i.options.MlxServerOptions.Host
|
||||||
}
|
}
|
||||||
|
case backends.BackendTypeVllm:
|
||||||
|
if i.options.VllmServerOptions != nil {
|
||||||
|
return i.options.VllmServerOptions.Host
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
@@ -176,6 +184,11 @@ func (i *Process) GetProxy() (*httputil.ReverseProxy, error) {
|
|||||||
host = i.options.MlxServerOptions.Host
|
host = i.options.MlxServerOptions.Host
|
||||||
port = i.options.MlxServerOptions.Port
|
port = i.options.MlxServerOptions.Port
|
||||||
}
|
}
|
||||||
|
case backends.BackendTypeVllm:
|
||||||
|
if i.options.VllmServerOptions != nil {
|
||||||
|
host = i.options.VllmServerOptions.Host
|
||||||
|
port = i.options.VllmServerOptions.Port
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
targetURL, err := url.Parse(fmt.Sprintf("http://%s:%d", host, port))
|
targetURL, err := url.Parse(fmt.Sprintf("http://%s:%d", host, port))
|
||||||
|
|||||||
@@ -202,6 +202,11 @@ func (i *Process) WaitForHealthy(timeout int) error {
|
|||||||
host = opts.MlxServerOptions.Host
|
host = opts.MlxServerOptions.Host
|
||||||
port = opts.MlxServerOptions.Port
|
port = opts.MlxServerOptions.Port
|
||||||
}
|
}
|
||||||
|
case backends.BackendTypeVllm:
|
||||||
|
if opts.VllmServerOptions != nil {
|
||||||
|
host = opts.VllmServerOptions.Host
|
||||||
|
port = opts.VllmServerOptions.Port
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if host == "" {
|
if host == "" {
|
||||||
host = "localhost"
|
host = "localhost"
|
||||||
|
|||||||
@@ -264,6 +264,10 @@ func (im *instanceManager) getPortFromOptions(options *instance.CreateInstanceOp
|
|||||||
if options.MlxServerOptions != nil {
|
if options.MlxServerOptions != nil {
|
||||||
return options.MlxServerOptions.Port
|
return options.MlxServerOptions.Port
|
||||||
}
|
}
|
||||||
|
case backends.BackendTypeVllm:
|
||||||
|
if options.VllmServerOptions != nil {
|
||||||
|
return options.VllmServerOptions.Port
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -279,6 +283,10 @@ func (im *instanceManager) setPortInOptions(options *instance.CreateInstanceOpti
|
|||||||
if options.MlxServerOptions != nil {
|
if options.MlxServerOptions != nil {
|
||||||
options.MlxServerOptions.Port = port
|
options.MlxServerOptions.Port = port
|
||||||
}
|
}
|
||||||
|
case backends.BackendTypeVllm:
|
||||||
|
if options.VllmServerOptions != nil {
|
||||||
|
options.VllmServerOptions.Port = port
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user