Repository navigation
Python: support ChatKit generated image conversion - #8844
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits intoOct 1, 2026
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the stated behavior and covers both conversion and missing-image handling.
Review effort: Balanced
Findings: None
What changed in this PR
Adds ChatKit generated images to subsequent model context.
Changes:
- Converts completed generated images into multimodal user messages.
- Continues skipping items without images.
- Adds focused conversion and dispatch coverage.
| File | Description |
|---|---|
python/packages/chatkit/agent_framework_chatkit/_converter.py |
Converts generated image URLs into image content. |
python/packages/chatkit/tests/test_converter.py |
Verifies generated-image conversion behavior. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Sep 30, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Sep 30, 2026
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 1, 2026
This branch was successfully deployed
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.
Motivation & Context
agent-framework-chatkitrecognizesGeneratedImageItem, but the converter currently drops it withreturn []. This means generated images in ChatKit thread history are not provided back to the model on later turns.Description & Review Guide
GeneratedImageIteminstances into a userMessagecontaining a short text preface and the generated image URI. Items without an image continue to be skipped. Expose an asyncgenerated_image_to_input()override hook and add coverage for data URI media types, external URLs, missing images, custom output, ordering, failures, and cancellation.openai-chatkitbehavior.Content.from_uri()preserves embedded data URI media types; external URLs retainimage/*. The async hook supports aMessage, a list of messages, orNoneso applications can customize image context.Related Issue
Fixes #8842
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.