diff --git a/config.example.yaml b/config.example.yaml index bbe0b415..66cdf64c 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -12,6 +12,9 @@ remote-management: # Leave empty to disable the Management API entirely (404 for all /v0/management routes). secret-key: "" + # Disable the bundled management control panel asset download and HTTP route when true. + disable-control-panel: false + # Authentication directory (supports ~ for home directory) auth-dir: "~/.cli-proxy-api" diff --git a/sdk/cliproxy/service.go b/sdk/cliproxy/service.go index 32738b7d..13376c09 100644 --- a/sdk/cliproxy/service.go +++ b/sdk/cliproxy/service.go @@ -534,8 +534,13 @@ func (s *Service) registerModelsForAuth(a *coreauth.Auth) { ms := make([]*ModelInfo, 0, len(compat.Models)) for j := range compat.Models { m := compat.Models[j] + // Use alias as model ID, fallback to name if alias is empty + modelID := m.Alias + if modelID == "" { + modelID = m.Name + } ms = append(ms, &ModelInfo{ - ID: m.Alias, + ID: modelID, Object: "model", Created: time.Now().Unix(), OwnedBy: compat.Name,