-
Notifications
You must be signed in to change notification settings - Fork 714
Description
Checks
- I have updated to the lastest minor and patch version of Strands
- I have checked the documentation and this is not expected behavior
- I have searched ./issues and there are no duplicates of my issue
Strands Version
1.30.0 (main branch HEAD)
Python Version
3.13.7
Operating System
macOS 15.7.4
Installation Method
pip
Steps to Reproduce
from strands.models.openai_responses import OpenAIResponsesModel
model = OpenAIResponsesModel(
model_id="gpt-5.4",
params={
"max_output_tokens": 1000,
"reasoning": {"effort": "high"},
},
)
model.structured_output(MySchema, prompt="hello")
# max_output_tokens and reasoning are silently droppedExpected Behavior
All config params (max_output_tokens, reasoning, instructions, etc.) should be passed through to client.responses.parse(), excluding only model/input (already handled) and stream (injected by _format_request(), incompatible with parse()).
Actual Behavior
Only model, input, and text_format are passed to responses.parse().
All other config params are silently ignored because structured_output() extracts only ["input"] from _format_request() result.
Additional Context
_format_request() correctly spreads self.config["params"] into the request dict (L407), but structured_output() discards everything except input (L363).
This also affects instructions (system_prompt) — it is built by _format_request() but never forwarded to responses.parse().
The stream() method does not have this issue since it passes the full request dict to responses.create().
Possible Solution
Build parse_kwargs from the full _format_request() result, excluding model/input (already handled explicitly) and stream (hardcoded by _format_request(), incompatible with parse()). Other params pass through, letting the API/SDK validate incompatible combinations.