gitbutlerapp/gitbutler · warning · Error

Please check Ollama configuration: endpoint=${endpoint}, mod

Error message

Please check Ollama configuration: endpoint=${endpoint}, model=${model}

What it means

Thrown by the AI settings credential check when validateConfiguration() fails with ModelKind.Ollama. The message embeds the current endpoint (getOllamaEndpoint()) and model (getOllamaModelName()) so the misconfigured values are visible in the error itself; the log line shows the unexpanded template literal.

Source

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

			isUsingButlerAPI = await aiService.usingGitButlerAPI();
			debugInfo += `, Using GB API: ${isUsingButlerAPI}`;

			// Check if configuration is valid
			const isConfigValid = await aiService.validateConfiguration();
			debugInfo += `, Config valid: ${isConfigValid}`;

			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;

View on GitHub (pinned to caf1f223d3)

Solutions

  1. Start Ollama (`ollama serve` or the desktop app) and confirm it answers: curl http://localhost:11434/api/tags.
  2. Pull the configured model (`ollama pull <model>`) or set the model name to one that appears in `ollama list`.
  3. Fix the endpoint in GitButler AI settings to match where Ollama actually listens, including the port.
  4. Re-run the credential check and confirm the endpoint/model echoed in the message are the intended values.
Defensive patterns

Strategy: validation

Validate before calling

const endpoint = await aiService.getOllamaEndpoint();
try {
  await fetch(`${endpoint.replace(/\/$/, "")}/api/tags`, { signal: AbortSignal.timeout(2000) });
} catch {
  error = `Ollama is not reachable at ${endpoint} — start it and try again`;
  return;
}

Try / catch

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

Prevention

When it happens

Trigger: Running the check with Ollama selected while the endpoint (default http://localhost:11434) is wrong/unreachable in config, the model name is unset or not present in the local Ollama instance, or Ollama is not running at all.

Common situations: Ollama not started (no `ollama serve`); Ollama listening on a non-default port; model never pulled (e.g. llama3 missing from `ollama list`); settings pointing at a remote machine's Ollama that refuses connections.

Related errors


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