test(responses): repair two tests broken by the gpt-5 temperature gate

PR #38593 stopped forwarding temperature to reasoning models, which left
test_extra_body_merges_with_request_data raising UnsupportedParamsError
and test_bad_request_bad_param_error no longer getting a rejection from
OpenAI because drop_params now eats the param. Both repairs are the same
hunks PR #38739 carries, so the branches merge clean in either order
This commit is contained in:
mateo-berri 2026-08-29 01:32:09 -07:00
parent 0b14897a7e
commit 2968c246b9
2 changed files with 3 additions and 2 deletions

View file

@ -1818,6 +1818,7 @@ async def test_extra_body_merges_with_request_data(extra_body_mock_response_data
input="Test",
temperature=0.7,
max_output_tokens=20,
reasoning={"effort": "none"},
extra_body={
"custom_field": "custom_value",
},

View file

@ -115,9 +115,9 @@ def test_bad_request_error():
def test_bad_request_bad_param_error():
client = get_test_client()
with pytest.raises(BadRequestError):
# Trigger error with invalid model name
# needs a non-reasoning model so drop_params keeps temperature for OpenAI to reject
client.responses.create(
model="gpt-5.5", input="This should fail", temperature=2000
model="gpt-4.1-mini", input="This should fail", temperature=2000
)