{"record":{"id":"fa91daae349ca67f","repo":"gitbutlerapp/gitbutler","slug":"please-check-lm-studio-configuration-endpoint-e","errorCode":null,"errorMessage":"Please check LM Studio configuration: endpoint=${endpoint}","messagePattern":"Please check LM Studio configuration: endpoint=(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/components/settings/AiCredentialCheck.svelte","lineNumber":91,"sourceCode":"\n\t\t\tif (!isConfigValid) {\n\t\t\t\tif (modelKind === ModelKind.OpenAI || modelKind === ModelKind.Anthropic) {\n\t\t\t\t\tif (isUsingButlerAPI && !userService.user) {\n\t\t\t\t\t\tthrow new Error(\"Please sign in to use GitButler's AI API\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(\"Please provide a valid API key for your selected AI service\");\n\t\t\t\t\t}\n\t\t\t\t} else if (modelKind === ModelKind.Ollama) {\n\t\t\t\t\t// Get Ollama configuration for more detailed error\n\t\t\t\t\tconst endpoint = await aiService.getOllamaEndpoint();\n\t\t\t\t\tconst model = await aiService.getOllamaModelName();\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Please check Ollama configuration: endpoint=${endpoint}, model=${model}`,\n\t\t\t\t\t);\n\t\t\t\t} else if (modelKind === ModelKind.LMStudio) {\n\t\t\t\t\t// Get LM Studio configuration for more detailed error\n\t\t\t\t\tconst endpoint = await aiService.getLMStudioEndpoint();\n\t\t\t\t\tthrow new Error(`Please check LM Studio configuration: endpoint=${endpoint}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdebugInfo += `, Testing commit message generation`;\n\n\t\t\t// Set a timeout to fail if the streaming doesn't start or complete\n\t\t\ttestTimeout = setTimeout(() => {\n\t\t\t\tif (testing) {\n\t\t\t\t\tconsole.error(\"AI response timed out after 20 seconds\");\n\t\t\t\t\terror =\n\t\t\t\t\t\t\"AI response timed out after 20 seconds. Please check if your AI service is running properly.\";\n\t\t\t\t\ttesting = false;\n\t\t\t\t\tisStreaming = false; // Make sure streaming state is reset on timeout\n\t\t\t\t\tdebugInfo += `, Timeout after 20s`;\n\n\t\t\t\t\t// Abort the request if possible\n\t\t\t\t\tif (abortController) {\n\t\t\t\t\t\ttry {","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/apps/desktop/src/components/settings/AiCredentialCheck.svelte#L73-L109","documentation":"Validation branch of the AI credential test for the LM Studio model kind: validateConfiguration() failed and the error embeds the configured LM Studio endpoint so the user can see the setting at fault. It fires when the LM Studio local server is not reachable at that endpoint or the model configuration is missing, since LM Studio needs no credentials.","triggerScenarios":"Thrown at apps/desktop/src/components/settings/AiCredentialCheck.svelte:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Start LM Studio's local server and confirm the endpoint URL/port in AI settings","Check that a model is loaded in LM Studio and that the model name in settings matches","Verify firewall/localhost settings allow the app to reach the endpoint"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}