-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(ph-ai): remove stream processing from assistant class #40738
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 10-30-feat_ph-ai_move_stream_processor_outside_temporal
Are you sure you want to change the base?
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Size Change: 0 B Total Size: 3.34 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
36 files reviewed, no comments
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
41ef5dc to
885c396
Compare
96868e7 to
1aedf73
Compare
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |

Problem
To enable reusing the base assistant for Deep Research, we need to move the reducer/stream processor upstream, outside of Temporal, so that DR can call the agent using a ChildWorkflow and reducing the stream in a different way.
This is the third and last PR in a stack with the full change. Won't merge any PR in the stack until all are approved.
This PR has the full functionality and fixes all the tests
This PR refactors the Assistant API to use a more direct event streaming approach, simplifying the architecture by removing the intermediate event type layer, directly yielding
AssistantDispatcherEvent.Closes #12345
Changes
BaseAssistantto yield rawAssistantDispatcherEventobjects directly instead of wrapping them in event type tuplesAssistantGenerationStatusEventand related status event handling as it's not relevant anymoreAssistantSSESerializerto handle the new event structuremax_tools.pyAPI endpoint to use the new message formatHow did you test this code?
AssistantSSESerializerintest_sse.pytest_stream_processor.pyandtest_redis_stream.pyto work with the new event structure