Skip to content

Verify the model named for images on a custom service — today every model it lists is offered as image-capable, and a text-only pick is only discovered midway through an answer #249

Open

Description

@bencode

Problem

On a service added as "Another OpenAI-compatible service", every model the endpoint lists is declared an image-reader the moment it is listed: discovery maps each id to input: ['text', 'image'] (ui-packages/web/src/features/settings/model-providers/index.tsx:125), and the runtime keeps the claim (ui-packages/web/src/core/models/byok/runtime.ts:42-56 — "Nothing states what a reader's own endpoint can read, so images stay on the table"). The "Model for images" select then offers every chosen model with equal standing (index.tsx:281-293), so a reader running a local, text-only stack can name one as the image model in good faith.

The cost lands far from the choice. An image attachment travels as metadata with recommendedTool: 'analyze_image' (ui-packages/web/src/core/reader-message.ts:22); the analyze tool sends the picture to the named model (ui-packages/web/src/features/assistant/vision.ts:24-41), and a text-only model's refusal surfaces as "The vision model could not analyze the image." (vision.ts:39-40) — naming neither the model nor the setting that chose it. The one guard the codebase has for exactly this, "The configured vision model cannot read images" (ui-packages/web/src/core/models/model-runtime.ts:48-52), never fires, because the fabricated declaration says the model reads images.

The product already states the right principle for keys: "a reader should learn a key is wrong while typing it, not midway through an answer" (ui-packages/web/src/features/settings/model-providers/discover.ts:39-43). The image-reading claim is the same class of fact, and it is never checked — not at configuration, and not in the failure the reader finally meets.

Proposal

  • When a Model for images is named on a custom service, verify it once with a minimal image completion on the reader's own key — a Test control beside the select, or the check folded into Save — reported in the dialog's existing failure vocabulary: accepted, or "That model did not accept an image."
  • At use time, name the culprit: the analyzer's failure says which model was asked and where it was named — "The model named for images, llama3, could not analyze this image" — instead of the anonymous sentence today.

Goal

After this, a custom service's image-reading claim is either verified where it is made or reported as unverified, and a reader whose image question fails learns which model and which setting to fix, without re-sending into the same failure.

Verification

grep -rn "did not accept" ui-packages/web/src/features/settings
pnpm --filter @gamma-reader/web test src/features/settings src/features/assistant
pnpm check

Refs

Activity

  1. added
    enhancement
    source:scheduled
    on Oct 26, 2026
  2. bencode commented on Oct 27, 2026

    @bencode
    OwnerAuthor

    Independent review — posted by the scheduled issue-reviewer loop, independent of the authoring session, against main@e8c930f.

    Evidence audit: every citation confirmed on main.

    • ✅ model-providers/index.tsx:122-125 — discovery maps every listed id to input: ['text', 'image']; ✅ byok/runtime.ts:42-56 — customModel hardcodes the same claim, comment verbatim; ✅ index.tsx:281-293 — the "Model for images" select offers every model with equal standing; ✅ model-runtime.ts:48-52 — the guard exists but is defused: for a custom model model.input.includes('image') is always true; ✅ vision.ts:36-40 — both failure sentences are anonymous ("The vision model could not analyze the image." / "returned no image analysis."), naming neither model nor setting; ✅ reader-message.ts:22, ✅ discover.ts:39-43 — principle quoted verbatim.

    Duplicate check: none — #237 is the no-vision-model face (attach-time notice), this is the named-but-unverified face; #228 is the vendor-error-language sibling. Both correctly cited and open.

    Sensor + Verification block repaired (logged per policy): lint ✓, but the block was suite-only and verify passed vacuously on green main while the feature is absent. Added the gate grep -rn "did not accept" ui-packages/web/src/features/settings — the proposal's own mandated failure sentence ("That model did not accept an image."), zero hits on main today. Re-linted ✓; verify now ✗ on main as it should.

    Verdict: valid, keep open. Three sharpenings:

    1. Bullet 2 stands alone — sequence it first: naming the model in the analyzer's failure (vision.ts:36-40) needs no probe and helps every mis-declared model today; the config-time Test control can follow.
    2. A probe result the runtime ignores changes nothing: the guard at model-runtime.ts:50 and Say at attach time when a model cannot read images — today an own-key conversation without a vision model takes photos and scanned pages it can only answer blind #237's attach-time logic both consult model.input — which customModel fabricates. The verification state must feed the model's input claim (or a per-model verified flag), or the check decorates the dialog while the defused guard stays defused.
    3. Reuse the key-check's vocabulary: discovery already reports key outcomes through the dialog's phase machine (setPhase({ step: 'failed', reason }), index.tsx:121-124); the image probe should speak the same accepted/failed grammar so both checks read as one principle.
  3. bencode commented on Nov 1, 2026

    @bencode
    OwnerAuthor

    Re-audit — posted by the scheduled issue-reviewer loop, independent of the authoring session. Against main@d05b6b6 (15 commits since the last review at e8c930f; none touches a cited file — anchors hold exactly: index.tsx:125, byok/runtime.ts:51, the anonymous failure at vision.ts:40).

    Sensor: lint ✓; verify ✗ as it should (grep "did not accept" features/settings red).

    Duplicate check: clean — #285 is the custom-endpoint context-window face, a different failure mode.

    Material change since the review: #237 — cited in Refs as the open sibling face — was closed not planned (2026-10-27 08:47 UTC, eight hours after this review), the maintainer's reason: "which model an own-key conversation uses is the reader's own setup choice. A model without vision is a deliberate pick, and a warning at attach time would add UI for a case the reader chose."

    That rejection's premise is precisely what this issue denies for custom services: the pick is only "deliberate" where the reader could know. Discovery fabricates input: ['text', 'image'] for every listed model (index.tsx:125, runtime.ts:51), so a reader naming a text-only local model for images was told it reads them by the app itself — and that same fabrication defuses the app's own guard (model-runtime.ts:48-52). The distinguishable core is not "warn about the reader's choice" (#237, rejected) but "stop the app's own false claim." On that reading:

    Verdict: valid, keep open — the fabricated-declaration premise is confirmed against main and is not covered by #237's rejection — but the maintainer should confirm the boundary: is the custom-service image claim the app's to make honestly, or the reader's to discover at failure? Prior sharpenings stand (verified state must feed model.input or the guard stays defused; reuse the key-check's accepted/failed grammar).

  4. bencode commented on Nov 9, 2026

    @bencode
    OwnerAuthor

    Re-audit (third pass) — posted by the scheduled issue-reviewer loop, independent of the authoring session. At main@d05b6b6 — HEAD unchanged since the 2026-11-01 re-audit (no commits since 2026-10-28); anchors re-opened with fresh eyes, duplicates refreshed, sensor re-run.

    Evidence audit: every anchor re-confirmed, with two short-form citations resolved to full paths.

    • ✅ features/settings/model-providers/index.tsx:125 — discovery still fabricates input: ['text', 'image'] for every model the endpoint lists.
    • ✅ core/models/byok/runtime.ts:51 — customModel hardcodes the same claim (prior reviews' short form byok/runtime.ts:51).
    • ✅ core/models/model-runtime.ts:49-50 — the vision guard still consults model.input.includes('image'), which the fabrication always satisfies: defused, as claimed.
    • ✅ features/assistant/vision.ts:40 — "The vision model could not analyze the image." anonymous; one precision note: the second anonymous sentence, "returned no image analysis.", sits at :45, just outside the cited :36-40 band.
    • ✅ "Model for images" select index.tsx:281-293; core/reader-message.ts:22 (analyze_image routing); the discover principle verbatim at features/settings/model-providers/discover.ts:39-43.

    Boundary question from the 11-01 re-audit: still unanswered. #237 remains closed not planned with its "the reader's own deliberate pick" rationale, and no maintainer signal anywhere since. The distinguishable core stands unchanged on main: the app itself declares every custom-listed model image-capable (index.tsx:125) and thereby defuses its own guard — the fabricated declaration is the app's claim to make honestly, whatever #237 says about reader-chosen pi models.

    Duplicate check (refreshed): clean — #295 (preset-key served-list intersection) and #285 (custom-endpoint context window) remain different failure modes; nothing filed since 11-01 overlaps.

    Sensor: lint ✓; verify ✗ on unfixed main as it should (the "did not accept" failure-sentence gate stays red).

    Verdict: valid, stays open. Prior sharpenings stand: the verified state must feed model.input (or a per-model verified flag) or the guard stays defused, and any probe result should reuse the key-check's accepted/failed grammar. Minimal-form fallback from the last review — mark unknown custom models unverified instead of adding probe UI — remains the least #237-adjacent path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsource:scheduled

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions