Skip to main content
Combine stop helpers to enforce product budgets independently of the model’s decision to continue.
The SDK also provides tool-call and finish-reason conditions. Inspect $result->run->stopReason and normalized usage after completion so the application can distinguish a budget stop from a normal model finish. Stopping is a bounded result, not automatically an exception. Decide which stop reasons your product treats as successful, retryable, or user-visible.
Last modified on July 26, 2026