Open
Description
When using reasoning model, if first run is a tool call, then agent loop run into next step, there are some reasoning Items in new_item lists.
which causes Unhandled item type error:
File "site-packages\agents\run.py", line 817, in _run_single_turn_streamed
async for event in model.stream_response(
File "site-packages\agents\models\openai_chatcompletions.py", line 155, in stream_response
response, stream = await self._fetch_response(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "site-packages\agents\models\openai_chatcompletions.py", line 227, in _fetch_response
converted_messages = Converter.items_to_messages(input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "site-packages\agents\models\chatcmpl_converter.py", line 447, in items_to_messages
raise UserError(f"Unhandled item type or structure: {item}")
agents.exceptions.UserError: Unhandled item type or structure: {'id': '__fake_id__', 'summary': [{'text': '', 'type': 'summary_text'}], 'type': 'reasoning'} ```