Guarded Methods
| Method | JavaScript | Python |
|---|---|---|
client.chat.completions.create(...) | Supported | Supported |
client.chat.completions.create({ stream: true, ... }) | Supported | Supported as stream=True |
Basic Request
Tools
- normalize function and custom tools
- remove blocked tools before forwarding the request
- sanitize
tool_choicewhen the requested tool was blocked - check returned tool calls before your app executes them
Tool Result Continuation
Send tool results back astool role messages through the wrapped client.
Streaming
Chat Completions streaming is guarded in both OpenAI wrappers:n > 1 fail closed before provider execution.
Current Limits
- Chat Completions streaming supports one streamed text choice.
- Streaming output rewrite is not supported yet.
- Rich media request preflight supports Data URL images in
image_url.url. - Remote image URLs, file content parts, and audio content parts are rejected before preflight.
Related Pages
Tools
Understand OpenAI tool filtering.
Tool results
Screen tool output before continuation.