Skip to content

feat(py): add interrupt metadata to support Dev UI#5260

Merged
huangjeff5 merged 4 commits into
mainfrom
jh-interrupt-metadata
May 7, 2026
Merged

feat(py): add interrupt metadata to support Dev UI#5260
huangjeff5 merged 4 commits into
mainfrom
jh-interrupt-metadata

Conversation

@huangjeff5
Copy link
Copy Markdown
Contributor

@huangjeff5 huangjeff5 commented May 7, 2026

Screenshot 2026-05-07 at 12 55 42 PM

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 OpenTelemetry tracing for tool interrupts and resumed metadata within the Genkit framework. Key changes include updating the Interrupt class to inherit from GenkitInterrupt and recording metadata to active spans during tool execution. Feedback highlights a potential ImportError regarding the GenkitInterrupt definition and suggests wrapping json.dumps calls in try-except blocks to prevent TypeError exceptions from disrupting tool execution when handling non-serializable metadata.

Comment thread py/packages/genkit/src/genkit/_ai/_tools.py
Comment thread py/packages/genkit/src/genkit/_ai/_tools.py Outdated
Comment thread py/packages/genkit/src/genkit/_ai/_tools.py Outdated
@huangjeff5 huangjeff5 requested a review from ssbushi May 7, 2026 17:56
@huangjeff5 huangjeff5 marked this pull request as ready for review May 7, 2026 18:36
@huangjeff5 huangjeff5 merged commit 7d52c78 into main May 7, 2026
19 checks passed
@huangjeff5 huangjeff5 deleted the jh-interrupt-metadata branch May 7, 2026 20:14
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.

2 participants