gitbutlerapp/gitbutler · warning · Error

Please check LM Studio configuration: endpoint=${endpoint}

Error message

Please check LM Studio configuration: endpoint=${endpoint}

What it means

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.

Source

Thrown at apps/desktop/src/components/settings/AiCredentialCheck.svelte:91

			if (!isConfigValid) {
				if (modelKind === ModelKind.OpenAI || modelKind === ModelKind.Anthropic) {
					if (isUsingButlerAPI && !userService.user) {
						throw new Error("Please sign in to use GitButler's AI API");
					} else {
						throw new Error("Please provide a valid API key for your selected AI service");
					}
				} else if (modelKind === ModelKind.Ollama) {
					// Get Ollama configuration for more detailed error
					const endpoint = await aiService.getOllamaEndpoint();
					const model = await aiService.getOllamaModelName();
					throw new Error(
						`Please check Ollama configuration: endpoint=${endpoint}, model=${model}`,
					);
				} else if (modelKind === ModelKind.LMStudio) {
					// Get LM Studio configuration for more detailed error
					const endpoint = await aiService.getLMStudioEndpoint();
					throw new Error(`Please check LM Studio configuration: endpoint=${endpoint}`);
				}
			}

			debugInfo += `, Testing commit message generation`;

			// Set a timeout to fail if the streaming doesn't start or complete
			testTimeout = setTimeout(() => {
				if (testing) {
					console.error("AI response timed out after 20 seconds");
					error =
						"AI response timed out after 20 seconds. Please check if your AI service is running properly.";
					testing = false;
					isStreaming = false; // Make sure streaming state is reset on timeout
					debugInfo += `, Timeout after 20s`;

					// Abort the request if possible
					if (abortController) {
						try {

View on GitHub (pinned to caf1f223d3)

Solutions

  1. Start the server inside LM Studio (Developer → Local Server → Start) and note the displayed URL.
  2. Set the GitButler endpoint to exactly that URL including port (e.g. http://localhost:1234/v1).
  3. Confirm a model is loaded in LM Studio before running the check.
  4. Re-run the check; the endpoint echoed in the error should match the running server.
Defensive patterns

Strategy: validation

Validate before calling

const endpoint = await aiService.getLMStudioEndpoint();
try {
  await fetch(`${endpoint.replace(/\/$/, "")}/models`, { signal: AbortSignal.timeout(2000) });
} catch {
  error = `LM Studio is not reachable at ${endpoint} — start its local server and try again`;
  return;
}

Try / catch

try {
  await runCheck();
} catch (e) {
  error = e instanceof Error ? e.message : "LM Studio configuration check failed";
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20). Data as JSON: /api/errors/fa91daae349ca67f. Report an issue: GitHub.