Skip to main content

Module vision

Module vision 

Source
Expand description

Sight: what the harness does with a picture on a turn (#346).

Three modes, and each one is a promise about which model sees the bytes:

  • VisionMode::Native — the turn’s own model, and nothing else. A model that cannot see means the attach is refused before the turn starts, with a sentence naming the model. Sending it and letting the backend answer 400 is the same information later and worse.
  • VisionMode::Text — the turn’s model never sees a picture. The picture goes to the describe route, its answer enters the turn as text, and the turn model is told it is reading a description rather than looking at something.
  • VisionMode::Auto — native when the turn model declares vision, the describe route otherwise.

The one thing auto cannot do is notice a backend that accepts an image and quietly ignores it. It reacts to a declared capability and to an outright refusal (a 400 or 422 naming the part), and to nothing else; a model that says “I see no image”, or invents one, is indistinguishable from a model that looked. That limitation is in docs/USER.md in one sentence because the failure mode is a confident wrong answer.

The decision itself (Choice::plan) is pure: the caller resolves the two facts a config cannot know — the turn provider’s own capability, and the describe route’s manifest — and the sentences live here so the CLI and the dashboard cannot describe the same refusal differently.

Structs§

Choice
The facts a planner needs, all of which a surface can answer without asking a model anything.
Describe
The route that describes pictures, as the planner needs to know it.

Enums§

Plan
What the harness will do with this turn’s pictures.

Functions§

asked_text
The person’s own words in a message, without the marker lines the composer adds for pictures.
cloud
The privacy gate. It is a refusal and not a warning because the thing it protects is a screenshot, and “it went to an API once” cannot be undone by reading a log.
describe_request
The request sent to the describe route: what the reader asked, plus the pictures.
describe_text
What is stored, and shown to the turn’s model, from a describe route’s answer.
described_block
What the turn’s model reads in place of a picture, and the reason it is spelled this way: a model told nothing will answer “I can see…” about something it never looked at.
is_local_url
Whether a URL points at this machine or the LAN, judged by the host alone.
no_native
native with a model that cannot see. Names the model and both ways out, because the reader is mid-task and the fix is one of two keystrokes.
refuses_images
Whether a failure is a backend refusing the image part — the one signal auto can react to.
route_sees
Whether this connection claims it can see a picture.