/** * A global switch that blocks real provider calls, for test suites. * * Python parity: `praisonaiagents.model_harness.guard` * (`allow_model_requests`, `no_model_requests`, `ModelRequestBlocked`). * * ```ts * // test setup * allowModelRequests(false); // nothing in this suite may reach a provider * ``` * * A blocked call throws {@link ModelRequestBlocked} naming the offending call * site, so an accidental live call in a test is loud rather than slow and * billed. */ /** Thrown when a real provider call is attempted while requests are blocked. */ export declare class ModelRequestBlocked extends Error { readonly model?: string; readonly callSite?: string; constructor(model?: string, callSite?: string); } /** Turn real provider calls on or off for the whole process. */ export declare function allowModelRequests(value?: boolean): void; /** Whether a real provider call is currently permitted. */ export declare function modelRequestsAllowed(): boolean; /** * Block real provider calls for the duration of `fn`. Nests and composes with * {@link allowModelRequests}; requests stay blocked until every open scope has * exited, including across interleaved async scopes. */ export declare function noModelRequests(fn: () => T | Promise): Promise; /** Throw if requests are blocked. Called at the provider boundary. */ export declare function checkModelRequest(model?: string): void;