Skip to content

LLM Providers

Ghost’s built-in agent loop is model-agnostic. Point it at a cloud API, run Ollama on your laptop, or run the model on the phone itself. Same tools, same skills, same interface — just swap the brain.

#ProviderWhere it runsBest forSetup
1Claude CodeYour machine (via CLI)Free daily driver, Sonnet/Opus/Haikuclaude CLI installed
2Anthropic APIAnthropic cloudLatest Claude 4 Sonnet + Opus with full controlANTHROPIC_API_KEY
3OpenRouterCloud multiplexerAny model — GPT, Gemini, DeepSeek, Grok, Hermes…OPENROUTER_API_KEY
4OllamaYour machineLocal models, no cloud, cheap iterationOllama installed
5On-deviceThe phone itself100% offline, no data leaves the deviceGhost app installed
6vLLMYour GPU / self-hostedFull-precision open-source models at speedvLLM server URL

Free with a Claude Pro/Max subscription, no API key needed.

Terminal window
# One-time
claude mcp add ghost stdio -- python3 -m gitd.mcp_server
# Use it

Ghost auto-selects claude-code provider with Sonnet. Zero config.

Get a key at console.anthropic.com.

Terminal window
export ANTHROPIC_API_KEY=sk-ant-...

Provider anthropic unlocks Claude Sonnet 4 and Opus 4 directly. Recommended for anything you’d bill a customer for.

Single API key, hundreds of models. Great for evals or when you need GPT / Gemini / Nous Hermes / etc.

Get a key at openrouter.ai/keys.

Terminal window
export OPENROUTER_API_KEY=sk-or-v1-...

Bundled model list:

Or type any OpenRouter model ID directly in the agent chat model selector.

For fast iteration, offline dev, or privacy-first setups. Install Ollama, then:

Terminal window
ollama pull llama3.2:3b

Ghost auto-discovers running Ollama models. Ships tuned defaults:

Browse the full model library for more.

The killer story: run the model inside the Ghost Android app via MediaPipe LLM Inference or llama.cpp. Nothing leaves the phone. Works in airplane mode.

Install the Ghost companion app, download a model bundle in-app, pick provider on-device in the dashboard.

If you’re running your own GPU (H100, A100, RTX 4090, etc.) with vLLM, point Ghost at it. Full-precision Gemma or any HuggingFace model at OpenAI-compatible endpoints.

Terminal window
export VLLM_BASE_URL=http://your-gpu-box:8000/v1

Bundled defaults for Gemma 4 (via Unsloth):

Great combo: Ghost on your phone → SSH tunnel to your workstation → vLLM on the desk GPU. Full model quality, low latency, private data.

“I just want to try Ghost” → Claude Code (free, zero config)

“I’m shipping to real users” → Anthropic API (best-in-class Claude 4)

“I’m evaluating models” → OpenRouter (hundreds of models, one key)

“I don’t want to pay per call” → Ollama (unlimited, local)

“I don’t want data leaving the phone” → On-device (100% offline)

“I have my own GPU” → vLLM (self-hosted, high throughput)

“I want the whole stack under my roof” → Ollama or vLLM + Ghost self-hosted

Cloud depCostLatencyQualityPrivacyOffline
Claude CodeAnthropicFree*Fast⭐⭐⭐⭐⭐⚠️ prompts leave device
Anthropic APIAnthropicPay-per-tokenFast⭐⭐⭐⭐⭐⚠️ prompts leave device
OpenRouterRouter + upstreamPay-per-tokenFast⭐⭐⭐⭐ (varies)⚠️ prompts leave device
OllamaNoneFreeMedium⭐⭐⭐🟢 local
On-deviceNoneFreeSlow-medium⭐⭐⭐🟢 phone-only
vLLMYour GPU boxElectricityFast⭐⭐⭐⭐🟢 self-hosted✅ (LAN)

*Free with Claude Pro/Max subscription.

From the dashboard:

  1. Open Agent Chat on any device
  2. Pick provider + model from the toolbar
  3. Send your message

From code:

from gitd.services.agent_chat import create_session
session = create_session(
device="YOUR_DEVICE_SERIAL",
provider="on-device", # or "anthropic", "ollama", etc.
model="gemma-4-e2b-q4km-gguf",
)

Switching between providers mid-conversation preserves history.

Environment variables:

Terminal window
# Cloud APIs
ANTHROPIC_API_KEY=sk-ant-...
OPENROUTER_API_KEY=sk-or-v1-...
# Local runtimes
VLLM_BASE_URL=http://gpu-host:8000/v1

Ollama is expected at http://localhost:11434 (the standard ollama serve address); the agent chat backend connects there directly.

Providers live in a single map:

gitd/services/agent_chat.py
PROVIDERS = {
"your-provider": {
"label": "Your Provider",
"models": ["model-id-1", "model-id-2"],
},
...
}

Plus a dispatch handler. See existing providers as reference. PRs welcome — especially for new local model runtimes and vendor-specific APIs.