Skip to content

Conversation

seratch
Copy link
Member

@seratch seratch commented Aug 30, 2025

The feature request #412 is valid, so we may want to add further information to function tool execution if a developer needs. This changes do not break any existing apps.

@seratch seratch requested a review from dkundel-openai August 30, 2025 01:34
@seratch seratch added enhancement New feature or request package:agents-core labels Aug 30, 2025
Copy link

changeset-bot bot commented Aug 30, 2025

🦋 Changeset detected

Latest commit: c287994

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-realtime Patch
@openai/agents-core Patch
@openai/agents Patch
@openai/agents-openai 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

@seratch seratch force-pushed the issue-412-details-for-function-calls branch from 8bba4b4 to 652e302 Compare August 30, 2025 01:40
Copy link

Codex Review: Here are some suggestions.

invoke: (
runContext: RunContext<Context>,
input: string,
details: { toolCall: protocol.FunctionCallItem },

[P1] Make details parameter optional on FunctionTool.invoke

FunctionTool.invoke and the invoke wrapper returned by tool(...) now require a third details argument. Existing call sites in the repo (tests and agent helper code) still invoke tools with two arguments, so TypeScript compilation will fail and downstream consumers that call tool.invoke(context, input) or implement custom FunctionTool objects will also break. Since the change is intended to provide optional metadata, the parameter should remain optional or defaulted to avoid the breaking API change.


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".

@@ -67,6 +68,7 @@ export type FunctionTool<
invoke: (
runContext: RunContext<Context>,
input: string,
details?: { toolCall: protocol.FunctionCallItem },
Copy link
Member Author

Choose a reason for hiding this comment

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

if we don't want to expose all the tool call data, I can filter this to have only callId

Choose a reason for hiding this comment

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

having FunctionCallItem is actually great 👍

@seratch seratch merged commit b4d315b into main Sep 3, 2025
5 checks passed
@seratch seratch deleted the issue-412-details-for-function-calls branch September 3, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants