spec(072): multimodal MCP ContentBlock passthrough to vision-capable LLM providers - #6228
Merged
Merged
Conversation
Design-only spec for opt-in multimodal MCP ContentBlock passthrough: decode ContentBlock::Image at the MCP executor, validate through a new MediaSanitizer, carry via ToolOutput.media/ToolResultClassification.media, and emit sibling MessagePart::Image parts gated on vision-capable tier routing. Ephemeral-only lifetime strips Image parts before SQLite, Qdrant, and durable-JSONL persistence. Audio/blob passthrough deferred as an Ask-First MessagePart variant decision. Spec package produced by team-develop spec-driven chain (architect, critic, sdd, reviewer). Follow-up implementation tracked in the linked issue.
bug-ops
enabled auto-merge (squash)
July 13, 2026 17:18
bug-ops
force-pushed
the
feat/issue-5366/multimodal-mcp-passthrough
branch
from
July 13, 2026 17:18
418e0b3 to
cdccc90
Compare
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.
Summary
Design-only specification (no implementation code) for issue #5366: true multimodal passthrough of MCP
ContentBlock::Imagecontent into vision-capable LLM providers, currently rendered only as a[kind: mime, N bytes]text placeholder.Produced via the team-develop spec-driven chain: architect (2 revisions) -> critic (significant -> minor, re-verified twice) -> sdd -> reviewer (approved).
Design
MediaSanitizer(new): magic-byte sniff, format allowlist, size/dimension/pixel caps via theimagecrate onspawn_blocking(decompression-bomb defense).ToolOutput.media/ToolResultClassification.media: singlezeph_llm::ImageDataend-to-end, one newzeph-tools->zeph-llmdependency edge, no mirrored type.MessagePart::Imageparts emitted inprocess_one_tool_result(production path — corrected mid-spec after discovering the originally-cited hook was#[cfg(test)]-gated dead code), gated on vision-capable tier routing; degrades to text placeholder rather than a runtime 400/422 when no vision-capable tier is available.parts_json, Qdrant embeddings, durable JSONL replay log) at a single strip point above the dual-write fan-out.DebugonImageData(also closes a pre-existing leak on the user-upload path).MessagePartvariant is an Ask-First decision per system invariant M3: Persistent memory and Claude provider #4.Acceptance criteria
See
specs/072-multimodal-mcp-passthrough/spec.md§6 (AC-1..15) for the full testable list, including the mandatory live cascade+MCP-image session test per the project's LLM Serialization Gate.Closes #5366