豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Preserve nested filenames for skill uploads#1833

Open
MukundaKatta wants to merge 2 commits intoopenai:masterfrom
MukundaKatta:codex/openai-node-preserve-skill-paths
Open

Preserve nested filenames for skill uploads#1833
MukundaKatta wants to merge 2 commits intoopenai:masterfrom
MukundaKatta:codex/openai-node-preserve-skill-paths

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

  • preserve nested file names for skills.create() and skills.versions.create() multipart uploads
  • keep the existing filename stripping behavior for other upload endpoints
  • add regression tests that assert my-skill/SKILL.md is preserved in the multipart body

Testing

  • not run locally: yarn is not installed in this environment

@MukundaKatta MukundaKatta requested a review from a team as a code owner April 19, 2026 22:15
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee5d1fec35

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/internal/uploads.ts
form.append(
key,
value,
stripFilenames ? getName(value) : (('name' in value && value.name && String(value.name)) || getName(value)),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve stream paths when filename stripping is disabled

The new stripFilenames option is only applied in the isNamedBlob branch, but fs.ReadStream uploads (an allowed Uploadable) hit the isAsyncIterable branch above and still use getName(value), which drops directory components. That means skills.create() and skills.versions.create() still flatten paths like my-skill/SKILL.md to SKILL.md when callers pass streams, so directory uploads remain broken for a common Node usage pattern.

Useful? React with 👍 / 👎.

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.

1 participant