Developers
Routing rules
A rule says where a task may go, how its result is checked, and how much it may spend. Set once, applied to every task it covers.
An example rule
# Example. A routing rule for one product.
rule: northwick-store
prefer: sponsored # use sponsored models when they do the task well
data_location: [us, ca] # providers that keep data in the US or Canada
check:
code: tests + review # tests must pass, a second model reviews
copy: review
on_fail: next_model_up # re-route only the failed task
max_cost_per_task: auto # set by the balance
pin:
images: gemini # always use this model for imagesFields
| Field | What it does | Value in the example |
|---|---|---|
rule | The name of the rule. One rule can cover a product or a whole workspace | northwick-store |
prefer | What Maestro favours when several models do the task well | sponsored |
data_location | Only providers that keep data in these places are used | [us, ca] |
check | How each kind of work is checked before it moves on | code: tests + review; copy: review |
on_fail | What happens when a check fails | next_model_up: re-route only the failed task |
max_cost_per_task | The most one task may spend | auto: set by the balance |
pin | A model that always does one kind of work | images: gemini |
Prefer sponsored models
With prefer: sponsored, a sponsored model takes every task it does well, and costs nothing. When another model does a task better, that one is used, and the record shows the cost.
Keep data in a region
data_location limits tasks to providers that keep data in the places you list. Tasks covered by the rule never go to a provider outside them.
Pin a model
pin sends one kind of work to one model every time. Pin as few as you need: unpinned work keeps getting the best model as the board changes. You can also choose the model yourself on any single task, and Maestro uses the one you chose.
Kinds of work
The kinds of work a rule can name are the ones on the board: specs, drafting and planning, hard planning, code, summaries, testing, review, research, images, translation, extraction, cleanup and tagging.