Skip to content

fix(model): append streamed tool argument string deltas - #668

Merged
mohitranka merged 1 commit into
mainfrom
fix/streamed-tool-argument-deltas
Sep 13, 2026
Merged

mohitranka merged 1 commit into
mainfrom
fix/streamed-tool-argument-deltas

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Root cause: Chat Completions string fragments that parse as standalone JSON objects (e.g. nested {}) were treated as full argument snapshots and replaced previously accumulated text. {"parameters": + {} + } became {}}, failing finalize with trailing characters at line 1 column 3 and failing the turn.

Change: string deltas are now always appended; already-parsed object/array snapshots still replace. Adds regression covering nested objects, arrays, literal braces inside strings, empty fragments, and emitted argument deltas.

Verified: forge-model OpenAI transport tests 16/16, fmt check, workspace clippy.

@mohitranka
mohitranka merged commit b92c1cc into main Sep 13, 2026
3 checks passed
@mohitranka
mohitranka deleted the fix/streamed-tool-argument-deltas branch September 13, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant