Skip to content

An item with type 'web_search_call' received as ResponseOutputMessage #2448

Closed
@Shulyaka

Description

@Shulyaka

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

I am using the web search tool with o4-mini model and streaming. When it started searching the web, I received the following event:

ResponseOutputItemAddedEvent(
    item=ResponseOutputMessage(
        id='ws_686cdee20f548198a67dbdf8d44541fe02350ff60608d7b6',
        content=None,
        role=None,
        status='in_progress',
        type='web_search_call'
    ),
    output_index=1,
    sequence_number=4,
    type='response.output_item.added'
)

It looks like the item type (ResponseOutputMessage) was identified incorrectly, should have been ResponseFunctionWebSearch.

Interestingly, the following ResponseOutputItemDoneEvent had the correct item.

To Reproduce

  1. Perform a web search using streaming and o4-mini

Code snippets

OS

Fedora 42

Python version

Python 3.13.3

Library version

openai v1.93.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions