Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/short-wolves-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@openai/agents-openai': patch
'@openai/agents-core': patch
---

fix: #473 upgrade openai package to the latest and fix breaking errors
2 changes: 1 addition & 1 deletion packages/agents-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@modelcontextprotocol/sdk": "^1.17.2"
},
"dependencies": {
"openai": "^5.16.0",
"openai": "^5.20.2",
"debug": "^4.4.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/agents-core/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const METADATA = {
"version": "0.1.2",
"versions": {
"@openai/agents-core": "0.1.2",
"openai": "^5.16.0"
"openai": "^5.20.2"
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/agents-openai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@openai/agents-core": "workspace:*",
"debug": "^4.4.0",
"openai": "^5.16.0"
"openai": "^5.20.2"
},
"scripts": {
"prebuild": "tsx ../../scripts/embedMeta.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/agents-openai/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const METADATA = {
"versions": {
"@openai/agents-openai": "0.1.2",
"@openai/agents-core": "workspace:*",
"openai": "^5.16.0"
"openai": "^5.20.2"
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/agents-openai/src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export type WebSearchTool = {
/**
* Optional location for the search. Lets you customize results to be relevant to a location.
*/
userLocation?: OpenAI.Responses.Tool.WebSearchTool.UserLocation;
userLocation?: OpenAI.Responses.WebSearchTool.UserLocation;

/**
* Optional filters for the search.
Expand Down
5 changes: 1 addition & 4 deletions packages/agents-openai/src/types/providerData.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import OpenAI from 'openai';

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

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 openai@5.20 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 👍 / 👎.

Expand Down
2 changes: 1 addition & 1 deletion packages/agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@openai/agents-openai": "workspace:*",
"@openai/agents-realtime": "workspace:*",
"debug": "^4.4.0",
"openai": "^5.16.0"
"openai": "^5.20.2"
},
"keywords": [
"openai",
Expand Down
2 changes: 1 addition & 1 deletion packages/agents/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const METADATA = {
"@openai/agents-core": "workspace:*",
"@openai/agents-openai": "workspace:*",
"@openai/agents-realtime": "workspace:*",
"openai": "^5.16.0"
"openai": "^5.20.2"
}
};

Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.