LLM Providers

nitpik is bring-your-own-model. You choose the LLM provider and supply your own API key — nitpik never proxies, stores, or meters your API calls.


Supported Providers

ProviderNITPIK_PROVIDER valueProvider-specific env var
AnthropicanthropicANTHROPIC_API_KEY
Azure OpenAIazureAZURE_OPENAI_API_KEY
CoherecohereCOHERE_API_KEY
DeepSeekdeepseekDEEPSEEK_API_KEY
GaladrielgaladrielGALADRIEL_API_KEY
GitHub ModelsgithubGITHUB_TOKEN
Google GeminigeminiGEMINI_API_KEY
GroqgroqGROQ_API_KEY
HuggingFacehuggingfaceHUGGINGFACE_API_KEY
HyperbolichyperbolicHYPERBOLIC_API_KEY
MiramiraMIRA_API_KEY
MistralmistralMISTRAL_API_KEY
MoonshotmoonshotMOONSHOT_API_KEY
Ollamaollama(none — runs locally)
OpenAIopenaiOPENAI_API_KEY
OpenRouteropenrouterOPENROUTER_API_KEY
PerplexityperplexityPERPLEXITY_API_KEY
TogethertogetherTOGETHER_API_KEY
xAI (Grok)xaiXAI_API_KEY
OpenAI-compatibleopenai-compatibleOPENAI_API_KEY

Third-party dependency notice: Provider integrations are powered by a third-party open-source library. This means provider support may change, break, or be removed due to upstream updates outside of nitpik's control. If you are considering a commercial license, we recommend verifying that your provider and model work correctly using the free unlicensed version of nitpik before purchasing. No license key is needed — just install and test with your own API key.

Basic Setup

Set two environment variables:

export NITPIK_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-...

nitpik looks for the provider-specific key first (e.g. ANTHROPIC_API_KEY), then falls back to NITPIK_API_KEY as a universal alternative:

export NITPIK_PROVIDER=anthropic
export NITPIK_API_KEY=sk-ant-...       # works for any provider

Choosing a Model

By default, nitpik picks a sensible model for each provider — you only need to set NITPIK_PROVIDER and an API key to get started. Override the default with NITPIK_MODEL:

export NITPIK_MODEL=claude-sonnet-4-20250514

Or in your .nitpik.toml:

[provider]
name = "anthropic"
model = "claude-sonnet-4-20250514"

Default Models

ProviderDefault model
Anthropicclaude-sonnet-4-20250514
Azure OpenAIgpt-4o
Coherecommand-r-plus
DeepSeekdeepseek-chat
Galadrielllama3.1-70b
GitHub Modelsopenai/gpt-4.1
Google Geminigemini-2.5-flash
Groqllama-3.3-70b-versatile
HuggingFacemeta-llama/Llama-3.1-70B-Instruct
Hyperbolicmeta-llama/Llama-3.1-70B-Instruct
Mirallama3.1-70b
Mistralmistral-large-latest
Moonshotmoonshot-v1-32k
Ollamallama3
OpenAIgpt-4o
OpenRouteranthropic/claude-sonnet-4-20250514
Perplexitysonar-pro
Togethermeta-llama/Llama-3.3-70B-Instruct-Turbo
xAI (Grok)grok-3
OpenAI-compatiblegpt-4o

Tip: Code review benefits from strong reasoning capabilities. Models like Claude Sonnet, GPT-4o, and Gemini 2.5 Flash tend to produce the most precise findings. Smaller or faster models work fine for quick feedback but may miss subtle issues.

Ollama (Local Models)

Ollama runs locally and does not require an API key:

export NITPIK_PROVIDER=ollama
export NITPIK_MODEL=llama3

By default nitpik connects to http://localhost:11434. To use a different host, set NITPIK_BASE_URL:

export NITPIK_BASE_URL=http://192.168.1.100:11434

Azure OpenAI

Azure requires your deployment endpoint as NITPIK_BASE_URL and the model is your deployment name:

export NITPIK_PROVIDER=azure
export NITPIK_BASE_URL=https://your-resource.openai.azure.com
export AZURE_OPENAI_API_KEY=your-key
export NITPIK_MODEL=your-deployment-name

OpenAI-Compatible Endpoints

Use any API that speaks the OpenAI chat completions protocol — self-hosted models, corporate proxies, or alternative providers:

export NITPIK_PROVIDER=openai-compatible
export NITPIK_BASE_URL=https://your-endpoint.example.com/v1
export OPENAI_API_KEY=your-key
export NITPIK_MODEL=your-model-name

This works with LM Studio, vLLM, and similar services.

Per-Profile Model Overrides

Individual reviewer profiles can specify their own model, overriding the global setting. This lets you use a cheaper model for simple checks and a more capable one for security analysis:

---
name: security
description: Deep security analysis
model: claude-sonnet-4-20250514
---

See Custom Profiles for the full profile format.

Config File Setup

Instead of environment variables, configure the provider in .nitpik.toml:

[provider]
name = "anthropic"
model = "claude-sonnet-4-20250514"
# api_key = "..."   # possible but not recommended — use env vars for secrets

Or in your global config at ~/.config/nitpik/config.toml to set a default for all repositories.

See Configuration for the full layering order.

Prompt Caching

For multi-file reviews, nitpik structures the prompt so that the system prefix (agent system prompt + project documentation + commit history) is byte-identical across every file in the run. Providers with prompt caching can reuse that prefix on the second task and beyond, cutting the input-token bill substantially on big diffs.

ProviderCachingHow it activates
Anthropicyes (ephemeral, 5 min)rig-core inserts cache_control on large system blocks
OpenAIyes (automatic)provider caches prompts ≥ 1024 input tokens
Geminiyes (implicit)context cache kicks in above provider thresholds
Azure OpenAIyes (automatic)inherits OpenAI's behavior
GitHub Modelsunknownupstream caching behavior not documented
Cohere, DeepSeek, Groq, Mistral, othersnone / provider-controlledno client opt-in

When cache hits occur, the run summary surfaces them:

  ▸ Tokens: 42.1K↑ in, 1.2K↓ out (28.0K cached, 67% hit)

The hit ratio (cached_input / input) tells you what fraction of input tokens were served from cache. Providers without caching simply omit the cache section from the summary.

Contact Us

Have a question or feedback? Send us a message and we'll get back to you.