Skip to content

Types do not acknowledge web search's external_web_access option #1716

@redbmk

Description

@redbmk

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 Responses API with the web_search tool, TypeScript flags external_web_access: false as an invalid option. It does indeed work, however (e.g. try a query like "What is NVDA's latest stock price?" - it will give you the latest without that option but with it, will say it doesn't have that information).

As far as I can tell, there's no option like this that works for the chat completions API using the specialized search models. I was thinking setting web_search_options.external_web_access to false would work but the API throws an error in that case.

To Reproduce

install typescript and the latest openai sdk, e.g.: bun add typescript openai

create a typescript file, e.g. index.ts:

import { OpenAI } from "openai";

new OpenAI().responses.create({
  input: "What is NVDA's latest stock price?",
  tools: [{ type: "web_search", external_web_access: false }],
  // tsc flags this ------------^
})

run bunx tsc --noEmit

Code snippets

OS

macOS

Node version

v22.19.0, bun v1.3.2

Library version

openai v6.9.1

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