Skip to content

OpenAI

alloy.models.openai

OpenAIBackend

Bases: ModelBackend

OpenAI backend using the Responses API.

Implements completion and streaming via responses.create/responses.stream, supports function tool-calls by looping with previous_response_id, and emits structured outputs using text.format with a JSON Schema when an output_schema is provided. Raises ConfigurationError if the SDK is unavailable.