Skip to main content
Use this page when your agent is built on OpenAI’s Responses API. The wrappers preserve the native OpenAI method names and add Averta decisions around supported calls.

Guarded Methods

Non-streaming Request

Before calling OpenAI, Averta can:
  • normalize request input
  • extract supported image Data URLs
  • normalize tools
  • return block before the provider call
  • return restrict_tools and 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.
On continuation calls, Averta evaluates new 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:
  • allow returns the original result
  • block throws AvertaSdkError
  • rewrite asks OpenAI for a rewritten result and checks that rewritten output once more

Streaming

Responses streaming is guarded in both OpenAI wrappers:
For streaming calls, request and tool-result checks run before the stream opens. Streaming output is checked as it is produced.

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

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.