What it is good for
Sending traffic to a cheaper model once spend crosses a threshold. Falling back when a quota is exhausted. Routing requests that carry an image to a model that can see. Serving a different model at night. Each of those is a graph rather than a branch in your own code.How a request reaches a workflow
- A client calls
/v1/chat/completionsor/v1/responseswith a model name. - Before the model is resolved, the gateway considers every enabled workflow in that workspace.
- The one whose trigger node names the requested model runs. If several match, the default configuration wins, and the oldest after that.
- If the graph reaches a selection node, the request’s model is replaced with the selected one.
- Anything else, including any error inside the workflow, leaves the request on the model it asked for.
Defining what auto means
auto is a model name like any other, so a trigger node can name it. Build a
workflow triggered on auto and it decides what the keyword resolves to for
that workspace, using any of the checks available to any other workflow. The
gateway’s own choice is only used when no workflow claims it, and it is not
careful: see Models.
Workflows apply to
/v1/chat/completions and /v1/responses. Requests to the
Anthropic Messages endpoint are not routed through them.Control flow
Execution starts at the trigger and follows edges depth first. A branch stops as soon as a node fails, and the first branch that reaches a selection node wins. Only the metric check node branches, with separate success and failure outputs. Every other node either continues along its edges or stops its branch. There are no loops. Cycles are rejected before the workflow runs, and a workflow that executes more than ten nodes is abandoned.Limits
Only a workspace owner or admin can create or edit a workflow. Members can view
them.
Pages
Node reference
Every node type, what it reads, and how to configure it.
A worked example
A cost cap that downgrades the model once weekly spend crosses a threshold.