@@ -304,11 +304,12 @@ def test_gpt_5_temperature() -> None:
304
304
assert "temperature" not in kwargs
305
305
306
306
simple_2 = raw_config .copy ()
307
- simple_2 ["configuration" ] = {"temperature" : 0.5 }
307
+ simple_2 ["configuration" ] = {"temperature" : 0.5 , "top_p" : 0.5 }
308
308
llm_config = LLMConfig .model_validate (simple_2 )
309
309
kwargs = llm_config .to_load_model_kwargs ()
310
310
assert "temperature" in kwargs
311
311
assert kwargs ["temperature" ] == 1
312
+ assert "top_p" not in kwargs
312
313
313
314
simple_3 = raw_config .copy ()
314
315
simple_3 ["configuration" ] = {"temperature" : 0 }
@@ -323,6 +324,7 @@ def test_gpt_5_temperature() -> None:
323
324
kwargs = llm_config .to_load_model_kwargs ()
324
325
assert "temperature" in kwargs
325
326
assert kwargs ["temperature" ] == 1
327
+ assert "top_p" not in kwargs
326
328
327
329
# test general llm config
328
330
simple_5 = simple_2 .copy ()
@@ -331,3 +333,5 @@ def test_gpt_5_temperature() -> None:
331
333
kwargs = llm_config .to_load_model_kwargs ()
332
334
assert "temperature" in kwargs
333
335
assert kwargs ["temperature" ] == 0.5
336
+ assert "top_p" in kwargs
337
+ assert kwargs ["top_p" ] == 0.5
0 commit comments