AI providers
Configure Apple Intelligence, OpenAI, Anthropic, Ollama, or a custom OpenAI-compatible endpoint.
For: everyone.
QueryDeck supports five AI provider types. Pick one based on what you have, what you trust, and what you can pay for.
Choose in Settings
Settings → AI. Pick a provider in the dropdown. Each provider has its own configuration fields below.
The chosen provider applies to every connection. We don't yet support different providers per connection — vote on it via the in-app feedback button.
Apple Intelligence (Foundation Models)
Best for: privacy, zero config, no API costs.
| Requirement | Detail |
|---|---|
| macOS | 15.2 (Sequoia) or newer with Apple Intelligence enabled, or macOS 26 (Tahoe). |
| Hardware | Apple Silicon M1 or newer with 8 GB+ unified memory. |
| Setup | None. Pick it in the dropdown and you're done. |
| Cost | Free. Runs on-device. |
| Network | Not required. The model lives on your Mac. |
The model is Apple's on-device foundation model. It's smaller and less knowledgeable than the cloud providers but it's plenty for most QueryDeck tasks: writing SELECT statements, explaining joins, fixing simple errors.
For complex prompts (multi-CTE windows functions, intricate optimizations), switch to a cloud provider.
OpenAI
Best for: quality, broad capability.
| Field | Notes |
|---|---|
| API key | Your sk-... key from platform.openai.com. Stored in the macOS Keychain. |
| Model | Default gpt-4o-mini. Pick from the dropdown or type a model name. |
| Base URL | Optional, for proxies. Defaults to https://api.openai.com/v1. |
You pay OpenAI directly per request. QueryDeck does not proxy or rate-limit on top.
Recommended models:
| Model | Use when |
|---|---|
gpt-4o-mini | Default. Fast and cheap. Good for NL → SQL. |
gpt-4o | Better at complex schema reasoning. Slower and more expensive. |
gpt-4-turbo | If you have org-wide standardization on this model. |
Anthropic
Best for: structured output, careful reasoning.
| Field | Notes |
|---|---|
| API key | Your sk-ant-... key from console.anthropic.com. Stored in the macOS Keychain. |
| Model | Default claude-haiku-4-5-20251001. Pick from the dropdown. |
| Base URL | Optional. Defaults to https://api.anthropic.com/v1. |
You pay Anthropic directly per request.
Recommended models:
| Model | Use when |
|---|---|
claude-haiku-4-5 | Default. Fast, capable, low cost. |
claude-sonnet-4-6 | Best general coding model. Higher quality output. |
claude-opus-4-7 | Deepest reasoning. Pay for what you need. |
Ollama
Best for: local models, larger context than Apple Intelligence, offline use, total control.
| Field | Notes |
|---|---|
| Base URL | Defaults to http://localhost:11434. Change if you run Ollama on another machine. |
| Model | Pick from the list of models installed on the Ollama server. |
| API key | Not used unless you've set up a proxy in front of Ollama. |
You need Ollama installed and running. Pull a model before configuring QueryDeck:
ollama pull qwen2.5-coder:7b
ollama pull llama3.2:3b
ollama pull deepseek-coder-v2:16bRecommended models for SQL:
| Model | Notes |
|---|---|
qwen2.5-coder:7b | Good SQL out of the box. 4 GB RAM needed. |
deepseek-coder-v2:16b | Better quality, needs ~10 GB RAM. |
llama3.2:3b | Lightweight, fits on most laptops. |
Custom (OpenAI-compatible)
Best for: corporate gateways, Azure OpenAI, vLLM, LiteLLM, OpenRouter, anything that speaks the OpenAI API.
| Field | Notes |
|---|---|
| Base URL | The endpoint URL. Often ends in /v1. |
| API key | If your endpoint requires one. |
| Model | The model identifier expected by your endpoint. |
The custom provider speaks the OpenAI chat-completions API. If your endpoint accepts that format, it works.
Common pairings:
| Setup | Base URL | Notes |
|---|---|---|
| Azure OpenAI | https://<resource>.openai.azure.com/openai/deployments/<deployment> | Plus the api-version query param via headers |
| OpenRouter | https://openrouter.ai/api/v1 | Lets you switch models without switching providers |
| LiteLLM proxy | Your proxy URL | Useful for routing through a single API key |
| Self-hosted vLLM | http://your-server:8000/v1 | Make sure the endpoint is reachable from your Mac |
How keys are stored
API keys are written to the macOS Keychain under com.querydeck.app. They are never:
- Written to a config file in plaintext.
- Synced via iCloud.
- Sent to QueryDeck servers (we don't have any AI servers).
If you uninstall QueryDeck, the keys remain in the Keychain. Delete them from Keychain Access.app if you want them gone.
Switching providers
The active provider is per-installation, not per-connection or per-query. Switching wipes the active conversation in any open AI panel (the schema and provider context changes). The conversations on other tabs that haven't been opened remain.
Cost-aware tip: keep two providers configured — Apple Intelligence for routine work, OpenAI or Anthropic for hard prompts. Switch when needed.
Troubleshooting
"Invalid API key"
Re-paste from the source. OpenAI keys are 51 characters starting with sk-. Anthropic keys are around 100 characters starting with sk-ant-.
"Apple Intelligence not available"
Either the Mac doesn't support it (check System Settings → Apple Intelligence), or it's not yet enabled. Enable it, restart QueryDeck.
"Cannot connect to Ollama"
Ollama isn't running, or the base URL is wrong. Check with:
curl http://localhost:11434/api/tagsIf that returns a JSON list of models, Ollama is up. Otherwise: ollama serve.
"Model not found"
The model name doesn't match what the provider has. Check the spelling exactly — model IDs are case-sensitive and version-sensitive (gpt-4o-mini, not gpt-4o-mini-2024-07-18 unless your account has access).
What's next
- Natural language → SQL
- Explain, optimize, fix
- Privacy — what each provider sees