In this categoryClaude Code ยท 45
Claude CodeIntermediate

How to Pin a Specific Model for One Project

Set a model per project so everyone on the repo gets consistent behavior without passing a flag each session.

6 minIntermediate

Different models behave differently, so a repo where one person uses a fast model and another uses a heavier one gets inconsistent results. Pinning a model in project settings makes the choice part of the codebase, so every contributor and their agent run the same one.

What you need

  • A project with a settings file your tool reads
  • Agreement on which model the repo should use
  • About 5 minutes

Step 1: Decide where the setting lives

A personal setting follows you across every project; a project setting is committed and shared. To pin one repo for the whole team, use the project file.

FileScopeCommit it?
User settingsAll your projectsNo
Project settingsThis repo, sharedYes
Local settingsThis repo, just youNo

Step 2: Set the model in project settings

Add a model key to the committed project settings file. Now anyone who opens the repo inherits it automatically.

.claude/settings.json
{
  "model": "claude-opus-4-1"
}

Step 3: Confirm the effective value

Settings merge across layers, so check which value actually wins after the merge. The effective model should be the one you pinned.

Session - effective config
> /config
model: claude-opus-4-1 (from .claude/settings.json)
source order: user < project < local
The merged result confirms the pinned model is active.
Let individuals override locally
If someone needs a different model for a quick experiment, they can set it in their local settings, which beats the project file without changing what others get.

Result: the repo carries its own model choice, so results stay consistent no matter who is driving the agent.

Watch related tutorials

Free weekly email

New guides in your inbox

Fresh step-by-step how-to guides as we publish them. One email a week, no more.

Tags
#model#settings#config#teams#consistency