Skip to content

feat(harness): tell text-only models when read omits an image - #102

Merged
sanchitrk merged 3 commits into
canaryfrom
claude/linear-cod-184-ca812a
Oct 26, 2026
Merged

sanchitrk merged 3 commits into
canaryfrom
claude/linear-cod-184-ca812a

Conversation

@sanchitrk

@sanchitrk sanchitrk commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • ToolCallContext gets an optional modelInput field: the input modalities (["text"], ["text", "image"]) of the model the call answers. The loop fills it from the resolved model. It is optional, so existing plugins are unaffected, and tool hooks receive it too.
  • read adds [Current model does not support images. The image will be omitted from this request.] to its note when the model has no image input. This covers both a processed image and one that failed to process. With no model known, nothing is added.
  • aikit already swaps image bytes for (tool image omitted: model does not support images) on text-only models. This adds the tool-side note, so the model knows why the image is missing.

Test

packages/harness/test/tools.read.vision.test.ts runs the full harness with a scripted model and two custom models declared in settings. It reads red-circle.png on a text-only model, then switches to a vision model and asks again. __artifacts__/tools.read.vision.json records what each request carries:

  • Text-only turn: the note and the placeholder.
  • After the switch: the same history with the real image/png.

Checks

  • vp run typecheck and vp lint pass.
  • All harness tests pass (532).
  • vp check reports formatting only on the vendored skill markdown files and .claude/launch.json. Those files are unchanged from the base and untouched by this PR.

Tool calls now carry the input modalities of the model they answer
(`ToolCallContext.modelInput`). On a model without image input, `read`
adds a note that the image will be omitted, next to the placeholder the
transform puts in its place. A session test reads an image on a
text-only model, switches to a vision model and snapshots both requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sanchitrk and others added 2 commits October 26, 2026 17:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanchitrk
sanchitrk merged commit 60e0d9f into canary Oct 26, 2026
2 checks passed
@sanchitrk
sanchitrk deleted the claude/linear-cod-184-ca812a branch October 26, 2026 13:04
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