You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python Bug: The text parameter was missing when sending to the OpenAI Responses API. #13281
The text parameter (ResponseTextConfigParam) is not included in the final request to the OpenAI Responses API, even when set in OpenAIResponsesAgent.
Problem Details
The text parameter is received in the OpenAIResponsesAgent's constructor and stored in agent.text (of type dict[str, Any], default is an empty dict).
The text parameter is merged in ResponsesAgentThreadActions._merge_options().
However, the text key is not added to the options dictionary in _generate_options(), causing it to be missing from the API request.
Steps to Reproduce
agent=OpenAIResponsesAgent(
ai_model_id="gpt-5",
client=client,
text={"format": {"type": "json_schema", "name": "...", "schema": {...}}},
)
# Even when calling agent.get_response(), the text parameter is not sent to the API
Expected Behavior
If the text parameter is set, it should be included in the request to the OpenAI Responses API.
However, it should not be sent if text is None or an empty dict, or if selection is None.
Scope of Impact
All cases using OpenAIResponsesAgent.
Particularly affects use cases involving Structured Outputs or JSON Schema.
Activity
ymuichiro commentedon Oct 22, 2025
PR: #13280
Python: Fixed sending "text" parameter to OpenAI Responses API (#13280)