init(ordered:unordered:disallowed:)
Creates a trajectory expectation with ordered and unordered requirements, plus specific tools that must not be called.
Declaration
init(ordered: [ToolExpectation] = [], unordered: [ToolExpectation] = [], disallowed: [ToolExpectation])Parameters
- ordered:
Steps that must be satisfied in sequential order.
- unordered:
Tool calls that must occur at some point, regardless of position.
- disallowed:
Tools that must NOT be called.
Discussion
Additional tool calls beyond the expected ones are always allowed when using disallowed expectations — the disallowed list targets specific tools while permitting everything else. To disallow all unexpected calls instead, use init(ordered:unordered:allowsAdditionalToolCalls:) with allowsAdditionalToolCalls: false.