Skip to content

Conversation

@yangtuooc
Copy link
Contributor

@yangtuooc yangtuooc commented Mar 29, 2025

Empty tool call id and name strings causing improper ToolCall merging during OpenAI stream
processing, resulting in incorrect function calling responses. This fix ensures both null
and empty strings are properly validated before merging operations.

Fixes #2417 (#2417)
Fixes #2423 (#2423)

@DannySortino
Copy link

I shaded this change in to test since I have similar issue. We should also look to fix for toolname being blank - line 147 specifically. When i did same has text check, it made the merge work even when name was not present. Possibly worth adding that into this fix as well.

@yangtuooc yangtuooc changed the title fix(openai): prevent incorrect ToolCall merging caused by empty id strings fix(openai): prevent incorrect ToolCall merging caused by empty id and name strings Mar 30, 2025
@yangtuooc yangtuooc force-pushed the GH-2417 branch 2 times, most recently from b833451 to c9e1077 Compare March 30, 2025 08:52
…d name strings

Empty tool call id and name strings causing improper ToolCall merging during OpenAI stream
processing, resulting in incorrect function calling responses. This fix ensures both null
and empty strings are properly validated before merging operations.

Fixes spring-projectsGH-2417 (spring-projects#2417)
Fixes spring-projectsGH-2423 (spring-projects#2423)

Signed-off-by: Wenhao Ma <296232679@qq.com>
@ilayaperumalg
Copy link
Member

@yangtuooc Thanks for fixing the issue. Rebased and merged as e888895

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.

toolName cannot be null or empty in Flux stream toolInput cannot be null or empty

3 participants