How the money nodes stand around a model call
Which node of a flow really moves the money of a model call, what the four nodes of the money chain add, and the order the publish check asks of them.
4 min read
Four nodes of the Money group of the palette stand around a model call: Estimate Cost, Budget Check, Reserve Budget and Capture & Release. Together with the call they make a money chain. The fifth node of the group, Require Approval, waits for the decision of a person and is not part of a chain — Require Approval. This page says what each node of the chain adds, and in what order a flow may draw them.
Who moves the money
The money of a call is moved by AI Model alone. When an execution reaches it, Slen holds the expected cost of the call in your budgets, calls the provider, and settles the hold after the answer. A flow without Estimate Cost, Reserve Budget and Capture & Release holds and spends exactly as much as the same flow with them.
Budget Check is the one node of the chain that decides something. It asks whether the call would be allowed and refuses before any money is held.
Estimate Cost, Reserve Budget and Capture & Release are marks. They change nothing about what is held or spent. They show on the canvas, in the trace and in the metrics of the builder where the steps of the call happen.
How budget reservations work explains the hold itself.
The order of a chain
- Request — Default → Estimate Cost
- Estimate Cost — Default → Budget Check
- Budget Check — Allow → Reserve Budget
- Reserve Budget — Default → AI Model
- AI Model — Success → Capture & Release
- Capture & Release — Default → Return Response
- Budget Check — Deny → Reject Request
The nodes before the call — Estimate Cost, Budget Check and Reserve Budget — lead to the model node through each other, and through Condition nodes when the chain branches.
Capture & Release stands right after the model node, on its Success port.
The Deny branch of Budget Check leaves the chain. A model on that branch is another call, with a chain of its own.
A chain belongs to one model call. A flow that calls several models draws a chain for each call that needs one, and every call holds and is settled on its own.
What the publish check asks
A flow that breaks one of these rules is not published.
Each of Estimate Cost, Budget Check and Reserve Budget leads to exactly one AI Model, through nodes of the chain and Condition nodes only. A node that leads to no model is
misplaced_finance_node, and one whose branches lead to two or more models isambiguous_finance_chain. A node of another kind on the way, such as Transform, ends the chain there.Every connection that arrives at Capture & Release comes from the Success port of an AI Model node, and at least one arrives. A node with any other connection, or with none, is
misplaced_finance_node.No Queue and no Require Approval can be reached from Reserve Budget before a model is reached:
park_inside_finance_chain. The check follows every connection but a Deny branch, through nodes of any kind — a Condition after Reserve Budget whose other branch leads to a Queue breaks the rule too. An execution that waits holds nothing, and the hold is taken when the call is made.
The check does not hold the nodes before the call to an order among themselves: it asks where they lead.
What each node leaves in the trace
| Node | What the trace of an execution shows on it |
|---|---|
| Estimate Cost | An estimated event with the forecast of the call, and, when the call is answered, a second estimated event with the estimate its hold was taken on |
| Budget Check | A budget_denied or policy_denied event when it refuses |
| Reserve Budget | The reserved event of the hold of the call, when the call is answered |
| AI Model | The attempts at the provider and the answer. The estimated, reserved and captured events of the call stand here when its chain has no node to carry them |
| Capture & Release | The captured event of the call. The cost of the call is counted on this node in the metrics of the builder, and not on the model node |
The two estimated events of Estimate Cost tell themselves apart by source: preflight is the forecast, authorize is the estimate of the hold.
When an execution passes the nodes before the call and then leaves the chain — a Condition sends it another way, or Budget Check refuses — the hold is never taken, and no event of a hold is written on them.
Where to go next
Estimate Cost, Budget Check, Reserve Budget and Capture & Release — each node of the chain.
AI Model — the node that holds, calls and settles.
How budget reservations work — what a hold does to your budgets.
How a flow is built — the groups of the palette and what every flow must have.
Publish checks — every check of the graph and whether it stops a publication.