Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[openai] Remove incorrect tool call id from tool call delta#2210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

naveen-corpusant
Copy link
Contributor

For OpenAI responses API, theresponse.function_call_arguments.delta returns anitem_id(docs) . This item_id is actually theid of the tool_call, rather than thetool_call_id.

The problem is that when using agent_stream or more generally the parts_manager, these deltas are accumulated and thetool_call_id for the ToolCallNode ends up being set to the incorrectid. This is particularly problematic because theid is a longer string than is supported by some gpt models (for example, an id isfc_6876aca7db8c8192af95414c6cf92796035a7a219e794395, whereas the tool call id for the same request iscall_YHzL9zYTlauY9bw9dEoE4uA4.

gpt-4o-mini only allows tool call ids that are 40 characters or less, so using the longer id breaks things (and is incorrect from a tool call id perspective).

@Kludex
Copy link
Member

Do you have a snippet I can reproduce so we can add a test here?

@KludexKludex self-assigned thisJul 16, 2025
@DouweMDouweM assignedDouweM and unassignedKludexJul 16, 2025
@DouweMDouweM merged commit64b64a5 intopydantic:mainJul 16, 2025
18 checks passed
@DouweM
Copy link
Contributor

@naveen-corpusant Thank you!

naveen-corpusant reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@DouweMDouweMDouweM left review comments

@ibash-corpusantibash-corpusantibash-corpusant approved these changes

Assignees

@DouweMDouweM

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@naveen-corpusant@Kludex@DouweM@ibash-corpusant

[8]ページ先頭

©2009-2025 Movatter.jp