Skip to content

Commit 2622a06

Browse files
authored
GPT-5: Remove params unsupported with reasoning models
1 parent 0c9051a commit 2622a06

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

litellm/llms/openai/chat/gpt_5_transformation.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,18 @@ def get_supported_openai_params(self, model: str) -> list:
2828
base_gpt_series_params.extend(gpt_5_only_params)
2929
if not supports_tool_choice(model=model):
3030
base_gpt_series_params.remove("tool_choice")
31-
return base_gpt_series_params
31+
32+
non_supported_params = [
33+
"logprobs",
34+
"top_p",
35+
"presence_penalty",
36+
"frequency_penalty",
37+
"top_logprobs",
38+
]
39+
40+
return [
41+
param for param in base_gpt_series_params if param not in non_supported_params
42+
]
3243

3344
def map_openai_params(
3445
self,

0 commit comments

Comments
 (0)