基于WebView2实现的Win11桌面框架,利用插件自定义
chunhualin1
2026-08-14 b84db8983d63a9a981083ebce1a139860c6bdf25
src/Moli.Desktop/Llm/LlmModelRegistry.cs
@@ -109,7 +109,11 @@
            }
            seen.Add(model.Id);
            normalized.Add(model);
            normalized.Add(model with
            {
                BaseUrl = model.GetBaseUrl(),
                Endpoint = null
            });
        }
        var defaultModel = normalized.Any(model =>
@@ -145,10 +149,9 @@
            return false;
        }
        if (!Uri.TryCreate(model.Endpoint, UriKind.Absolute, out var endpoint) ||
            endpoint.Scheme is not ("http" or "https"))
        if (!LlmOpenAiUrls.IsAbsoluteHttpUrl(model.GetBaseUrl()))
        {
            RecordInvalid(model.Id, "Model endpoint must be an absolute HTTP or HTTPS URL.");
            RecordInvalid(model.Id, "Model baseUrl must be an absolute HTTP or HTTPS URL.");
            return false;
        }
@@ -180,7 +183,7 @@
                Id = "local-openai-compatible",
                Label = "Local",
                Provider = "openai-compatible",
                Endpoint = "http://127.0.0.1:11434/v1/chat/completions",
                BaseUrl = "http://127.0.0.1:11434/v1",
                AuthRef = null,
                ApiModel = "qwen2.5:14b",
                SupportsStreaming = true,