When you're trying to connect Antigravity to a local LLM, the first wall you hit is usually "can't connect" or "model not found." The error messages aren't always helpful, and the root cause could be in several different places.
This guide breaks the problem down into four patterns and gives you concrete steps to diagnose and fix each one.
Prerequisites to Check First
Antigravity communicates with local LLM runtimes (like Ollama or LM Studio) over HTTP. For that connection to work, three things need to be true:
- The local runtime is running and listening on an API endpoint
- Antigravity has the correct URL and port for that endpoint
- No firewall or security software is blocking the port
If any one of these is missing, the connection fails. Let's go through each failure pattern.
Pattern 1: Ollama API Endpoint Not Found
Symptoms
You've selected Ollama in Antigravity's settings and entered the base URL, but the model list won't load. You see "connection failed" or "timeout."
Diagnosis
First, confirm that Ollama is actually running:
curl http://localhost:11434/api/tags
# If Ollama is running, you'll see something like:
{"models":[{"name":"llama3.2:3b","..."}]}
# If not running:
curl: (7) Failed to connect to localhost port 11434If you get "Failed to connect," the Ollama process isn't running — not a configuration problem, just needs to be started.
Fix
# Start Ollama
ollama serve
# In a separate terminal, confirm models are available
ollama listOllama's API is only active while ollama serve is running. If you close that process, the API stops. For persistent background operation:
- macOS: Install the Ollama macOS app — it runs from the menu bar automatically
- Windows: The Ollama installer registers it as a Windows service, so it starts on boot automatically
- Linux: Run
systemctl enable ollamato enable it as a systemd service
Setting the base URL in Antigravity
Ollama's default port is 11434. Enter this in Antigravity's local LLM settings:
Base URL: http://localhost:11434
If you've changed the port, check the Ollama startup log:
OLLAMA_HOST=0.0.0.0:8080 ollama serve
# In this case, use: http://localhost:8080Pattern 2: LM Studio API Server Not Started
Symptoms
You're trying to use LM Studio with Antigravity, but models aren't being recognized.
The core issue
Loading a model in LM Studio does not activate the API. You have to manually start the local server — this is a separate step that's easy to miss.
Fix
- Open LM Studio
- Click the "Local Server" icon in the left sidebar (the
<->symbol) - Click "Start Server"
- Confirm the status shows
Server running on port 1234
Then set this as the base URL in Antigravity:
Base URL: http://localhost:1234/v1
Note the /v1 path — LM Studio provides an OpenAI-compatible API, and the /v1 prefix is required.
If you see "Model not loaded"
Even with the server running, if you see a "Model not loaded" error, go to LM Studio's server panel and select a model from the "Select a model to load" dropdown. Wait for it to fully load before retrying from Antigravity.
Pattern 3: VRAM or Memory Insufficient
Symptoms
Model loading stalls, or you see "Out of memory" / "CUDA out of memory" in the logs. From Antigravity's perspective, this shows up as a timeout.
Diagnosis
# Check GPU utilization (NVIDIA)
nvidia-smi
# Watch Ollama output for memory warnings
ollama run llama3.2:3b
# Look for "VRAM insufficient" or "falling back to CPU"Minimum VRAM reference by model size
| Model Size | Minimum VRAM (GPU) | RAM for CPU-only |
|---|---|---|
| 1–3B | 3–4 GB | 8 GB |
| 7B | 6–8 GB | 16 GB |
| 13B | 10–12 GB | 32 GB |
| 30B+ | 24 GB+ | 64 GB+ |
Fix
If VRAM is insufficient:
Switch to a smaller model or use a quantized version:
# Q4 quantized — uses roughly half the VRAM of the full model
ollama pull llama3.2:3b-instruct-q4_K_MTo force CPU-only mode with Ollama:
OLLAMA_NUM_GPU=0 ollama serveCPU inference is much slower, but works on any hardware. For a model that fits in 8GB of system RAM, you'll typically get 5–15 tokens per second on a modern CPU.
Pattern 4: macOS Security Blocking the Connection
Symptoms
On macOS, Ollama or LM Studio is running and curl works from the terminal — but Antigravity still can't connect.
Cause
macOS can restrict inter-application networking. Two things to check:
-
Firewall settings: System Settings → Privacy & Security → Firewall → confirm that Antigravity (or Electron, if it's Electron-based) is set to "Allow incoming connections"
-
Loopback binding: By default, Ollama listens only on
127.0.0.1. If macOS is resolvinglocalhostto::1(IPv6), the connection fails:
# Force Ollama to listen on all interfaces
OLLAMA_HOST=0.0.0.0:11434 ollama serveThen change Antigravity's base URL to use the explicit IP:
Base URL: http://127.0.0.1:11434
This forces IPv4 and avoids the localhost/IPv6 resolution mismatch.
Quick Diagnostic Commands
When you're not sure what's wrong, run these to narrow it down:
# Is Ollama running?
curl http://localhost:11434/api/tags
# Is LM Studio server running?
curl http://localhost:1234/v1/models
# Is the port actually open? (macOS/Linux)
lsof -i :11434
lsof -i :1234
# Windows
netstat -an | findstr 11434The vast majority of local LLM connection problems come down to: the runtime isn't running, or the URL/port in Antigravity doesn't match what the runtime is actually using. Verify the runtime directly with curl first — if that works, the problem is in Antigravity's configuration. If curl fails too, the runtime needs to be started or reconfigured.