Документация доступна только на английском языке.
Race
Send one prompt to two, three or four models at once, watch them work side by side, and keep the result you like.
Different models are good at different things, and often the quickest way to learn which one handles a task well is to try them. A race sends the same prompt to several models at once. Each works in its own session, and you keep the one that did best.
Race is in preview. Races run in the desktop app and are remembered on the computer that started them.
Start a race
- Open Race models… from the composer's + menu, choose Race… in the model picker, press ⌘⇧R, or type
/race. - In Race this prompt, write the prompt and pick two to four models as lanes. The same model can race more than once. Each lane shows an estimate of its cost and time.
- Optionally set Limit to stop the whole race at a spend, and open Advanced for cross-family review.
- Choose Start race.
A race needs a git repository and two models that can use tools. In a folder without git, Nib offers Initialize Git repository. Uncommitted changes aren't included in the lanes, so commit first if they matter.
Lanes and worktrees
Every lane runs in its own worktree on a branch named nib/race-<id>/<letter>, with lanes lettered a to d. Lanes can edit and run commands without touching your working copy or each other.
Each lane is an ordinary session. It asks for permission like any other session, and each request is its own item in your inbox. It appears in the sidebar and has its own receipt.
Watch the race
The race view shows one column per lane with its model, its status and its live transcript.
| Status | Meaning |
|---|---|
| Queued | The lane hasn't started yet |
| Running | The model is working |
| Waiting for you | The lane needs a permission or an answer |
| Done | The lane finished |
| Failed | The lane stopped with an error |
| Stopped | You stopped the lane |
| Interrupted | Nib restarted before the lane finished. Open it to continue |
When a lane finishes, it runs the project's own tests, the test script in its package.json. You don't type a check. A project that declares no tests isn't checked, and its results say so. With cross-family review on, a model from another family reviews each lane and flags problems. Summary, Diff and Tests compare the lanes side by side.
The judge, on by default, reads the check results and the changes and recommends a lane. Its pick is advisory: you choose. With the judge off, Ask a judge runs it on demand. Nib also marks Fastest, Cheapest and Smallest diff.
Use ← and → to move between lanes and Enter to pick one. Stop race stops every lane.
Pick a winner
Choose Use this on the lane you want to keep, then choose how to use it:
| Option | What happens |
|---|---|
| Squash into the base branch | The default. The lane's changes land as one commit |
| Merge into the base branch | The lane's commits land with a merge |
| Keep its branch | Nothing lands. Open a pull request from the lane's branch |
Landing rebases the lane onto the latest base branch, then runs the project's tests. Nothing lands unless it passes. If the lane conflicts with the base branch, Ask lane B to resolve sends the lane the conflicting files. Right after a landing, Undo in its notice reverts it.
Archive the other lanes is on by default. Clean worktrees are removed at once, ones with uncommitted changes after a few days, and every branch is kept.
Delete race removes the race with its lanes' sessions and worktrees. Work you adopted stays on its branch.
Limits
- A race is remembered on the computer that started it. Opening the race link elsewhere shows "This race isn't here". The lane sessions are still available as ordinary sessions.
- Each lane costs what a session on that model costs. A race of four lanes costs roughly four sessions, plus the reviews and the judge.
Next
- Review: look closely at the winning diff.
- Budgets and receipts: see what each lane cost.