Skip to content

Add fileIds to sendMultimodalMessage - #446

Merged
bsreenivas11 merged 1 commit into
mainfrom
bharath/multi-file-upload
Aug 25, 2026
Merged

Add fileIds to sendMultimodalMessage#446
bsreenivas11 merged 1 commit into
mainfrom
bharath/multi-file-upload

Conversation

@bsreenivas11

Copy link
Copy Markdown
Contributor

Summary

  • Add fileIds beside the existing fileId on sendMultimodalMessage (plural wins).
  • Dual-send file + files on the wire so older backends still receive the first attachment.
  • Mark fileId as deprecated. Do not delete it.

Written by Cursor Grok 4.6, using Cursor

Test plan

  • Existing multimodal tests updated to expect both file and files
  • New plural fileIds test
  • CI on this PR
  • Confirm an old backend still accepts a payload with both file and files

Old backends ignore files and still receive the first attachment via file.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bsreenivas11
bsreenivas11 marked this pull request as ready for review August 25, 2026 21:16
@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Backward-compatible extension to a beta conversational AI client API; dual-send reduces breakage for older backends, though wire payload shape changes when attachments are present.

Overview
sendMultimodalMessage now accepts multiple attachments via a new fileIds array, while the singular fileId remains supported but is marked deprecated.

When files are included, the client sends both the legacy file field (first attachment only) and a files array on the multimodal WebSocket event so older orchestrators still see a single attachment while newer backends can consume the full list. fileIds takes precedence when non-empty; otherwise a lone fileId is normalized into a one-element list.

The MultimodalMessageClientToOrchestratorEvent type gains an optional files property, and unit tests cover plural payloads and the dual file/files wire shape.

Reviewed by Cursor Bugbot for commit 672315c. Bugbot is set up for automated code reviews on this repo. Configure here.

@bsreenivas11
bsreenivas11 merged commit 753c403 into main Aug 25, 2026
4 checks passed
@bsreenivas11
bsreenivas11 deleted the bharath/multi-file-upload branch August 25, 2026 21:32
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.

2 participants