ANTIGRAVITY LABJP
Articles/Antigravity Basics
Antigravity Basics/2026-04-14Beginner

Antigravity Local LLM Not Connecting: Complete Troubleshooting Guide

Can't get Antigravity to connect to your local LLM? This guide covers all four failure patterns — Ollama not running, LM Studio server not started, VRAM issues, and macOS firewall blocking — with diagnostic commands and step-by-step fixes.

Antigravity322local LLM14troubleshooting105Ollama15configuration3

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:

  1. The local runtime is running and listening on an API endpoint
  2. Antigravity has the correct URL and port for that endpoint
  3. 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 11434

If 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 list

Ollama'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 ollama to 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:8080

Pattern 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

  1. Open LM Studio
  2. Click the "Local Server" icon in the left sidebar (the <-> symbol)
  3. Click "Start Server"
  4. 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 SizeMinimum VRAM (GPU)RAM for CPU-only
1–3B3–4 GB8 GB
7B6–8 GB16 GB
13B10–12 GB32 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_M

To force CPU-only mode with Ollama:

OLLAMA_NUM_GPU=0 ollama serve

CPU 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:

  1. Firewall settings: System Settings → Privacy & Security → Firewall → confirm that Antigravity (or Electron, if it's Electron-based) is set to "Allow incoming connections"

  2. Loopback binding: By default, Ollama listens only on 127.0.0.1. If macOS is resolving localhost to ::1 (IPv6), the connection fails:

# Force Ollama to listen on all interfaces
OLLAMA_HOST=0.0.0.0:11434 ollama serve

Then 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 11434

The 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.

Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Antigravity2026-04-09
Antigravity Local LLM (Ollama) Connection Error: Complete Diagnosis and Fix Guide
Can't connect Antigravity to your local LLM (Ollama)? This diagnostic guide walks through every possible cause — ports, firewalls, model configs, environment variables — with step-by-step fixes.
Antigravity2026-05-02
Gemma 4 × Antigravity Complete Practical Guide — Local LLM, RAG, Ollama/LM Studio Integration
A practical, production-grade guide to running Antigravity with Gemma 4 — covering local LLM setup, RAG pipelines, Ollama/LM Studio integration, and fine-tuning. Includes troubleshooting and operational best practices.
Antigravity2026-04-23
Antigravity × Local LLM (Ollama / LM Studio / LM Link): A Production Connection Playbook
Getting Antigravity to connect to Ollama, LM Studio, or LM Link is the easy part. Running on that setup for eight hours a day, week after week, surfaces disconnects, model-swap hangs, stale sessions after lunch, and VRAM pressure from other processes. This playbook covers hardening the connection layer, picking the right backend for the task, and designing the fallback path for when local goes silent.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →