QueryDeck Docs
AI Assistant

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

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

RequirementDetail
macOS15.2 (Sequoia) or newer with Apple Intelligence enabled, or macOS 26 (Tahoe).
HardwareApple Silicon M1 or newer with 8 GB+ unified memory.
SetupNone. Pick it in the dropdown and you're done.
CostFree. Runs on-device.
NetworkNot 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.

FieldNotes
API keyYour sk-... key from platform.openai.com. Stored in the macOS Keychain.
ModelDefault gpt-4o-mini. Pick from the dropdown or type a model name.
Base URLOptional, 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:

ModelUse when
gpt-4o-miniDefault. Fast and cheap. Good for NL → SQL.
gpt-4oBetter at complex schema reasoning. Slower and more expensive.
gpt-4-turboIf you have org-wide standardization on this model.

Anthropic

Best for: structured output, careful reasoning.

FieldNotes
API keyYour sk-ant-... key from console.anthropic.com. Stored in the macOS Keychain.
ModelDefault claude-haiku-4-5-20251001. Pick from the dropdown.
Base URLOptional. Defaults to https://api.anthropic.com/v1.

You pay Anthropic directly per request.

Recommended models:

ModelUse when
claude-haiku-4-5Default. Fast, capable, low cost.
claude-sonnet-4-6Best general coding model. Higher quality output.
claude-opus-4-7Deepest reasoning. Pay for what you need.

Ollama

Best for: local models, larger context than Apple Intelligence, offline use, total control.

FieldNotes
Base URLDefaults to http://localhost:11434. Change if you run Ollama on another machine.
ModelPick from the list of models installed on the Ollama server.
API keyNot 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:16b

Recommended models for SQL:

ModelNotes
qwen2.5-coder:7bGood SQL out of the box. 4 GB RAM needed.
deepseek-coder-v2:16bBetter quality, needs ~10 GB RAM.
llama3.2:3bLightweight, fits on most laptops.

Custom (OpenAI-compatible)

Best for: corporate gateways, Azure OpenAI, vLLM, LiteLLM, OpenRouter, anything that speaks the OpenAI API.

FieldNotes
Base URLThe endpoint URL. Often ends in /v1.
API keyIf your endpoint requires one.
ModelThe 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:

SetupBase URLNotes
Azure OpenAIhttps://<resource>.openai.azure.com/openai/deployments/<deployment>Plus the api-version query param via headers
OpenRouterhttps://openrouter.ai/api/v1Lets you switch models without switching providers
LiteLLM proxyYour proxy URLUseful for routing through a single API key
Self-hosted vLLMhttp://your-server:8000/v1Make 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 SettingsApple 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/tags

If 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