Choose models
Open
Name models as tiers, route each runner to a cheap or strong model, pick the model the CI review runs on, and price it for the review's budget.
Give cheap work a cheap model and hard work a strong one. You name each model once as a tier, then point roles at the names, so switching provider changes only the tiers. To see the model each runner will use on your change, and where that choice came from, run shepherd preview.
Name tiers and pin roles
Section titled “Name tiers and pin roles”Set tiers, a ladder and role pins in .shepherd/config.yml:
tiers: # a name for a model, defined once fast: opencode/deepseek-v4.1-flash-free smart: bedrock:eu.anthropic.claude-sonnet-4-6ladder: [fast, smart] # cheapest first: every runner without a pin takes its rungmodels: reviewers: fast # the router and every lens, built-in and custom fixers: smart # triage, simplify, ci-repair, incident validators: smart # the verifier and the validator security: smart # one runner or lens beats its group loop: smart # the review model in CIOr set the same values from the command line:
shepherd models tier fast opencode/deepseek-v4.1-flash-freeshepherd models tier smart bedrock:eu.anthropic.claude-sonnet-4-6shepherd models ladder fast smartshepherd models pin reviewers fastshepherd models pin fixers smartshepherd models # every tier, the ladder and each runner's modelUnderstand how a runner gets its model
Section titled “Understand how a runner gets its model”A runner takes the first of these that applies:
- A pin on that runner or lens (
security: smart). - A pin on its role group (
reviewers: fast). - Its rung of the ladder: the router on the bottom rung, lenses and fixers one up, the validator two up.
- With no ladder, the harness’s own:
haiku>sonnet>opuson Claude Code, the session model on OpenCode.
Share tiers through a pack
Section titled “Share tiers through a pack”Tiers, the ladder and pins layer like every other setting. An organisation pack can define the tiers and the role pins once:
tiers: fast: opencode/deepseek-v4.1-flash-free smart: bedrock:eu.anthropic.claude-sonnet-4-6models: reviewers: fast fixers: smartEach repository extends it and overrides a single name:
# .shepherd/config.yml in one repositoryextends: ['github:acme/review-packs/org.yml@<sha>']models: payments: smart # this repository's payments lens on the strong modelYour personal file (~/.config/shepherd/lenses.yml, --global) fills only names the team left open.
Choose models from measurements
Section titled “Choose models from measurements”Pick a ladder from eval scores. shepherd eval runs each configuration several times over the same cases and names the cheapest one whose held-out recall and precision sit within noise of the best. Measure before you move a role down a rung.
Write model ids
Section titled “Write model ids”Write ids the way your harness takes them (haiku on Claude Code, provider/model on OpenCode), or the reviewer’s provider:model. Shepherd writes the reviewer’s spelling the OpenCode way (bedrock: becomes amazon-bedrock/, vertex: becomes google-vertex/), and shepherd models shows both.
Set the model for the review in GitHub Actions
Section titled “Set the model for the review in GitHub Actions”The review in CI runs one model. It takes the first of:
SHEPHERD_MODEL, if the repository variable is set: an override for trying a model without a pull request. A tier name works.model:underreview:in.shepherd/config.yml.models.loopin.shepherd/config.yml.- The built-in default.
Name the model in .shepherd/config.yml, so the review checks a change to it like any other policy change:
shepherd models pin loop bedrock:minimax.minimax-m2.5 # or: shepherd workflows --model ..., shepherd init --model ...Add the provider’s key as a secret under its usual name. Environment and credentials lists them. Bedrock can use OIDC instead of a key: shepherd gate init --aws-oidc and the AWS_ROLE_ARN variable.
Prices and the review’s budget
Section titled “Prices and the review’s budget”The review stops once it passes its dollar budget (guard.budget_usd under review:, $2 by default). It prices each model call from pricing: under review:, and from nothing else:
review: pricing: openai.gpt-oss-120b-1:0: { inputPer1M: 0.18, outputPer1M: 0.70, as_of: 2026-11-14, source: aws bedrock eu-west-1 }shepherd init and shepherd workflows write this entry for the model you choose the first time they add review:. They take the list price from models.dev and stamp it with today’s date. Change it to your region’s or contract’s rate. Bedrock prices differ by region: models.dev lists the us-east-1 rate.
A model without a price runs with only the token ceiling, and the review log says budget guard inactive. A key matches the model id exactly, by prefix, or after a vendor or region prefix. So openai.gpt-oss-120b prices eu.openai.gpt-oss-120b-1:0, and kimi-k3 prices openrouter:moonshotai/kimi-k3.
Related resources
Section titled “Related resources”- Environment and credentials: provider keys,
SHEPHERD_MODELand Bedrock OIDC - Measure review accuracy: run
shepherd evalbefore you change a rung - Configuration reference: the
tiers,ladder,modelsandreviewkeys - Compose team policy and recipes: how packs layer