We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b9368d commit 0c4f2b9Copy full SHA for 0c4f2b9
src/agents/models/chatcmpl_stream_handler.py
@@ -309,12 +309,10 @@ async def handle_stream(
309
yield ResponseContentPartAddedEvent(
310
content_index=state.refusal_content_index_and_output[0],
311
item_id=FAKE_RESPONSES_ID,
312
- output_index=state.reasoning_content_index_and_output
313
- is not None, # fixed 0 -> 0 or 1
314
- part=ResponseOutputText(
315
- text="",
316
- type="output_text",
317
- annotations=[],
+ output_index=(1 if state.reasoning_content_index_and_output else 0),
+ part=ResponseOutputRefusal(
+ refusal="",
+ type="refusal",
318
),
319
type="response.content_part.added",
320
sequence_number=sequence_number.get_and_increment(),
0 commit comments