feat: add streaming support for Claude Code CLI provider#6833
Open
rabi wants to merge 1 commit intoblock:mainfrom
Open
feat: add streaming support for Claude Code CLI provider#6833rabi wants to merge 1 commit intoblock:mainfrom
rabi wants to merge 1 commit intoblock:mainfrom
Conversation
d8be333 to
ad5b039
Compare
Implement stream() method using Claude CLI's --output-format stream-json and --include-partial-messages flags for incremental text output. Parse NDJSON events (content_block_delta, message_start, message_delta, result) to yield text chunks and usage information. Signed-off-by: rabi <ramishra@redhat.com>
Contributor
Author
|
@jamadeo Hey! it's probably the last one in the series of streaming support. PTAL when possible. |
Contributor
Author
|
Hmm. I've to now rewrite the streaming implementation fresh as we moved to persistent child process that stays alive across turns vs spawning a fresh claude CLI process per request in #7029 that merged quickly. |
3 tasks
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.
Summary
Implement stream() method using Claude CLI's --output-format stream-json and --include-partial-messages flags for incremental text output. Parse NDJSON events (content_block_delta, message_start, message_delta, result) to yield text chunks and usage information.
Type of Change
AI Assistance
Testing
Unit tests for parsing steaming events and tested locally.
Closes: #6694