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.
This commit is contained in:
Max 2026-04-30 15:16:09 +08:00
parent 6f78f6066b
commit aa9632d67c

View file

@ -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