Skip to content

Commit 8146849

Browse files
committed
Upgrade underlying openai package to the latest version
1 parent 673c386 commit 8146849

File tree

7 files changed

+38
-35
lines changed

7 files changed

+38
-35
lines changed

examples/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@openai/agents-core": "workspace:*",
88
"@openai/agents-extensions": "workspace:*",
99
"@openai/agents-realtime": "workspace:*",
10-
"openai": "^5.10.1",
10+
"openai": "^5.12.2",
1111
"server-only": "^0.0.1",
1212
"zod": "^3.25.40"
1313
},

packages/agents-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
},
7272
"dependencies": {
7373
"debug": "^4.4.0",
74-
"openai": "^5.10.1"
74+
"openai": "^5.12.2"
7575
},
7676
"peerDependencies": {
7777
"zod": "^3.25.40"

packages/agents-openai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"@openai/agents-core": "workspace:*",
1919
"debug": "^4.4.0",
20-
"openai": "^5.10.1"
20+
"openai": "^5.12.2"
2121
},
2222
"scripts": {
2323
"prebuild": "tsx ../../scripts/embedMeta.ts",

packages/agents-openai/src/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const METADATA = {
77
"versions": {
88
"@openai/agents-openai": "0.0.17",
99
"@openai/agents-core": "workspace:*",
10-
"openai": "^5.10.1"
10+
"openai": "^5.12.2"
1111
}
1212
};
1313

packages/agents-openai/src/openaiChatCompletionsModel.ts

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,27 @@ export class OpenAIChatCompletionsModel implements Model {
149149
});
150150
} else if (message.tool_calls) {
151151
for (const tool_call of message.tool_calls) {
152-
const { id: callId, ...remainingToolCallData } = tool_call;
153-
const {
154-
arguments: args,
155-
name,
156-
...remainingFunctionData
157-
} = tool_call.function;
158-
output.push({
159-
id: response.id,
160-
type: 'function_call',
161-
arguments: args,
162-
name: name,
163-
callId: callId,
164-
status: 'completed',
165-
providerData: {
166-
...remainingToolCallData,
167-
...remainingFunctionData,
168-
},
169-
});
152+
if (tool_call.type === 'function') {
153+
// Note: custom tools are not supported for now
154+
const { id: callId, ...remainingToolCallData } = tool_call;
155+
const {
156+
arguments: args,
157+
name,
158+
...remainingFunctionData
159+
} = tool_call.function;
160+
output.push({
161+
id: response.id,
162+
type: 'function_call',
163+
arguments: args,
164+
name: name,
165+
callId: callId,
166+
status: 'completed',
167+
providerData: {
168+
...remainingToolCallData,
169+
...remainingFunctionData,
170+
},
171+
});
172+
}
170173
}
171174
}
172175
}

packages/agents/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"@openai/agents-core": "workspace:*",
3434
"@openai/agents-openai": "workspace:*",
3535
"@openai/agents-realtime": "workspace:*",
36-
"openai": "^5.10.1",
37-
"debug": "^4.4.0"
36+
"debug": "^4.4.0",
37+
"openai": "^5.12.2"
3838
},
3939
"keywords": [
4040
"openai",

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)