Expand description
interface MatchObject {
format?: FormatName;
message?: string | RegExp;
model?: string | RegExp;
predicate?: (req: MockRequest) => boolean;
system?: string | RegExp;
toolCallId?: string;
toolName?: string;
}Properties§
§§§§§§§
readonly format?: FormatNameOnly match requests from this API format.
readonly message?: string | RegExpSubstring or regex against the last user message.
readonly model?: string | RegExpSubstring or regex against the model name.
readonly predicate?: { ... }Extra predicate that runs after all other fields pass.
readonly system?: string | RegExpSubstring or regex against the system prompt.
readonly tool Call Id?: stringMatch when the last tool-result message has this tool_call_id.
readonly tool Name?: stringMatch when the request includes a tool definition with this name.
A structured matcher. Every field you set must match for the rule to fire.