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
- 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.
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
- 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.
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
- Please check Ollama configuration: endpoint=${endpoint}, mod
- Please sign in to use GitButler's AI API
- Please provide a valid API key for your selected AI service
- Received empty response from AI service
- Conflicted uncommitted files can only be marked as resolved:
AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20).
Data as JSON: /api/errors/fa91daae349ca67f.
Report an issue: GitHub.