Skip to content

spec(072): multimodal MCP ContentBlock passthrough to vision-capable LLM providers - #6228

Merged
bug-ops merged 1 commit into
mainfrom
feat/issue-5366/multimodal-mcp-passthrough
Jul 13, 2026
Merged

spec(072): multimodal MCP ContentBlock passthrough to vision-capable LLM providers#6228
bug-ops merged 1 commit into
mainfrom
feat/issue-5366/multimodal-mcp-passthrough

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Design-only specification (no implementation code) for issue #5366: true multimodal passthrough of MCP ContentBlock::Image content 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

  • Opt-in per MCP server, default OFF.
  • MediaSanitizer (new): magic-byte sniff, format allowlist, size/dimension/pixel caps via the image crate on spawn_blocking (decompression-bomb defense).
  • ToolOutput.media / ToolResultClassification.media: single zeph_llm::ImageData end-to-end, one new zeph-tools -> zeph-llm dependency edge, no mirrored type.
  • Sibling MessagePart::Image parts emitted in process_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.
  • Ephemeral-only lifetime: Image parts stripped before all three persistence surfaces (SQLite parts_json, Qdrant embeddings, durable JSONL replay log) at a single strip point above the dual-write fan-out.
  • Redacted Debug on ImageData (also closes a pre-existing leak on the user-upload path).
  • Audio/blob passthrough explicitly deferred — adding a MessagePart variant 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

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/XL Extra large PR (500+ lines) labels Jul 13, 2026
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
bug-ops enabled auto-merge (squash) July 13, 2026 17:18
@bug-ops
bug-ops force-pushed the feat/issue-5366/multimodal-mcp-passthrough branch from 418e0b3 to cdccc90 Compare July 13, 2026 17:18
@bug-ops
bug-ops merged commit 964cc10 into main Jul 13, 2026
23 checks passed
@bug-ops
bug-ops deleted the feat/issue-5366/multimodal-mcp-passthrough branch July 13, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

research: multimodal MCP ContentBlock passthrough to vision-capable LLM providers

1 participant