From aa9632d67cfe0e48416ed7d056289b46b7f50870 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 30 Apr 2026 15:16:09 +0800 Subject: [PATCH] fix(llm): update LLM provider retrieval to include optional parameter - Modified the LLM provider retrieval functions to include an optional parameter for enhanced functionality. - Updated the handleLLMProviderUpdate and handleLLMProviderTest functions to reflect this change, improving error handling and provider management. --- openapi/setting/llm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/setting/llm.go b/openapi/setting/llm.go index 21091cab..fea20dfc 100644 --- a/openapi/setting/llm.go +++ b/openapi/setting/llm.go @@ -469,7 +469,7 @@ func handleLLMProviderUpdate(c *gin.Context) { llmEnsureEncKey() - existing, err := llmprovider.Global.Get(key) + existing, err := llmprovider.Global.Get(key, true) if err != nil { respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key)) return @@ -633,7 +633,7 @@ func handleLLMProviderTest(c *gin.Context) { llmEnsureEncKey() - p, err := llmprovider.Global.Get(key) + p, err := llmprovider.Global.Get(key, true) if err != nil { respondError(c, http.StatusNotFound, fmt.Sprintf("provider \"%s\" not found", key)) return