A customer message can contain commands, but that does not make it a trusted instruction. Keep the application's policy separate from the data being processed. A recorded request lets you inspect that boundary before considering the quality of any generated answer.
Return the recorded request from a fresh MockClient.responses.create call. Put case.policy in instructions and case.user in a user input item. Use case.model and a 128-token output cap. Do not promote user text into instructions.
The notebook executes your Python against an original local mock. Use the supplied case rather than copying visible values. The hidden checks change identities, revisions and boundary inputs; no provider endpoint or external tool is contacted.
An example implementation of the function contract.