# Add models — every type

Four kinds of model, side by side, mixed freely. "+ Add a model" behind the chat model picker has three tabs (Cloud API / Ollama / Local GGUF); CLI harnesses are enabled in setup or Settings.

## Which route, when
- Already use Claude/Codex in a terminal -> CLI harness (their sign-in, no downloads, no GPU)
- Everything local, easy -> Ollama
- Everything local, specific build -> GGUF via built-in llama.cpp
- Low-powered machine -> cloud API key
RAM rule of thumb: 4B ~ 8 GB, 12B ~ 16 GB.

## Route 1: Ollama
1. Install Ollama once (Kaptain shows the per-OS command; it deliberately won't install it). Kaptain auto-starts an installed Ollama at serve.
2. + Add a model > Ollama tab.
3. Type any name from ollama.com/library (e.g. `qwen3:8b`) and pull — live progress.
Setup wizard starter set: qwen3:4b (2.6 GB), qwen3:8b (5.2 GB), gemma3:12b (8.1 GB), nomic-embed-text (0.3 GB, KodeGraph embeddings).

## Route 2: GGUF / built-in llama.cpp
1. + Add a model > Local GGUF tab.
2. Paste a DIRECT .gguf link (Hugging Face: the `/resolve/main/model.gguf` form; page URLs rejected). Download goes to a .part file and the GGUF magic is verified — a broken link never leaves a corrupt model.
3. Files land in the models folder inside Kaptain's data folder — ~/.local/share/kaptain/models (Linux), %LOCALAPPDATA%\Kaptain\models (Windows), ~/Library/Application Support/Kaptain/models (macOS); override: KAPTAIN_MODELS_DIR — and appear automatically. "Scan system for GGUF files" finds existing ones.
Kaptain runs GGUF with its managed llama-server; setup can build one for your GPU (Metal/CUDA/Vulkan — needs git + cmake). A custom llama-server path can be set in Settings; clearing it returns to auto-discovery.

## Route 3: Claude & Codex CLIs
If `claude` or `codex` is installed + signed in, Kaptain drives it as a model (their subscription, Kaptain's tools/scheduling).
1. Enable in setup (detects install + sign-in per CLI) or Settings.
2. Appears as `claude-cli` / `codex-cli`.
3. Pick the underlying model in the composer's gear popover — discovered from your installed binary; default "CLI default".
Kaptain's toolbelt reaches these CLIs automatically inside Kaptain. For standalone terminal use see the MCP guide.
NOT offered: Gemini CLI as a harness model; Anthropic as an API-key provider (Claude = CLI route).

## Route 4: Cloud API keys
1. + Add a model > Cloud API tab.
2. Presets: OpenAI, Google Gemini, DeepSeek, Groq, Mistral, Together AI, OpenRouter, Custom (any OpenAI-compatible base).
3. Type the model id YOUR account has (no guessed catalogues) + paste the key.
Keys never echo back to the browser. Rotate in Settings > Providers & keys > Update keys (key-only, atomic).

## Per-model settings (gear popover)
Thinking (live reasoning) · Stream tokens · Context window num_ctx (real default/max shown) · Max output · Tool approval (Ask / Ask-risky / Read-only / Auto in workspace / Full) · Tool calls (Auto/Native/Text) · Reasoning effort (minimal/low/medium/high, only where supported; discovered from installed CLIs). Per model, field-level saves, real revert.
