Skip to content

Warn when attached images go to a model without image input - #636

Merged
agegr merged 2 commits into
agegr:mainfrom
wuxiangru915:pr/584-vision-warning
Sep 5, 2026
Merged

agegr merged 2 commits into
agegr:mainfrom
wuxiangru915:pr/584-vision-warning

Conversation

@wuxiangru915

@wuxiangru915 wuxiangru915 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #584

Problem

When the active model does not support image input, attached images are silently dropped. The composer gives no feedback and the model never sees the image.

Change

  • /api/models includes each model's input modalities in modelList.
  • The composer reuses ModelNoticeBanner to show a dismissible warning when attached images target a model known to lack image input, including a server-resolved default before the user explicitly selects a model.
  • Unknown models and unknown modality information stay silent. New sessions no longer infer the effective model from the first entry in the model list when no default has been resolved.
  • Dismissal resets once images are removed.
  • Includes en / zh-CN / zh-TW translations, helper tests, and a component regression test covering text-only defaults, vision defaults, unknown capabilities, and unresolved models.

Verification

  • The new component regression test fails on the original PR and passes with the fix.
  • node --test components/ChatInput.test.mjs lib/models-cache.test.mjs hooks/model-scope-startup.test.mjs lib/model-scope.test.mjs hooks/model-switching.test.mjs: 52/52 pass.
  • node_modules/.bin/tsc --noEmit --incremental false: clean.
  • npm run lint: clean.

wuxiangru915 and others added 2 commits August 28, 2026 08:23
/api/models now includes each model's input modalities in modelList,
and the composer shows a dismissible warning banner when images are
attached while the selected model is known not to accept image input.
Unknown modality info and auto model selection stay silent.
@agegr
agegr merged commit 6d7c5e0 into agegr:main Sep 5, 2026
2 checks passed
sleepinginsummer pushed a commit to sleepinginsummer/pi-web that referenced this pull request Sep 9, 2026
* Warn when attached images go to a model without image input (agegr#584)

/api/models now includes each model's input modalities in modelList,
and the composer shows a dismissible warning banner when images are
attached while the selected model is known not to accept image input.
Unknown modality info and auto model selection stay silent.

* fix(chat): warn for resolved default models with image attachments

---------

Co-authored-by: wuxiangru915 <wuxiangru915@users.noreply.github.com>
Co-authored-by: Alex Yang <agegcn@gmail.com>
ghost0211 pushed a commit to ghost0211/pi-web that referenced this pull request Sep 29, 2026
* Warn when attached images go to a model without image input (agegr#584)

/api/models now includes each model's input modalities in modelList,
and the composer shows a dismissible warning banner when images are
attached while the selected model is known not to accept image input.
Unknown modality info and auto model selection stay silent.

* fix(chat): warn for resolved default models with image attachments

---------

Co-authored-by: wuxiangru915 <wuxiangru915@users.noreply.github.com>
Co-authored-by: Alex Yang <agegcn@gmail.com>
(cherry picked from commit 6d7c5e0)
ghost0211 added a commit to ghost0211/pi-web that referenced this pull request Sep 29, 2026
Batch upstream cherry-picks (agegr/pi-web) into the fork:

Fixes
- Guard against duplicate built-in command submissions (agegr#762)
- Keep shell output across SSE reconnects; resume streaming output
- See sessions written by another pi process (agegr#796)
- Stop duplicating the first streamed chunk (agegr#835)
- Deliver events to every listener when one unsubscribes mid-emit

Features
- Warn when attached images go to a model without image input (agegr#636)
- Preview image attachments in the chat composer (agegr#735)
- Render apply_patch tool calls as split diffs (agegr#744)
- Scroll-to-latest floating button (agegr#845)

Performance & deps
- gzip large JSON responses (agegr#731)
- Cache unchanged session metadata across scans and restarts (agegr#625)
- Windowed session list (adapted to the fork's project-grouped sidebar) (agegr#626)
- Next.js 16.3.6 + disable image optimizer; trim production install (agegr#948)

Also includes the NSIS shortcut recreation hook (desktop icon fix).
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.

Attached images are silently dropped when the active model has no vision support — no warning in the UI

2 participants