Calling verify() with no guards configured fails closed. ResponseVerifier() without default_guards (or VerifiedOpenAI without guards) returns verified=False with the reason “No guards configured”, and blocks the response in strict mode. Earlier versions returned verified=True in this case. Always configure at least one guard.
The OpenResponsesMiddleware intercepts streaming events from the Open Responses protocol, verifying tool_call and function_call items through your guard stack before they are yielded to the consumer.
from qwed_open_responses.middleware.streaming_interceptor import OpenResponsesMiddlewarefrom qwed_open_responses.guards import ToolGuard, SafetyGuardmiddleware = OpenResponsesMiddleware( guards=[ToolGuard(), SafetyGuard()], block_on_failure=True, # Replace blocked items with system_intervention on_blocked=my_callback, # Optional callback when an item is blocked)# Wrap any async stream of Open Responses itemsasync for item in middleware.verify_stream(response_stream): process(item)# Check runtime statsprint(middleware.get_stats())# {"total": 12, "verified": 10, "blocked": 2}