From 56520946806ba8463c96db51d925504b5eaaa7ce Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Mon, 16 Mar 2026 14:03:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(llm):=20openclaw/dify=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=20SKU=20=E5=88=9B=E5=BB=BA=E6=97=B6=E4=B8=8D=E5=A1=AB=20device?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/apis/onecloud/v1alpha1/defaults.go | 5 +++-- pkg/util/onecloud/onecloud.go | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/apis/onecloud/v1alpha1/defaults.go b/pkg/apis/onecloud/v1alpha1/defaults.go index c4cedac71..daf51750f 100644 --- a/pkg/apis/onecloud/v1alpha1/defaults.go +++ b/pkg/apis/onecloud/v1alpha1/defaults.go @@ -111,7 +111,7 @@ var ( } DefaultLLMSku = []llmapi.LLMSkuCreateInput{ newLLMSku("ollama-4c4g", 4, 4096, 40960, 1000, DefaultOllamaImageName, "ollama"), - newLLMSku("openclaw-4c8g", 4, 8192, 40960, 1000, DefaultOpenclawImageName, "openclaw"), + newLLMSku("openclaw-4c4g", 4, 4096, 40960, 1000, DefaultOpenclawImageName, "openclaw"), newLLMSku("comfyui-8c16g", 8, 16384, 40960, 1000, DefaultComfyuiImageName, "comfyui"), } ) @@ -1006,7 +1006,8 @@ func newLLMSku(name string, cpu, memory, diskSize int, bandwidth int, imageId, l LLMSKuBaseCreateInput: llmapi.LLMSKuBaseCreateInput{ SharableVirtualResourceCreateInput: apis.SharableVirtualResourceCreateInput{ SharableResourceBaseCreateInput: apis.SharableResourceBaseCreateInput{ - IsPublic: &isPublic, + IsPublic: &isPublic, + PublicScope: "system", }, VirtualResourceCreateInput: apis.VirtualResourceCreateInput{ StatusStandaloneResourceCreateInput: apis.StatusStandaloneResourceCreateInput{ diff --git a/pkg/util/onecloud/onecloud.go b/pkg/util/onecloud/onecloud.go index 4ec16d726..0055cb0e8 100644 --- a/pkg/util/onecloud/onecloud.go +++ b/pkg/util/onecloud/onecloud.go @@ -1155,7 +1155,10 @@ func InitLLMSku(s *mcclient.ClientSession, skus []llmapi.LLMSkuCreateInput) erro return errors.Errorf("memory is required for sku at index %d", i) } - input.Devices = &devices + // openclaw and dify types do not require devices (no GPU) + if input.LLMType != "openclaw" && input.LLMType != "dify" { + input.Devices = &devices + } // Ensure SKU exists _, err := EnsureLLMSku(s, input)