Skip to content

fix: preserve single files for fallback extraction paths - #3875

Open
HaokaiDing wants to merge 1 commit into
openai:mainfrom
HaokaiDing:fix/skills-single-file-upload
Open

HaokaiDing wants to merge 1 commit into
openai:mainfrom
HaokaiDing:fix/skills-single-file-upload

Conversation

@HaokaiDing

Copy link
Copy Markdown
  • I understand that this repository is auto-generated and my pull request may not be merged.

Changes being requested

Fixes #3874.

When the Skills files parameter is a single file, the array extraction path consumes it before the fallback single-file path can run. This produces an empty JSON request instead of uploading the file.

Keep non-list values available when a path still expects an array. Direct file extraction and list uploads retain their existing behavior. Add bytes/tuple extraction regressions and synchronous/asynchronous public-client tests that construct a real in-memory zip and inspect its multipart field, filename and content through MockTransport.

Additional context & links

  • Skills create accepts a single zip or multiple files.
  • Before the fix: 4 failed, 33 passed. After: 37 passed with PYTHONPATH=src .venv/bin/python -m pytest -o addopts='' tests/test_extract_files.py tests/test_files.py -q. Tests run serially and make no live API requests.
  • Ruff lint and format checks pass on all three changed files; git diff --check passes.
  • Python 3.13.15, httpx2 2.12.0, Pydantic 2.13.5 on macOS ARM64. The full SDK suite, Pyright and mypy were not run locally.
  • The custom-code policy, budget and generated ownership metadata are unchanged. Budget validation remains with the trusted upstream CI; SDK CODEOWNER review is required for this file-handling change.

@HaokaiDing
HaokaiDing requested a review from a team as a code owner September 16, 2026 12:38
Copilot AI lite review requested due to automatic review settings September 16, 2026 12:38

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T12:41:57.562599Z 2ac713c PR opened
🔒 Security Review Completed 2026-09-16T12:41:49.527871Z 2ac713c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

Skills single-file ZIP uploads are dropped during file extraction

2 participants