ReasoningMockProvider type

Test-only provider that returns deterministic, scripted responses instead of calling a real LLM. Used by the ReasoningMock-tagged tests in client/workspaces/media-examples/tests/. Should not be used in production workflows.

Modes: mirror — emit a function_call for the first non-reserved tool declared in the spec (i.e. not _update_state) scripted — emit responses[i] for the i-th request, clamping at end error_injection — fail the first failFirstN requests, then succeed echo — emit a text response containing the prompt verbatim

Signature:

export type ReasoningMockProvider = {
    providerType: "mock";
    mode: {
        kind: "mirror";
        includeStateArgs?: boolean;
    } | {
        kind: "scripted";
        responses: ReasoningMockResponse[];
        echoState?: boolean;
    } | {
        kind: "error_injection";
        failFirstN: number;
        errorKind: "MALFORMED_FUNCTION_CALL" | "RATE_LIMIT" | "TIMEOUT";
        successResponse: ReasoningMockResponse;
    } | {
        kind: "echo";
    };
};

References: ReasoningMockResponse