fix: 修复本地模型验证失效的问题(resolve #145)

This commit is contained in:
digua
2026-04-20 21:49:53 +08:00
committed by digua
parent 19fa37e734
commit cbf01dfdc8
2 changed files with 10 additions and 2 deletions
+6 -1
View File
@@ -654,7 +654,12 @@ export const llmApi = {
/**
* 验证 API Key(支持自定义 baseUrl 和 model
*/
validateApiKey: (provider: string, apiKey: string, baseUrl?: string, model?: string): Promise<boolean> => {
validateApiKey: (
provider: string,
apiKey: string,
baseUrl?: string,
model?: string
): Promise<{ success: boolean; error?: string }> => {
return ipcRenderer.invoke('llm:validateApiKey', provider, apiKey, baseUrl, model)
},