Skip to content

Commit deb478a

Browse files
authored
Fix openai_chatcompletions.py typecheck error
1 parent 2b5609b commit deb478a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/agents/models/openai_chatcompletions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@ async def _fetch_response(
521521
# Match the behavior of Responses where store is True when not given
522522
store = model_settings.store if model_settings.store is not None else True
523523

524+
reasoning_effort = model_settings.reasoning.effort if model_settings.reasoning else None
525+
524526
ret = await self._get_client().chat.completions.create(
525527
model=self.model,
526528
messages=converted_messages,
@@ -536,7 +538,7 @@ async def _fetch_response(
536538
stream=stream,
537539
stream_options={"include_usage": True} if stream else NOT_GIVEN,
538540
store=store,
539-
reasoning=self._non_null_or_not_given(model_settings.reasoning),
541+
reasoning_effort=self._non_null_or_not_given(reasoning_effort),
540542
extra_headers=_HEADERS,
541543
)
542544

0 commit comments

Comments
 (0)