{"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":"Error","httpStatus":null,"severity":"warning","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/caf1f223d3cfb94488c9198ad34487c6006c648f/apps/desktop/src/components/settings/AiCredentialCheck.svelte#L73-L109","documentation":"Thrown by the AI settings credential check when validateConfiguration() fails with ModelKind.LMStudio. The message embeds the configured endpoint from getLMStudioEndpoint(); the log shows the raw template literal rather than the expanded string.","triggerScenarios":"Running the check with LM Studio selected while the endpoint URL in settings is wrong, LM Studio's local server is not started, or the server started on a different port than configured.","commonSituations":"LM Studio 'Local Server' toggle never turned on; server bound to a port other than the default (1234) after an update; settings still pointing at localhost while LM Studio listens on another interface; CORS/server mode changed between versions.","solutions":["Start the server inside LM Studio (Developer → Local Server → Start) and note the displayed URL.","Set the GitButler endpoint to exactly that URL including port (e.g. http://localhost:1234/v1).","Confirm a model is loaded in LM Studio before running the check.","Re-run the check; the endpoint echoed in the error should match the running server."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const endpoint = await aiService.getLMStudioEndpoint();\ntry {\n  await fetch(`${endpoint.replace(/\\/$/, \"\")}/models`, { signal: AbortSignal.timeout(2000) });\n} catch {\n  error = `LM Studio is not reachable at ${endpoint} — start its local server and try again`;\n  return;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runCheck();\n} catch (e) {\n  error = e instanceof Error ? e.message : \"LM Studio configuration check failed\";\n}","preventionTips":["Start LM Studio's local server before opening GitButler AI settings.","Copy the exact URL LM Studio displays (including port) into the endpoint field.","Load a model in LM Studio prior to the credential test."],"tags":["gitbutler","ai","lmstudio","local-llm","settings"],"backgroundTag":"lmstudio-misconfigured","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}