Skip to content

Session enters unrecoverable 400 error when pasting image with non-multimodal model #3781

@Tari-sk

Description

@Tari-sk

Describe the bug

Actual behavior: Once an image attachment is in the event log, every prompt fails with HTTP 400. The only workaround is manually editing events.jsonl to remove the attachment.

Affected version

No response

Steps to reproduce the behavior

  1. Start a session in Copilot CLI (using deepseek-v4-flash or any non-multimodal model)
  2. Paste an image (e.g., copy screenshot and paste into prompt)
  3. The image attachment is saved to events.jsonl
  4. Submit any prompt — all subsequent prompts fail with 400 deepseek-v4-flash is not a multimodal model
  5. Session becomes completely unusable; /clear starts a fresh session but the same error persists if the old context is reloaded

Expected behavior

  • The model should gracefully reject the image attachment and allow the session to continue with text-only prompts, OR
  • The CLI should detect the model cannot handle images and strip the attachment before sending, OR
  • There should be a way to rewind past the offending turn

Additional context

Copilot CLI 1.0.61, model deepseek-v4-flash, Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:modelsModel selection, availability, switching, rate limits, and model-specific behaviorarea:sessionsSession management, resume, history, session picker, and session state

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions