Repository navigation
FIX: Keep media context descriptions when the modality router forwards media - #3357
Queued
Lanre Shittu (Shizoqua) wants to merge 2 commits into
Queued
Lanre Shittu (Shizoqua) wants to merge 2 commits into
Lanre Shittu (Shizoqua) wants to merge 2 commits into
Conversation
Lanre Shittu (Shizoqua)
force-pushed
the
claude/wizardly-brahmagupta-5obhxm
branch
from
October 19, 2026 22:28
5af8061 to
cf57df9
Compare
Roman Lutz (romanlutz)
approved these changes
Oct 20, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 20, 2026
This branch has not been 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.
Description
Fixes #3346.
_ModalityFeedbackRouter._build_multimodal_messagerebuilt each forwarded media piece from its converted value and data type but leftprompt_metadataempty. A seed or response image that carried acontext_descriptionlost it on the way to the adversarial chat or into the next objective request, soformat_message_piece_for_contextfell back to a bare[Image_path]placeholder.The copy now keeps the media-scoped keys listed in
_FORWARDED_MEDIA_METADATA_KEYS, which is currently justcontext_description. Anything else on the source piece is request or response state and is left behind on purpose. For example, carryingvideo_idforward would switchOpenAIVideoTargetinto remix mode on the next turn. Each copy gets its own metadata dict, so editing it never touches the source piece. IDs and the forwarded converted payload work as before.This only touches
_build_multimodal_message. The pass-through branch offill_adversarial_placeholdersis handled separately in #3302.Tests and Documentation
Added tests in
tests/unit/executor/attack/component/test_modality_router.py:context_description, dropvideo_idandinner_target_identifier, format as[Image_path - A blue square], and get fresh piece and conversation IDs.No docs or notebooks changed, so JupyText was not needed.