1. brindle
  2. Docs
  3. Providers and models

Providers and models

brindle runs whichever agent CLIs you have (Claude Code, Codex, OpenCode, Google Antigravity), signed in your own way, plus its own loop over open-weight models. Each profile names its provider, and the supervisor hands each task to the one that fits.

Choosing models

The supervisor is the agent you talk to: it plans the work and hands it to workers. The first time you run brindle it asks which CLI should run the supervisor and remembers your pick. After that it starts straight away and says which CLI it's on. It asks again only if your pick is no longer signed in or allowed.

brindle -s opens the picker and remembers its choice; brindle -s codex switches to Codex and remembers the choice. In the picker, w picks the model for light, medium and heavy tasks (the advanced tier is set in routing, see below): through a CLI you sign in to, locally with Ollama, or hosted with an API key. Anything that isn't ready is set up right there, including signing in, downloading a local model after a memory check, or checking an API key with its provider before it's stored on your machine.

The picker only lists what you're allowed to use. In an organisation that's the agents and models your admins allow for your role; anything else is refused, including with -s.

brindle            # first run: pick the supervisor
brindle -s         # change it; w sets worker models
brindle -s codex   # switch straight to Codex

Repos can still set worker routing in .brindle/config.json; see Routing by weight and configuration.

Claude Code

The default for the supervisor and workers. brindle launches your installed claude with its own hooks for status and messages and marks each worktree as trusted. With its permission policy on, it can approve a compound command such as cd src && pytest -q when every part is allowed; deny rules and commands reserved for you still take precedence. A profile's env.NAME: value lines can point Claude Code at another Anthropic-compatible backend.

Codex

Give a profile provider: codex, or run the supervisor on it with brindle --supervisor codex. Workers still use their own profiles' providers.

  • brindle reads a Codex agent's status from Codex's notify hook, passed at launch with -c, so it adds nothing to your Codex config.
  • brindle records repository trust in config.toml in the Codex home it uses, once per main repository, so it covers every worktree. This is brindle's own home after signing in inside brindle; otherwise it's your CODEX_HOME or ~/.codex. With "permission_policy": "on" it also trusts its own permission hooks there and maintains that trust when their definitions change.
  • Codex has no Stop hook. For an autopilot supervisor on Codex, the end of a turn is where brindle tells it to keep going.
  • The built-in reviewer-codex profile reviews Claude's work with a different model. Make it the repo's reviewer or review_profile.

OpenCode

Install with npm install -g opencode-ai; doctor reports whether it is installed. Use brindle -s opencode for the supervisor, developer-opencode or reviewer-opencode for workers, or a profile with provider: opencode. This integration was checked with OpenCode 1.19.3.

brindle passes its MCP server, a status/permission plugin and the profile prompt through OPENCODE_CONFIG_CONTENT, merged over your own OpenCode config without writing into the worktree. Your providers, models and other MCP servers remain available. The plugin reads OpenCode events for turn starts, completion, errors and permission prompts.

Profile fieldOpenCode behavior
modelPassed as --model. Use provider/model; bare claude-, gpt- or gemini-model names get their provider added. Unset uses OpenCode's default.
allowed_toolsBash(cmd:*) becomes an allowed bash pattern; other commands ask.
permission_modebypassPermissions allows everything; dontAsk permits only allowed_tools commands and refuses edits and web fetches; acceptEdits/auto permits edits; plan selects OpenCode's plan agent. Unset uses opencode_permission_mode.
add_dirs, worker_extra_read_dirsAllowed external directories. A dontAsk worker cannot read outside its worktree or allowed directories.
effortNot passed: the terminal UI has no flag for it.

With permission_policy on, the plugin checks every tool call. A policy denial stops it; allow or ask still leaves the profile's permissions in force. The policy can narrow access but cannot widen it.

For profiles without permission_mode, user config opencode_permission_mode selects ask (default: OpenCode prompts for edits and uncovered commands), auto (edits run, other commands still ask), or autonomous (the plugin is the gate). Autonomous requires permission_policy on; with it off OpenCode falls back to ask. In autonomous mode a policy ask is refused unless a saved approval covers it and spends a use. An unreadable patch or a hook that does not answer is refused too.

Google Antigravity

brindle runs Antigravity's terminal agent, agy. Install it and sign in once, then use brindle --supervisor antigravity or give a profile provider: antigravity (for example a Gemini reviewer).

curl -fsSL https://antigravity.google/cli/install.sh | bash
agy        # sign in with your Google account, then quit

agy takes no command-line options for hooks or MCP servers, so brindle adds its files to the checkout's .agents/ folder and lists them in .git/info/exclude. For workers, brindle manages approvals through its hook by default ("agy_approvals": "brindle" in config). With "agy_approvals": "prompt", agy asks in its own terminal and ignores a hook's allow answer. With the permission policy on, brindle also mirrors compatible allow and deny rules into ~/.gemini/antigravity-cli/settings.json.

Antigravity setup details

For unattended API-key use, agy 1.1.13 or newer needs both "modelProvider": "gemini" in ~/.gemini/antigravity-cli/settings.json and GEMINI_API_KEY. Put the key in your environment or a user profile, never the committed .brindle/agents directory. Other cloud sign-in methods are selected on agy's own sign-in screen; the key alone does not bypass browser login without modelProvider.

brindle manages .agents/mcp_config.json, .agents/hooks.json and .agents/rules/brindle.md, adding to existing files and leaving committed ones unchanged. The first message warms up its MCP connection. Permission modes map auto to Auto, acceptEdits to accept-edits and plan to plan. Workers, dontAsk sessions and interactive Autonomous sessions with permission policy on use brindle's hook as the gate; unknown calls are denied and reported with instructions for a grant. Trust dialogs are answered at launch without changing your settings file.

With agy_approvals set to prompt, or other interactive modes, agy's own settings decide approvals and its hook ignores allow answers. A worker's allowed_tools alone cannot grant shell calls there; brindle reports missing rules in assign/handoff. Add shared agy rules yourself when appropriate, for example {"permissions": {"allow": ["command(uv run pytest)", "command(git status)", "command(git diff)", "command(git add)", "command(git commit)"]}}. See Permission policy.

Open-weight models (native provider)

Use Qwen3-Coder, GLM, DeepSeek, Kimi or gpt-oss through a local server or hosted API. The native loop delivers messages between model calls, uses exact-match edits, runs one command at a time and summarizes old context when its window fills. It is for workers and reviewers; the supervisor needs a supported CLI.

provider: native runs brindle's own agent loop instead of a third-party CLI. It talks to any OpenAI-compatible chat-completions or Anthropic Messages endpoint, runs the worker's tools (Read, Write, Edit, Glob, Grep, Bash, plus brindle's messaging and report tools, and LSP lookups when a language server is installed) inside its worktree, and reports status directly. The built-in developer-local and reviewer-local profiles run Qwen3-Coder 30B on Ollama.

brew install ollama
ollama pull qwen3-coder:30b
brindle doctor        # checks the model is available

Starting the model

---
name: my-local-worker
extends: developer-local
provider: native
api: openai
base_url: http://localhost:11434/v1
model: qwen3-coder:30b
context_tokens: 32k
---

For a hosted endpoint add api_key_env naming the variable with your key. Set Ollama's OLLAMA_CONTEXT_LENGTH to at least context_tokens plus reply room to avoid silent truncation. Tool-calling quality varies: if a model repeatedly misforms calls, try another tool-capable model.

qwen3-coder:30b is a 19 GB download and needs about 24 GB of memory; the picker checks before downloading.

When a native profile points at an Ollama on this machine that isn't answering, brindle and brindle continue start ollama serve with the context length the profiles need, unless OLLAMA_CONTEXT_LENGTH is already set. They check that the models can load, then release them immediately (local_models, on by default). brindle stops that server when the last session using it ends; a server you started yourself is left alone. "local_models": false never starts or warms one and uses only a server that's already running.

Endpoints

Examples of servers the native provider can talk to. api_key_env names the environment variable holding a provider API key; the names below are common choices, not requirements. Claude subscription tokens cannot be used as native API keys. Choosing a hosted model for a task size in the picker writes an OpenRouter profile for it named developer-or-<model>.

Serverapi, URL and notes
Ollamaopenai · http://localhost:11434/v1 · free
LM Studioopenai · http://localhost:1234/v1 · free
llama.cppopenai · http://127.0.0.1:8080/v1 · start it with --jinja
OpenRouteropenai · https://openrouter.ai/api/v1 · api_key_env: OPENROUTER_API_KEY
Z.ai GLManthropic · https://api.z.ai/api/anthropic · api_key_env: ZAI_API_KEY
DeepSeekanthropic · https://api.deepseek.com/anthropic · api_key_env: DEEPSEEK_API_KEY
Anthropicanthropic · https://api.anthropic.com · api_key_env: ANTHROPIC_API_KEY

A 30B-class local model does well on small, well-specified tasks and reviews of modest diffs, and less well on long multi-step work. Native workers are headless: brindle agent peek shows each turn, and brindle send talks to them.

Model catalog and language servers

With no base_url, model: provider/model resolves through Models.dev, filling base_url, api, api_key_env and context_tokens; explicit profile fields win. The catalog is cached for one day in ~/.brindle/models-catalog.json. Offline or air-gap uses the cache and reports when none exists. Profiles with base_url are left alone, including OpenRouter-style IDs. A native endpoint failure retries on developer-local's model only when it is served locally or on a private network, then keeps that conversation there and records the model used per reply.

The native worker starts available language servers on the first supported file read or change: pyright-langserver/pylsp, typescript-language-server, gopls, rust-analyzer, clangd, ruby-lsp or lua-language-server. The worktree is their root and they stop with the worker. Diagnostics follow edits; Definition and References take 1-based line and character columns. Explicit LSP calls report missing servers; file tools stay quiet. Narrowed read_scope disables servers because indexing cannot enforce it.

Which provider can do what

ProviderRoles
Claude CodeSupervisor (the default) and workers
CodexSupervisor (brindle --supervisor codex) and workers
AntigravitySupervisor (brindle --supervisor antigravity) and workers
OpenCodeSupervisor (brindle --supervisor opencode) and workers (developer-opencode, reviewer-opencode)
nativeWorkers and reviewers only. Its loop has the worker tools, not assign or handoff.
shellA plain shell, a stand-in for testing brindle itself. Not for real work.
subagentWorkers only, through assign/handoff. It runs inside the supervisor's own Agent tool.

CLIs known to be signed out are excluded

  • A profile whose CLI isn't installed or is known to be signed out is left out of the supervisor's profile list and of routing by weight, and learning never picks it as a reviewer. A timeout, an older CLI or an inconclusive sign-in check doesn't block it.
  • Naming one directly, including as the repo's reviewer, stops with how to sign in (claude auth login, codex login, running agy) instead of opening the CLI's login screen. OpenCode counts as signed in; keys for the models it uses are its own config.
  • brindle doctor shows each CLI's sign-in.
  • Sign-in checks use the same config home as the agent. Signing in through brindle's picker uses brindle's own home for Claude Code and Codex; a login in your usual terminal may belong to a different home.
  • A key in the environment (ANTHROPIC_API_KEY, OPENAI_API_KEY, ...) counts as signed in.
  • agy uses GEMINI_API_KEY only with "modelProvider": "gemini" in its settings. brindle counts the key as signed in either way, so set both. Otherwise run agy once yourself to sign in with your Google account.
  • A worker whose status no hook reports (Codex, for one) and that shows nothing new for 10 minutes without reporting (say, because the account's plan doesn't include Codex) is reported to its supervisor.

Key login

For unattended workers, key login avoids a shared subscription's browser sign-in and quota where the CLI supports it. Save keys with brindle keys set NAME, export them in your shell, or set env.NAME in a user profile under ~/.brindle/agents, never a committed repo profile. Doctor reports variable names and sources without printing values.

ProviderKey login
Claude CodeANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or CLAUDE_CODE_OAUTH_TOKEN; cloud routes use CLAUDE_CODE_USE_BEDROCK, CLAUDE_CODE_USE_VERTEX or CLAUDE_CODE_USE_FOUNDRY.
CodexOPENAI_API_KEY or CODEX_API_KEY, subject to its login mode. Interactive Codex under a ChatGPT login ignores both; use codex login --with-api-key to switch to key billing. Headless codex exec uses CODEX_API_KEY over the login and ignores OPENAI_API_KEY (checked on CLI 0.162.0).
AntigravityGEMINI_API_KEY with modelProvider set to gemini; otherwise its browser sign-in. See Antigravity setup.
OpenCodeThe model provider's key variables or a provider login saved in OpenCode. Free opencode/... models need neither.

A profile's auth: auto (default) uses an available key from the environment or brindle keys, else the CLI login. auth: subscription strips that provider's API keys and uses its own login. auth: api_key refuses launch without a key. For interactive Codex under a ChatGPT login, api_key is refused: switch its login first or use subscription. Enterprise deny_personal_keys still applies on top.

Running unattended on API keys

API-key billing supplies no subscription usage percentage, so subscription pause thresholds and percentage-based checkpoints do not trigger. Control spend with provider account limits or brindle's budget policies. Token counts and cost estimates come from Claude, Codex, Antigravity and native transcripts; estimates depend on available model prices.

Claude and Antigravity runtime authentication failures, such as 401/403, revoked keys or billing errors, are caught through failure/exit hooks. brindle marks the worker failed, alerts the supervisor, invalidates cached sign-in checks and pauses goal driving with “Credentials need attention.” Codex's turn-completion event does not classify runtime auth errors, so it cannot automatically mark these failures or trigger that credential pause. Monitor unattended Codex work with brindle watch or its pane and recover manually when needed.

To recover a failed or credential-blocked session, export a fresh key or update brindle keys set NAME, then run brindle continue. Paused/failed agents relaunch with refreshed session credentials; later delegations use them too. Newly stored keys and recovery credentials override stale launcher environments for new panes; explicit profile env keys override defaults.

For proactive Claude rotation, configure apiKeyHelper in user or project Claude settings. Claude reruns it every five minutes (adjustable with CLAUDE_CODE_API_KEY_HELPER_TTL_MS) and after a 401. Do not also export ANTHROPIC_API_KEY or save a Claude key in brindle keys: the environment key wins over the helper. Codex and Antigravity need workers stopped before rotation. Quit the supervisor chat, or press q twice in the sidebar, to pause the whole session; update the environment or stored key, then run brindle continue. Continuing a healthy active session only reattaches and does not restart workers or refresh their running environments.

Antigravity also needs unattended permission setup: its default brindle hook is the gate. With agy_approvals set to prompt, commands not allowed by agy's own settings still wait, even if the profile lists them in allowed_tools.

Routing by weight

Custom profile fields, inheritance and guardrails are documented in Agent profiles.

The supervisor sizes a task and passes weight to assign or handoff. brindle picks an available profile for that tier.

WeightFor
lightSmall, mechanical work: docs, renames, simple tests
mediumA normal feature or bugfix
heavySystem architecture, broad refactoring
advancedComplex, long-running system design and implementation

The routing key lists each tier's profiles. The first available profile is the tier's baseline; the rest are candidates hosted learning may pick instead. The defaults, which you can override tier by tier:

{
  "routing": {
    "light":    ["developer-codex", "developer-light", "developer-sonnet", "developer", "developer-local", "developer-codex-luna", "developer-codex-terra"],
    "medium":   ["developer-codex", "developer-sonnet", "developer", "developer-heavy", "developer-codex-terra", "developer-codex-sol"],
    "heavy":    ["developer-heavy", "developer-gemini", "developer", "developer-codex", "developer-codex-sol", "developer-codex-astra"],
    "advanced": ["developer-fable", "developer-heavy", "developer-gemini"]
  }
}

developer runs on Claude Code's own default model. developer-sonnet runs on Claude Sonnet at high effort, developer-light on Claude Haiku at low effort, developer-heavy on Claude Opus at high effort, developer-fable on Claude Fable at high effort, developer-gemini on Google Antigravity at high effort, developer-codex on Codex, and developer-local on your local model. The Codex variants developer-codex-luna, developer-codex-terra, developer-codex-sol and developer-codex-astra select GPT-6-Luna, GPT-6.1-Terra, GPT-6.1-Sol and GPT-6-Astra respectively.

A profile is skipped when its CLI isn't installed or is known to be signed out, the local model isn't answering or won't fit in memory, its provider is too close to your usage_limit, it is over budget, its provider is in exclude_providers, your account isn't allowed to use it, or it is above max_weight. Routing reserves limit_headroom percentage points for heavy and advanced work (10 by default), half for medium and a quarter for light. By default, developer-fable is eligible only when the supervisor marks a task design_heavy; "fable_for_design_only": false lifts that restriction. With hosted learning on, learning chooses among the profiles left unless the tier is locked with routing_locked. Otherwise the first available one wins. When every candidate is out, brindle tries the repo's default_agent, subject to routing restrictions and launch checks; if every candidate is over budget, it refuses the task. With no weight or milestone profile given, hosted learning picks among your learning_candidates (else the medium tier's list). The reply says what was picked and why:

weight medium -> developer (Codex at 93%, skipped developer-codex)

A profile you name takes precedence, but still has to pass launch checks; exceeding max_weight is an error. A milestone's profile is used when the task names no weight or profile. A weight above max_weight is capped, and docs-only assignments are routed down a tier (heavy and advanced to medium).

Provider quota

brindle tracks the subscription usage it can observe and shows a note per provider, such as Codex at 82% of its weekly limit, resets Thu 9:00am, in assign replies, get_progress, the sidebar (all but the local model) and brindle doctor. Quota tracking reads CLI output and local session logs, and asks Claude Code and Antigravity to fetch usage through their own CLIs. brindle does not send login tokens to a provider's usage API itself.

ProviderSource
ClaudeThe status line data Claude Code gives brindle, plus claude -p /usage output
CodexThe latest rate-limit event in its local session logs (5-hour, weekly and monthly windows)
Antigravityagy -p /usage --output-format json: model-group usage buckets and reset times; a limit error also marks it unavailable for limit_cooldown_minutes.
NativeFull headroom while the local model server answers, none while it doesn't

Workers on your own cloud

Any plan can use its own cloud credentials. A profile's env.NAME fields select the backend; assign its name or list it in routing. Prefer native for open-weight models. Claude Code can use Anthropic-compatible gateways via ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, but non-Claude endpoints are unsupported by Anthropic and may lack caching or sufficient context. Ollama 0.14+ also serves this API at http://localhost:11434 with token ollama.

---
name: developer-bedrock
provider: claude
auth: cloud
model: us.anthropic.claude-haiku-4-5-20251001-v1:0
env.CLAUDE_CODE_USE_BEDROCK: 1
env.AWS_PROFILE: company
env.AWS_REGION: us-east-1
---

Bedrock uses the named AWS profile/SSO or credential chain; sign in first. Vertex uses CLAUDE_CODE_USE_VERTEX: 1, CLOUD_ML_REGION and ANTHROPIC_VERTEX_PROJECT_ID with Application Default Credentials (gcloud auth application-default login). Set CLOUDSDK_CONFIG for a separate gcloud identity. Codex selects its provider in its home's config.toml; env.CODEX_HOME gives a profile its own home and sign-in. Antigravity can use a Gemini key and GOOGLE_GEMINI_BASE_URL for a gateway; its Vertex login path has not been validated by brindle.

For Gemini on Vertex or Azure OpenAI, use OpenCode cloud profiles:

provider: opencode
model: google-vertex/gemini-2.5-pro
auth: cloud
env.GOOGLE_CLOUD_PROJECT: your-project
env.VERTEX_LOCATION: us-central1
env.CLOUDSDK_CONFIG: /absolute/path/to/company-gcloud
provider: opencode
model: azure/your-deployment
auth: cloud
env.AZURE_CONFIG_DIR: /absolute/path/to/company-azure
env.AZURE_RESOURCE_NAME: your-resource
env.AZURE_TENANT_ID: your-tenant
env.AZURE_SUBSCRIPTION_ID: your-subscription

Gemini uses that gcloud directory's application_default_credentials.json explicitly. Profile project and region override inherited OpenCode aliases; a profile CLOUDSDK_CONFIG overrides inherited ADC selectors, while an explicit profile GOOGLE_APPLICATION_CREDENTIALS chooses a custom file. A custom file must be refreshed directly if browser login would write elsewhere. Non-SSO and federated credential chains keep their handling; their expiry is not validated by these profile checks.

Azure requires a separate CLI directory and resource. Optional tenant/subscription must match the active identity. Sign-in uses az login and then OpenCode's auth login for Azure with “Microsoft Entra ID (Azure CLI)”; preflight checks a Cognitive Services token and the chosen resource's connection. It never changes your default Azure CLI config. An endpoint alone does not select CLI authentication. This is Azure OpenAI, separate from Claude on Foundry.

OpenCode cloud connection stores are isolated under ~/.brindle/cloud-opencode by identity and project/resource. auth: cloud removes inherited model API keys that could bypass company billing, including Bedrock bearer keys. A qualified model name alone does not enable cloud login; API-key profiles keep their behavior.

Cloud preflight and doctor group profiles by identity, report availability/known expiry, and offer the matching sign-in. Profile project, region and credential source survive desktop actions and completion checks. Duplicate actions reuse a running terminal; automatic and desktop sign-in share a source lock. Expired credentials hold session delivery, even across supervisor providers; a session using several identities stays held until all work again. Live model calls, browser sign-in and credential renewal have not yet been validated end to end across all cloud setups; check your project's permissions and available models before relying on them. Native can send bearer-authenticated requests but does not acquire or renew Google/Azure CLI tokens.

Using your company's access

An org agent_setup takes precedence: brindle login or brindle doctor --fix signs into the selected route. Without it, login can inspect managed Claude settings, CLI sign-in status and existing AWS SSO, gcloud or Azure configuration read-only and propose the access it found. It does not read tokens for discovery. The default is no, and noninteractive use is no. Accepting saves self-serve agent_setup in user config without enforce; doctor labels it and shows who is billed. You must already be authorized to use that access. See Enterprise enforcement and identity locks.

Hosted learning

With a brindle Pro plan, brindle learns which profile suits which kind of task. When neither you nor a milestone names one, it picks among the available profiles for the task's weight, or among your learning_candidates, and the reply says why. Offline, or without the plan, routing works as above. A profile you name always wins.

  • Learning is per person on Pro and per organization on Team, and runs only on PawDelta's servers.
  • It gets only coarse records: task kind and size, weight, profile names and relative cost, outcomes, with the repo and agent as keyed hashes. Never task text, file paths, branch names, provider or model.
learningEffect
"auto"Default. Uses it when your plan includes it.
"cloud"Selects it explicitly. Still needs the plan.
"off"Turns it off.

brindle learning says whether it's on for this repo, and if not, why.

What it gained

brindle account savings shows what learning's picks did in this repo, this month, last month and all time:

  • how many tasks it picked against the baseline
  • review rounds per task and failed or escalated tasks, for each
  • an estimate of the cost difference, in dollars when token counts and prices are available, otherwise relative cost; shown once at least 5 comparable tasks picked by learning have finished

It reads only this machine's records and is labelled as an estimate. Org admins see org-wide totals on the account page.

Learning across your company

If your company runs several orgs, someone who owns them can link them into one company:

brindle account org company link <org_id>  # unlink removes one
brindle account org learning-share on

Each org's owner or admin then decides whether to pool its learning with the company's other orgs. It's off by default. It never pools with another company, and an org in no company pools with no one. The pool gives a starting point; each org's own results still count most. Turning it off stops new contributions.