Skip to content

RFC-0061: Information-Preserving Degradation for ModalityFilter (design discussion) - #377

Open
Million-mo wants to merge 1 commit into
wolf1069b:mainfrom
Million-mo:docs/rfc-0061-modality-filter-information-preserving-degradation
Open

RFC-0061: Information-Preserving Degradation for ModalityFilter (design discussion)#377
Million-mo wants to merge 1 commit into
wolf1069b:mainfrom
Million-mo:docs/rfc-0061-modality-filter-information-preserving-degradation

Conversation

@Million-mo

Copy link
Copy Markdown
Collaborator

Summary

RFC design discussion PR (no code change). Proposes fixing a defect in ModalityFilterCapability's describe strategy: when the active model does not support a modality, the capability degrades an image to a bare MIME placeholder ([image/png]), which:

  1. Destroys retrievability — no filename, no location, no identifier.
  2. Blocks delegation — a text-only model cannot hand the image to a vision-capable subagent or file tool.
  3. Is misleading / hallucination-prone — reads like descriptive content that is actually absent.
  4. Fails silently — the user's intent (analyze this image) is lost without signal.

Motivation (real deployment)

Encountered while debugging a text-only model (glm52 / kimi-k2) failing on pasted images through the opencode server — the same downstream scenario as opencode issue #42758.

What this RFC does

Surveys 4 options with an evaluation matrix:

Option Description Retrievability Total
1. Status quo bare [image/png] placeholder 1/5 17/30
2. Metadata placeholder honest, hallucination-resistant text (no persistence) 2/5 24/30
3. Persist + reference session-scoped bytes + retrievable reference 5/5 24/30
4. Hybrid (recommended) metadata now + opt-in reference strategy 4/5 26/30

Recommends Option 4: upgrade describe() to honest metadata immediately (cheap, in-core), add an opt-in reference strategy for manifests that declare a vision-capable subagent/tool consumer.

Grounding: opencode ecosystem (HEAD 040b856)

  • Bare placeholders were rejected in PR #29279 on hallucination risk ("invites the LLM to invent details").
  • Bare placeholder is reported as a defect in #42758 ("agent has no way to access the actual image content").
  • Community consensus (#29216): "don't destroy the image reference in the first place".
  • Auto model-switching is explicitly NOT_PLANNED (#32601); persistence attempts (PR #32680 etc.) remain open/unmerged.

Discussion ask

  1. Is the bare placeholder a genuine defect, or intended lossy behavior?
  2. Should AgentPool ship a storage-backed reference strategy (differentiating from opencode's unresolved PRs)?
  3. If persistence, where do bytes live (session storage / SQLite / fs scratch)?

Files

  • docs/rfcs/draft/RFC-0061-modality-filter-information-preserving-degradation.md (new, 445 lines)

…ty filter

* docs(rfc): design discussion for modality_filter degradation

Proposes replacing the bare MIME placeholder ([image/png]) that
ModalityFilterCapability emits when degrading unsupported multimodal
content with an information-preserving placeholder carrying retrievable
metadata (filename/mime/source), and optionally a session-scoped
persisted reference so a text-only model can delegate the image to a
vision-capable subagent or file tool.

The problem is grounded in opencode ecosystem findings (HEAD 040b856):
bare placeholders were rejected in PR #29279 on hallucination risk, are
reported as a defect in issue #42758 (no way to access actual content),
and the community consensus (#29216) is to preserve the reference rather
than destroy it. Auto model-switching is deliberately out of scope
(NOT_PLANNED upstream).

Surveys 4 options (status quo / metadata-only / persist+reference /
hybrid) with an evaluation matrix and recommends the hybrid: upgrade
describe() to honest metadata now, add an opt-in reference strategy
for manifests that declare vision-capable consumers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant