- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.3k
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kerneltriage
Description
Summary
The text parameter (ResponseTextConfigParam) is not included in the final request to the OpenAI Responses API, even when set in OpenAIResponsesAgent.
Problem Details
- The textparameter is received in theOpenAIResponsesAgent's constructor and stored inagent.text(of typedict[str, Any], default is an empty dict).
- The textparameter is merged inResponsesAgentThreadActions._merge_options().
- However, the textkey is not added to theoptionsdictionary 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 APIExpected Behavior
- If the textparameter is set, it should be included in the request to the OpenAI Responses API.
- However, it should not be sent if textisNoneor an empty dict, or ifselectionisNone.
Scope of Impact
- All cases using OpenAIResponsesAgent.
- Particularly affects use cases involving Structured Outputs or JSON Schema.
Related Files
- responses_agent_thread_actions.py
- openai_responses_agent.py
Platform
- Language: Python
- Source: pip
- AI model: OpenAI Responses
- IDE: VS Code
- OS: Mac
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kerneltriage