Skip to content

Incorrect types for open_page web search action #1677

@nimeshnayaju

Description

@nimeshnayaju

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

When using the web search tool, I've noticed that the open_page action doesn't always return url property although the types suggest they are always present. I couldn't find any official documentation around this schema, so not sure if this is just a schema drift on OpenAI's end.

/**
* Action type "open_page" - Opens a specific URL from search results.
*/
export interface OpenPage {
/**
* The action type.
*/
type: 'open_page';
/**
* The URL opened by the model.
*/
url: string;
}

Here's the chunk I received:

{
  type: 'web_search_call',
  id: 'ws_0c115c5616a6413d0068e6e4b9e428819dbc23e148e7b6a004',
  status: 'completed',
  action: { type: 'open_page' }
}

To Reproduce

  1. Enable web_search tool call
  2. Send a web search query that returns a 'open_page' event.

Code snippets

OS

macOS

Node version

v22.12.0

Library version

v6.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions