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
7 changes: 7 additions & 0 deletions .changeset/common-turtles-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@openai/agents-openai': patch
'@openai/agents-core': patch
'@openai/agents': patch
---

Upgrade openai package to the latest version
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@openai/agents-core": "workspace:*",
"@openai/agents-extensions": "workspace:*",
"@openai/agents-realtime": "workspace:*",
"openai": "^5.10.1",
"openai": "^5.12.2",
"server-only": "^0.0.1",
"zod": "^3.25.40"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/agents-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
"dependencies": {
"debug": "^4.4.0",
"openai": "^5.10.1"
"openai": "^5.12.2"
},
"peerDependencies": {
"zod": "^3.25.40"
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.0.17",
"versions": {
"@openai/agents-core": "0.0.17",
"openai": "^5.10.1"
"openai": "^5.12.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.10.1"
"openai": "^5.12.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.0.17",
"@openai/agents-core": "workspace:*",
"openai": "^5.10.1"
"openai": "^5.12.2"
}
};

Expand Down
39 changes: 21 additions & 18 deletions packages/agents-openai/src/openaiChatCompletionsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,24 +149,27 @@ export class OpenAIChatCompletionsModel implements Model {
});
} else if (message.tool_calls) {
for (const tool_call of message.tool_calls) {
const { id: callId, ...remainingToolCallData } = tool_call;
const {
arguments: args,
name,
...remainingFunctionData
} = tool_call.function;
output.push({
id: response.id,
type: 'function_call',
arguments: args,
name: name,
callId: callId,
status: 'completed',
providerData: {
...remainingToolCallData,
...remainingFunctionData,
},
});
if (tool_call.type === 'function') {
Copy link
Member Author

Choose a reason for hiding this comment

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

custom tools are recently introduced, but both Python and TS Agents SDK do not support the pattern for now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the same behavior in the Python one right now? I think we have an unknown type that we could use to return this and potentially stop the loop based on it. That way people could handle it. But if Python doesn't have a similar behavior I'm fine with it for now. Maybe logging it or something would make sense as it seems like a model misbehavior that could really only happen if someone uses prompts

Copy link
Member Author

@seratch seratch Aug 19, 2025

Choose a reason for hiding this comment

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

I made the same change for python and for now we're skipping custom tools. We may support it in the future, but for now this is consistent.

// Note: custom tools are not supported for now
const { id: callId, ...remainingToolCallData } = tool_call;
const {
arguments: args,
name,
...remainingFunctionData
} = tool_call.function;
output.push({
id: response.id,
type: 'function_call',
arguments: args,
name: name,
callId: callId,
status: 'completed',
providerData: {
...remainingToolCallData,
...remainingFunctionData,
},
});
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@openai/agents-core": "workspace:*",
"@openai/agents-openai": "workspace:*",
"@openai/agents-realtime": "workspace:*",
"openai": "^5.10.1",
"debug": "^4.4.0"
"debug": "^4.4.0",
"openai": "^5.12.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.10.1"
"openai": "^5.12.2"
}
};

Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

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