Skip to main content
Anthropic is the default and recommended LLM provider for MergeWatch. It offers the simplest setup — just add your API key and you are ready to go. Works on every platform (Docker, AWS, GCP, bare metal).

Configuration

Set these environment variables in your .env file or container environment:
VariableRequiredValue
LLM_PROVIDERYesanthropic
ANTHROPIC_API_KEYYesYour Anthropic API key
LLM_MODELYesAnthropic model ID to use (e.g., claude-sonnet-4-20250514)
When LLM_PROVIDER=anthropic, you must set LLM_MODEL to an Anthropic-native model ID. The built-in defaults (us.anthropic.claude-sonnet-4-20250514-v1:0 for the primary model and us.anthropic.claude-haiku-4-5-20251001-v1:0 for the light model) are Bedrock inference profile IDs and are not valid on the Anthropic API.

Model roles

MergeWatch uses two model slots per review:
  • Primary model (model in .mergewatch.yml) — runs the agent pipeline (security, bugs, style, error handling, test coverage, comment accuracy). Use Claude Sonnet 4 for the best review quality.
  • Light model (lightModel in .mergewatch.yml) — runs the summary and diagram passes. Claude Haiku 4.5 is a good cost-optimized choice here.
Setting LLM_MODEL overrides both slots with the same model. For split primary/light models, configure them in .mergewatch.yml instead — see mergewatch.yml reference.

Example .env file

# LLM Provider
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-api03-...

# Pick a model — Sonnet for the highest review quality
LLM_MODEL=claude-sonnet-4-20250514

Model suggestions

Anthropic model IDBest for
claude-sonnet-4-20250514Recommended. Highest review quality for deep agent analysis.
claude-haiku-4-5-20251001Cost-optimized. Faster and cheaper; good for summary/diagram.

Pricing

You pay Anthropic directly for API usage. MergeWatch does not add any markup or proxy fees. See the Anthropic pricing page for current per-token rates.

Next steps

Configure review behavior

Tune sensitivity, ignored paths, and review focus areas.

LiteLLM Proxy

Use OpenAI, Azure, Gemini, or 100+ other providers via LiteLLM.

Environment variables

Full list of supported environment variables.

Platform guides

Deploy MergeWatch on your platform of choice.