Guarded Methods
| Method | JavaScript | Python |
|---|---|---|
client.responses.create(...) | Supported | Supported |
client.responses.create({ stream: true, ... }) | Supported | Supported as stream=True |
client.responses.stream(...) | Supported | Supported |
Non-streaming Request
- normalize request input
- extract supported image Data URLs
- normalize tools
- return
blockbefore the provider call - return
restrict_toolsand remove blocked tools before forwarding
Tool Loop Continuation
When the response contains function calls, execute the tools in your app and send the results through the same wrapped client.function_call_output items before OpenAI sees them.
Output Checks
If the response is final text and does not contain tool calls, Averta evaluates the output before returning it to your app. For non-streaming output:allowreturns the original resultblockthrowsAvertaSdkErrorrewriteasks OpenAI for a rewritten result and checks that rewritten output once more
Streaming
Responses streaming is guarded in both OpenAI wrappers:Current Limits
- Responses streaming supports one output text stream per response.
- Streaming output rewrite is not supported yet. If policy requires rewrite, the wrapper fails closed.
- Rich media request preflight supports Data URL images only.
- Remote image URLs, OpenAI file IDs, file content parts, and audio parts are rejected before preflight.
Debugging
| Symptom | Check |
|---|---|
| No request decision | Confirm the OpenAI client is wrapped before responses.create(...) is called. |
| No tool-result decision | Confirm the continuation sends function_call_output through the wrapped client. |
| Missing tool after request | Check request decision blockedTools and dashboard tool exposure policy. |
| Stream fails on unsafe text | Streaming rewrite is unsupported; use non-streaming calls for rewrite behavior. |
Related Pages
Tools
Learn how tool exposure filtering works.
Streaming
See streaming-specific limits.
Tool results
Screen returned tool content.
Output checks
Understand output blocks and rewrites.