openai.ResponsesClient$stream

The OpenAI Responses API client (POST {base_url}/responses).

Reference version

Signature

class openai.ResponsesClient$stream

The OpenAI Responses API client (POST {base_url}/responses).

Options come in three groups:

  • credentials/endpoint — api_key/base_url (or the *_env names read at request time);
  • first-class typed request parameters — temperature, top_p, max_output_tokens, reasoning_effort, reasoning_summary, verbosity, parallel_tool_calls, store. Each one is lowered into the typed request class only when it is non-null;
  • passthrough — request_body (deep-merged over the serialized typed request as the LAST step, null deletes a key), headers and query_params.

Structured output stays SAP-based: the schema rides in the prompt text and text.format is deliberately never set. A caller who wants native JSON-schema output sets it through request_body.

Deliberately not provided: the engine's finish_reason_allow_list and finish_reason_deny_list. There is no config surface for them here and none is planned — the typed ai.content.StopReason plus the runner's Refused / MaxTokens enforcement covers what the lists were used for, and a caller who wants a stricter policy writes it over the returned turn (or wraps the client) rather than configuring a string list of provider finish reasons.

Source:<builtin>/openai/responses.bamlbytes 0–0

Fields

model

string | null

api_key

ai.Credential$stream | null

base_url

ai.Credential$stream | null

request_timeout_ms

int | null

time_to_first_token_timeout_ms

int | null

temperature

float | null

top_p

float | null

max_output_tokens

int | null

reasoning_effort

string | null

reasoning_summary

string | null

verbosity

string | null

parallel_tool_calls

bool | null

store

bool | null

request_body

baml.json.json$stream | null

Deep-merged over the serialized typed request as the last step before the body is stringified. A null value DELETES that key, so {"store": null} drops the store: false this client sends.

headers

map<string, string> | null

Extra request headers, applied (lowercased) before authorization.

query_params

map<string, string> | null

Extra URL query parameters, percent-encoded onto the endpoint.

capture_wire

bool | null