Skip to content

feat(py): Implement reflection server v2#5186

Open
huangjeff5 wants to merge 8 commits intomainfrom
jh-reflection-v2
Open

feat(py): Implement reflection server v2#5186
huangjeff5 wants to merge 8 commits intomainfrom
jh-reflection-v2

Conversation

@huangjeff5
Copy link
Copy Markdown
Contributor

@huangjeff5 huangjeff5 commented Apr 24, 2026

Implemented support for Reflection Server V2.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread py/packages/genkit/src/genkit/_core/_reflection_v2.py Outdated
Comment thread py/packages/genkit/src/genkit/_core/_reflection_v2.py Outdated
Comment thread py/packages/genkit/src/genkit/_core/_reflection_v2.py Outdated
Comment thread py/packages/genkit/src/genkit/_core/_reflection_v2.py Outdated
Comment thread py/packages/genkit/src/genkit/_core/_reflection_v2.py Outdated
@genkit-ai genkit-ai deleted a comment from jeffdh5 Apr 27, 2026
@genkit-ai genkit-ai deleted a comment from jeffdh5 Apr 27, 2026
@huangjeff5 huangjeff5 marked this pull request as ready for review April 27, 2026 20:40
@huangjeff5 huangjeff5 requested a review from pavelgj April 27, 2026 20:42
Comment thread py/packages/genkit/src/genkit/_core/_action.py Outdated
@huangjeff5 huangjeff5 removed the request for review from pavelgj April 27, 2026 20:54
@huangjeff5 huangjeff5 marked this pull request as draft April 27, 2026 20:54
@huangjeff5 huangjeff5 requested a review from pavelgj April 28, 2026 15:20
@huangjeff5 huangjeff5 marked this pull request as ready for review April 28, 2026 15:20
@huangjeff5 huangjeff5 requested a review from apascal07 April 28, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant