Skip to content

Commit fda5c28

Browse files
authored
can set reasoning_effor=None in chat_model_map (microsoft#823)
1 parent 4f2a915 commit fda5c28

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rdagent/oai/backend/litellm.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,11 @@ def _create_chat_completion_inner_function( # type: ignore[no-untyped-def] # no
9191
temperature = float(mc["temperature"])
9292
if "max_tokens" in mc:
9393
max_tokens = int(mc["max_tokens"])
94-
if "reasoning_effort" in mc and mc["reasoning_effort"] in ["low", "medium", "high"]:
95-
reasoning_effort = cast(Literal["low", "medium", "high"], mc["reasoning_effort"])
94+
if "reasoning_effort" in mc:
95+
if mc["reasoning_effort"] in ["low", "medium", "high"]:
96+
reasoning_effort = cast(Literal["low", "medium", "high"], mc["reasoning_effort"])
97+
else:
98+
reasoning_effort = None
9699
break
97100
response = completion(
98101
model=model,

0 commit comments

Comments
 (0)