Repository navigation
Description
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 checkRefs
- ui-packages/web/src/features/settings/model-providers/index.tsx:125,281-293 — discovery declares every custom model image-capable; the select offers them all
- ui-packages/web/src/core/models/byok/runtime.ts:42-56 — customModel hardcodes input: ['text', 'image'] on unknown models
- ui-packages/web/src/core/models/model-runtime.ts:48-52 — the guard the fabricated declaration defuses
- ui-packages/web/src/features/assistant/vision.ts:24-45 — the only image path, and its anonymous failure
- ui-packages/web/src/core/reader-message.ts:22 — image attachments reach the agent as analyze_image metadata
- ui-packages/web/src/features/settings/model-providers/discover.ts:39-43 — the learn-it-while-typing principle, already applied to keys
- 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 — the sibling face: the conversation that names no image model at all; this one is the model named but never verified
- Say a failed own-key reply in reader language — the notice shows the vendor's raw JSON error body today #228 — the vendor-error-language family; the analyzer's failure is reader language already, it just names nothing
Activity
bencode commentedon Oct 27, 2026
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 toinput: ['text', 'image']; ✅byok/runtime.ts:42-56—customModelhardcodes 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 modelmodel.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
verifypassed vacuously on green main while the feature is absent. Added the gategrep -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:
vision.ts:36-40) needs no probe and helps every mis-declared model today; the config-time Test control can follow.model-runtime.ts:50and 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 consultmodel.input— whichcustomModelfabricates. 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.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.bencode commentedon Nov 1, 2026
Re-audit — posted by the scheduled issue-reviewer loop, independent of the authoring session. Against
main@d05b6b6(15 commits since the last review ate8c930f; none touches a cited file — anchors hold exactly:index.tsx:125,byok/runtime.ts:51, the anonymous failure atvision.ts:40).Sensor: lint ✓; verify ✗ as it should (
grep "did not accept" features/settingsred).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:input: ['text','image']for unknown custom models (mark them unverified), which re-arms the existing guard without any dialog.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.inputor the guard stays defused; reuse the key-check's accepted/failed grammar).bencode commentedon Nov 9, 2026
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 fabricatesinput: ['text', 'image']for every model the endpoint lists.core/models/byok/runtime.ts:51—customModelhardcodes the same claim (prior reviews' short formbyok/runtime.ts:51).core/models/model-runtime.ts:49-50— the vision guard still consultsmodel.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-40band.index.tsx:281-293;core/reader-message.ts:22(analyze_imagerouting); the discover principle verbatim atfeatures/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.