-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
Labels
bugSomething isn't workingSomething isn't working