Image attachments re-validate when model switches
Uploading an image with the wrong model no longer permanently breaks it — switching to a vision model instantly makes the attachment usable again.
Previously, uploading an image with a non-vision model selected permanently rejected the file. Users had to delete the attachment and re-upload it after switching models. Image validation happened once at upload time and the error persisted even when context changed.
Now images are always accepted as attachments, regardless of the currently selected model. When a model lacks vision capability, a warning appears on image attachments telling users "This model does not support images." The warning clears automatically when switching to a vision-capable model. At submit time, unsupported images are filtered out so non-vision models never receive image data.
This happens in the UI layer — specifically in how the chat form renders and processes attachments.
View Original GitHub Description
When uploading an image with a non-vision model selected, the file is permanently rejected and its data discarded. Switching to a vision-capable model still shows the error, forcing the user to remove and re-upload the file.
This moves the vision capability check from upload-time rejection to render-time derived state. Images are always accepted as attachments, and a warning is shown when the current model does not support them. The warning clears automatically when switching to a vision model. At submit time, unsupported images are filtered out to preserve the existing behavior of not sending images to non-vision models.
Changes:
fileValidation.ts: remove the vision capability check that rejected images at upload timeChatForm.tsx: show a derived warning on image attachments when the model lacks vision capability, and filter unsupported images at submit time
Fixes #12952