AI Engines

WhatThePatch supports multiple AI providers. Choose based on your needs.

Engine Comparison

Engine Type Requires Best For
Claude API API API key Best overall quality
Claude CLI CLI Claude Code installed Team auth, no API key needed
OpenAI API API API key Fast, reliable
OpenAI Codex CLI CLI Codex CLI installed ChatGPT Plus/Pro auth
Gemini API API API key Google ecosystem
Gemini CLI CLI Gemini CLI installed Google Cloud auth
Ollama Local Ollama installed Privacy, offline, no API costs

API Engines

Require an API key in config.yaml:

config.yaml
engine: "claude-api" engines: claude-api: api_key: "sk-ant-api03-..." model: "claude-sonnet-4-20250514" openai-api: api_key: "sk-..." model: "gpt-4o" gemini-api: api_key: "AIza..." model: "gemini-2.0-flash"

CLI Engines

Use existing authentication from installed CLI tools. No API key needed in config.

Claude CLI

Install Claude Code, then:

Terminal
wtp --switch-engine # Select "Claude CLI"

OpenAI Codex CLI

Install via npm install -g @openai/codex, sign in, then switch engine.

Gemini CLI

Install from gemini-cli, authenticate with Google, then switch engine.

Local Engine (Ollama)

Run models locally with no API costs and complete privacy.

Terminal
# Install Ollama curl -fsSL https://ollama.com/install.sh | sh # Pull a model ollama pull codellama # Start server (if not running) ollama serve # Switch to Ollama in WhatThePatch wtp --switch-engine

Note: Local models (7B-13B parameters) may produce less consistent output formatting compared to cloud APIs. Best for privacy-sensitive reviews or quick informal checks.

Which Engine to Choose?

  • Best quality: Claude API or OpenAI API
  • Team/Enterprise auth: CLI engines (Claude CLI, Codex CLI)
  • Privacy/Offline: Ollama
  • Cost-conscious: Ollama or Gemini API (generous free tier)

Switching Engines

Terminal
# Interactive engine selection wtp --switch-engine # Switch model for current engine wtp --switch-model # Test current engine wtp --test-config

More Information

See the full engines documentation for detailed configuration options.