Repository navigation
fix: preserve streamed tool calls with reasoning content - #830
Merged
altic-dev merged 1 commit intoAug 11, 2026
Merged
Conversation
Greptile SummaryThis PR fixes chat-completions streaming so handling reasoning or content no longer skips sibling tool-call deltas.
|
Owner
|
merging without checking trusting you! hope this fixes the issue that's attached!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some chat-completions providers stream reasoning content, an empty content string, and tool calls in the same delta. The parser advanced to the next SSE event after handling content, so the sibling tool call was dropped. This keeps the reasoning/content paths mutually exclusive while still parsing tool calls from the same delta.
Type of Change
Related Issue or Discussion
Fixes #445.
Testing
swiftlint --strict --config .swiftlint.yml Sourcesswiftformat --config .swiftformat Sources(SwiftFormat is not installed locally)xcodebuild test -project Fluid.xcodeproj -scheme Fluid -destination 'platform=macOS,arch=arm64' -only-testing:FluidDictationIntegrationTests/LLMClientStreamingTests CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NOThe two focused regression tests pass. Reintroducing the skipped-event behavior makes the same-delta tool-call test fail, and restoring this patch makes both tests pass again.
Screenshots / Video
Notes
This intentionally addresses the streamed tool-call loss without changing provider-specific reasoning settings.