Bug Description
OpenAIResponsesModel.structured_output() silently drops user-configured params like temperature, max_output_tokens, reasoning (for o-series models), etc.
Root Cause
The structured_output() method calls _format_request() which correctly spreads self.config["params"] into the request dict. However, structured_output() only extracts model and input from the result — all other params from the request are silently dropped when calling client.responses.parse().
Reproduction
from strands.models.openai_responses import OpenAIResponsesModel
model = OpenAIResponsesModel(
model_id="o3",
params={
"temperature": 0.5,
"max_output_tokens": 1000,
"reasoning": {"effort": "high"}, # Important for o-series models
},
)
# These params are correctly passed in model.stream() via _format_request(),
# but in structured_output(), only "model" and "input" are extracted from
# the request dict — temperature, max_output_tokens, reasoning are all dropped.
Expected Behavior
All params from the config should be passed through to client.responses.parse(), excluding keys that are already individually handled or inappropriate (model, input, stream, tools, instructions).
Actual Behavior
Only model, input, and text_format are passed to responses.parse(). All other config params are silently ignored.
Bug Description
OpenAIResponsesModel.structured_output()silently drops user-configured params liketemperature,max_output_tokens,reasoning(for o-series models), etc.Root Cause
The
structured_output()method calls_format_request()which correctly spreadsself.config["params"]into the request dict. However,structured_output()only extractsmodelandinputfrom the result — all other params from the request are silently dropped when callingclient.responses.parse().Reproduction
Expected Behavior
All params from the config should be passed through to
client.responses.parse(), excluding keys that are already individually handled or inappropriate (model,input,stream,tools,instructions).Actual Behavior
Only
model,input, andtext_formatare passed toresponses.parse(). All other config params are silently ignored.