ReqLLM.Providers.OpenAI.ResponsesAPI (ReqLLM v1.0.0)
View SourceOpenAI Responses API driver for reasoning models.
Implements the ReqLLM.Providers.OpenAI.API behaviour for OpenAI's Responses endpoint,
which provides extended reasoning capabilities for advanced models.
Endpoint
/v1/responses
Supported Models
Models with "api": "responses" metadata:
- o-series: o1, o3, o4, o1-preview, o1-mini
- GPT-4.1 series: gpt-4.1, gpt-4.1-mini
- GPT-5 series: gpt-5, gpt-5-preview
Capabilities
- Reasoning: Extended thinking with explicit reasoning token tracking
- Streaming: SSE-based streaming with reasoning deltas and usage events
- Tools: Function calling with responses-specific format
- Reasoning effort: Control computation intensity (minimal, low, medium, high)
- Enhanced usage: Separate tracking of reasoning vs output tokens
Encoding Specifics
- Input messages use
input_textcontent type instead oftext - Token limits use
max_output_tokensinstead ofmax_tokens - Tool choice format:
{type: "function", name: "tool_name"} - Reasoning effort:
{effort: "high"}format
Decoding
Non-streaming Responses
Aggregates multiple output segment types:
output_textsegments → text contentreasoningsegments (summary + content) → thinking contentfunction_callsegments → tool_call parts
Streaming Events
response.output_text.delta→ text chunksresponse.reasoning.delta→ thinking chunksresponse.usage→ usage metrics with reasoning_tokensresponse.completed→ terminal event with finish_reasonresponse.incomplete→ terminal event for truncated responses
Usage Normalization
Extracts reasoning tokens from usage.output_tokens_details.reasoning_tokens and provides:
:reasoning_tokens- Primary field (recommended):reasoning- Backward-compatibility alias (deprecated)