-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 calling the openai.responses.create
using the web_search
tool call with the background flag set to true
, the response did not contain sources from the web_search
object.
Expected:
{
"id": "ws_xxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "the_query",
"sources": [
{
"type": "url",
"url": "https://wordpress.org/plugins/gopublish-publish-from-google-docs-to-any-site/"
},
{
"type": "url",
"url": "https://wordpress.com/plugins/muzaara-google-content-api-data-feed"
},
{
"type": "url",
"url": "https://wordpress.org/plugins/docswrite/"
},
{
"type": "url",
"url": "https://wordpress.org/plugins/sheetlink/"
},
{
"type": "url",
"url": "https://wordpress.org/plugins/create-post-by-google-document/"
},
{
"type": "url",
"url": "https://www.dochub.com/en/integrations/crm-system/try-marketmuses-integration-with-dochub-to-save-time-and-effort"
}
]
}
}
Got:
{
"id": "ws_xxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "the_query"
}
To Reproduce
- call the
openai.responses.create()
with web_search tool andbackground: true
configured - use the
openai.responses.retrieve(responseId, { include: ["web_search_call.action.sources"], })
to get the response
Code snippets
const response = await openai.responses.create({
model: "gpt-5-mini",
input: [
{
role: "developer",
content: "",
},
{
role: "user",
content:
"Which content optimization APIs plug into popular CMSs, document editors, and site builders for local SEO workflows?",
},
],
text: {
format: {
type: "text",
},
verbosity: "low",
},
reasoning: {
effort: "low",
summary: "auto",
},
tools: [
{
type: "web_search",
filters: null,
search_context_size: "low",
user_location: {
type: "approximate",
city: null,
country: null,
region: null,
timezone: null,
},
},
],
store: true,
background: false,
include: ["web_search_call.action.sources"],
});
OS
macOS
Node version
Node v22
Library version
openai v6.2.0
anisayari
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working