Documentation/AI Assistant

Local AI (Ollama, LM Studio, Apple Intelligence)

AI Assistant

Local AI (Ollama, LM Studio, Apple Intelligence)

Tablen's AI Assistant does not have to talk to a cloud provider. You can run the model entirely on your own Mac — your schema and your queries never leave your machine.

There are three ways to keep AI local:

Option How it runs API key
Apple Intelligence Apple's on-device model (macOS 26+) None
Ollama Open-source local model server Placeholder only
LM Studio Local model server with a GUI Placeholder only

All AI features work the same regardless of provider: AI Chat, Inline Edit (Cmd+K), AI Completion / ghost text (Cmd+Shift+Space).

Option 1: Apple Intelligence (zero setup)

  1. Open Settings > AI.
  2. Set AI Provider to Apple Intelligence.

That's it — no API key, no server, nothing to install. The model runs on-device. Requires macOS 26 or later with Apple Intelligence enabled.

Option 2: Ollama

Ollama runs open models locally and exposes an OpenAI-compatible API on http://localhost:11434, which Tablen's Custom provider can talk to directly.

Setup

  1. Install Ollama and pull a model. Coding-oriented models work best for SQL:
brew install ollama
ollama serve &
ollama pull qwen2.5-coder:7b     # good SQL quality / speed balance
# alternatives: llama3.1:8b, codellama:13b, deepseek-coder-v2:16b
  1. In Tablen, open Settings > AI and configure:

    • AI Provider: Custom
    • Base URL: http://localhost:11434/v1/chat/completions
    • Model ID: the model you pulled, e.g. qwen2.5-coder:7b
    • API Key: any placeholder, e.g. ollama — Ollama ignores it, but Tablen requires a non-empty key for network providers
  2. Click Test Connection. You should see "Connection successful."

Notes

  • Localhost HTTP is fine: macOS exempts loopback connections from App Transport Security, and Tablen's custom provider accepts http:// URLs.
  • First response after loading a model can be slow (cold start); Tablen's AI request timeout accounts for this.
  • Bigger models give better SQL but need more RAM — 7b models run comfortably on 16 GB Apple Silicon.

Option 3: LM Studio

LM Studio works the same way — start its local server, then in Settings > AI:

  • AI Provider: Custom
  • Base URL: http://localhost:1234/v1/chat/completions
  • Model ID: the model identifier shown in LM Studio
  • API Key: any placeholder

What leaves your Mac (and what doesn't)

With a local provider:

  • Nothing leaves your Mac. Prompts, schema context (table/column names), and AI responses all stay on localhost.
  • Your database credentials are never part of AI requests with any provider — they live in the macOS Keychain.
  • Row data from your tables is not included in AI context unless you explicitly paste it into the chat.

With a cloud provider (Anthropic, OpenAI, Gemini, Grok), schema context is sent to that provider to answer your questions — see Privacy.

Troubleshooting

Symptom Fix
"Invalid custom base URL" Use the full endpoint including the path, e.g. http://localhost:11434/v1/chat/completions
"Not authenticated" Enter any non-empty API key (e.g. ollama) — the field can't be blank
Test succeeds but chat errors with "model not found" The Model ID must exactly match ollama list output, including the tag (e.g. qwen2.5-coder:7b)
Very slow first response The model is loading into memory — subsequent requests are much faster
Was this page helpful?
Report an issue