Skip to content

Conversation

@seratch
Copy link
Member

@seratch seratch commented Sep 15, 2025

This pull request resolves #473

@seratch seratch added package:agents-core package:agents-openai dependencies Pull requests that update a dependency file labels Sep 15, 2025
@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2025

🦋 Changeset detected

Latest commit: 1025148

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@openai/agents-openai Patch
@openai/agents-core Patch
@openai/agents Patch
@openai/agents-realtime Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +3 to 6
export type WebSearchTool = Omit<OpenAI.Responses.WebSearchTool, 'type'> & {
type: 'web_search';
name: 'web_search' | 'web_search_preview' | string;
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Restore correct WebSearch tool type

The WebSearchTool alias now points at OpenAI.Responses.WebSearchTool, but in [email protected] that interface represents the preview tool (type: 'web_search_preview') and no longer declares properties like filters while requiring a user_location.type. Our implementation still builds the 'web_search' payload with filters and optional location, so this change produces TypeScript errors (extra property filters, missing user_location.type) and models the wrong API. The nested OpenAI.Responses.Tool.WebSearchTool still matches the real web search tool; switch the alias (and the corresponding UserLocation usage in tools.ts) back to that type.

Useful? React with 👍 / 👎.

@rm-openai rm-openai merged commit 74dd52e into main Sep 15, 2025
5 checks passed
@rm-openai rm-openai deleted the openai-breaking-change branch September 15, 2025 14:54
anshagrawal-plivo pushed a commit to anshagrawal-plivo/openai-agents-js that referenced this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file package:agents-core package:agents-openai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS build error with [email protected]

3 participants