Skip to content
Cawdit

Configure a model provider

Cawdit calls a large language model twice per part of a pull request. The review pass finds problems, and the verify pass checks each one and drops those it cannot confirm. Each pass can use its own model, so a cheaper model can verify.

You configure a provider in the deployment configuration or with CAWDIT_PROVIDERS_<NAME>_* variables. The Crow plugin has its own settings for the same values, shown below each example.

Anthropic

[providers.anthropic]
kind = "anthropic"
api_key = "env:ANTHROPIC_API_KEY"
models = { review = "claude-opus-5-5", verify = "claude-sonnet-5-5" }

Create the key in the Anthropic Console under API keys. In the Crow plugin, set model, verify_model and api_key, and leave provider out, since anthropic is the default.

OpenAI

[providers.openai]
kind = "openai"
api_key = "env:OPENAI_API_KEY"
models = { review = "gpt-5.5", verify = "gpt-5.4-mini" }

In the Crow plugin, add provider: openai.

A server that speaks the OpenAI API

Kind openai-compatible works with any endpoint that answers OpenAI’s chat completions API, such as Ollama, vLLM or LiteLLM. It needs base_url, and an API key only when the server asks for one.

[providers.local]
kind = "openai-compatible"
base_url = "http://ollama:11434/v1"
models = { review = "qwen3-coder:30b" }

For vLLM, point base_url at the server’s /v1, such as http://vllm:8000/v1, and use the model name the server was started with.

In the Crow plugin, add provider: openai-compatible and base_url. The Crow agent’s network must reach the server.

The server must support structured output with a JSON schema, the response_format of type json_schema. Ollama and vLLM do. A model that ignores the schema produces answers Cawdit cannot read, and the review fails.

Cawdit knows no prices for these models, so the review shows the cost as unknown. Add a [prices."<model>"] entry to set one, as the reference shows.

Hosted providers

The kinds below are hosted services that speak OpenAI’s chat completions API. Cawdit knows each one’s endpoint, how it asks for structured output, and the prices of its current models, so an entry needs only kind, api_key and models. Set base_url only to reach another endpoint of the same service, such as a regional one.

The provider name in the price table is the kind, whatever you call the entry. A [prices."<model>"] entry adds a model Cawdit does not know, or replaces a built-in price.

In the Crow plugin, set provider to the kind, and model, verify_model and api_key as for the other providers.

DeepSeek

[providers.deepseek]
kind = "deepseek"
api_key = "env:DEEPSEEK_API_KEY"
models = { review = "deepseek-v4-pro", verify = "deepseek-flash" }

Create the key on the DeepSeek platform under API keys. DeepSeek has no JSON schema mode, so Cawdit asks for JSON mode and puts the schema in the system prompt. When an answer does not match the schema, Cawdit asks the model once to correct it, as it does for every provider. The built-in prices are DeepSeek’s peak-hour rates, so a review in off-peak hours costs up to half the cost Cawdit shows.

Google Gemini

[providers.gemini]
kind = "gemini"
api_key = "env:GEMINI_API_KEY"
models = { review = "gemini-4-carbon", verify = "gemini-4-hydrogen" }

Create the key in Google AI Studio. Cawdit uses the Gemini API’s OpenAI compatibility endpoint, which Google still calls a beta. Vertex AI is a different API and needs kind openai-compatible with its own endpoint.

Groq

[providers.groq]
kind = "groq"
api_key = "env:GROQ_API_KEY"
models = { review = "openai/gpt-oss-120b", verify = "openai/gpt-oss-20b" }

Create the key in the Groq console. Groq supports JSON schemas only on some models, so Cawdit asks for JSON mode and puts the schema in the system prompt, which works with every Groq model.

Mistral

[providers.mistral]
kind = "mistral"
api_key = "env:MISTRAL_API_KEY"
models = { review = "mistral-large-4", verify = "mistral-small-2603" }

Create the key in the Mistral console under API keys. Cawdit uses Mistral’s own chat completions endpoint, which takes the OpenAI request format.

Moonshot (Kimi)

[providers.kimi]
kind = "moonshot"
api_key = "env:MOONSHOT_API_KEY"
models = { review = "kimi-k3.1-pro" }

Create the key on the Kimi platform at platform.kimi.ai. Cawdit uses the international endpoint, https://api.moonshot.ai/v1. A key from the mainland China platform works only on its own endpoint, so set base_url = "https://api.moonshot.cn/v1" for it. The built-in prices are the international prices in US dollars.

OpenRouter

[providers.openrouter]
kind = "openrouter"
api_key = "env:OPENROUTER_API_KEY"
models = { review = "anthropic/claude-sonnet-5.5", verify = "deepseek/deepseek-v4.1-flash" }

Model IDs name the vendor and the model, as OpenRouter’s model list shows them. Cawdit asks OpenRouter to route each request only to hosts that support every parameter it sends, so the JSON schema is never ignored. Choose a model whose OpenRouter page lists structured outputs, or the request fails. OpenRouter’s prices depend on the model and the host, so Cawdit has none built in, and the review shows the cost as unknown until you add a price.

xAI (Grok)

[providers.xai]
kind = "xai"
api_key = "env:XAI_API_KEY"
models = { review = "grok-4.7", verify = "grok-4.3" }

Create the key in the xAI console. xAI calls its chat completions API, which Cawdit uses, deprecated in favour of its Responses API, but has not announced an end date. For processing in the United States, set base_url = "https://us.api.x.ai/v1", which serves only some models. That endpoint charges a tenth more than the built-in prices, which are those of the global endpoint.

Several providers

A configuration may hold more than one provider. Then default_provider names the one reviews use:

default_provider = "anthropic"

cawdit eval --provider local compares another provider against the same dataset, so you can measure a model before you switch to it.

Choose a model

A stronger review model finds more real bugs, and a weaker one mostly adds noise. Start with the strongest model you can afford for review, and a cheaper model of the same family for verify. Each review shows its tokens and cost in its footer, and cawdit serve exports both as metrics.