feat(py): Implement reflection server v2#5186
Open
huangjeff5 wants to merge 8 commits intomainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the Reflection API v2, implementing a WebSocket-based JSON-RPC client (ReflectionServerV2) to facilitate communication with the Genkit Dev UI and CLI. Key features include support for listing actions and values, running actions with streaming support, and cancelling active actions. Additionally, the PR updates the action tracing mechanism to support asynchronous on_trace_start callbacks and fixes a registry key initialization bug. Feedback focuses on ensuring full compliance with the JSON-RPC 2.0 specification by correctly handling empty strings as valid request IDs across several handler methods.
huangjeff5
commented
Apr 27, 2026
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.
Implemented support for Reflection Server V2.
list_actionsas a stub because we're waiting for refactored code from feat(py): Add DAP helpers to registry + fix business logic in Registry.list_actions() #5073 to land before we wire that to the RPC method.stream_input_chunkfor now until SessionFlow stuff is ready.ai.flush_tracing()method. Cleaning that up here.