Skip to content

fix: upload binary multipart arrays as files - #501

Merged
petebacondarwin merged 1 commit into
mainfrom
codex/fix-multipart-file-arrays
Nov 4, 2026
Merged

petebacondarwin merged 1 commit into
mainfrom
codex/fix-multipart-file-arrays

Conversation

@petebacondarwin

Copy link
Copy Markdown
Collaborator

cf ai to-markdown sent --file under the wrong multipart field and treated --files as text. Recognize binary multipart arrays in the generator so single uploads use files and --files @first.html @second.pdf (or repeated flags) sends separate file parts, preserving each file's bytes and filename.

Regenerate the command and metadata, document the array flag, and add a patch changeset. Regression tests cover single and multiple uploads, binary bytes, filenames, invalid tokens, dry runs, and referenced or nullable schemas.

Fixes #463.

Validation:

  • pnpm check — passed.
  • pnpm --filter cf test — 2,402 passed, 7 skipped.

@petebacondarwin
petebacondarwin requested a review from a team as a code owner November 3, 2026 22:19
@pkg-pr-new

pkg-pr-new Bot commented Nov 3, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/cf@501

commit: dab0852

@ask-bonk

ask-bonk Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved — No issues found in the generator change, the regenerated command, the docs or the changeset.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

Risk: Low. Patch changeset is appropriate for this fix.


🔒 Security: ✅ LGTM

No issues found.


📖 AGENTS.md: ✅ LGTM

No issues found.


📋 Code Quality: ✅ LGTM

No issues found.


⚡ Performance: ✅ LGTM

No issues found.


📝 Documentation: ✅ LGTM

No issues found.


Reviewed commit: dab08522

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

cf --help startup

mean stddev min max
PR 281.3 ms 4.3 ms 276.0 ms 294.7 ms
base 279.9 ms 3.5 ms 275.5 ms 288.7 ms

Δ (PR vs base): ↑ +1.3 ms (+0.5%)

Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.

@petebacondarwin
petebacondarwin added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit a0eed39 Nov 4, 2026
12 checks passed
@petebacondarwin
petebacondarwin deleted the codex/fix-multipart-file-arrays branch November 4, 2026 12:26
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.

ai to-markdown never sends a files file part, so every conversion fails with 6006

2 participants