[codex] Add OpenAI file support for builtin codex_apps tools#18153
Draft
[codex] Add OpenAI file support for builtin codex_apps tools#18153
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
c88b178 to
e66c01c
Compare
e66c01c to
1ce4c60
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
https://github.com/openai/openai/pull/833843
Add support for builtin
codex_appstools (e.g., ChatGPT Library tool) that use OpenAI file upload and download semantics.openai/fileParamsmetadata, then rewrites them into OpenAI file references before the MCP tool call./files/{file_id}/uploaded finalizecall for library (store_in_library=true) uploads.codex_appssupportopenai_file_api_base_urlfor local/dev, sincechatgpt_base_urlpoints at local codex-backend while the file API lives on sa-server. (Note: in staging/prod, bothcodex-backendandsa-serverhas the same base URL)High-level approach
codex_appstools as first-party builtin tools, identified by backend-provided_codex_appsmetadata.openai/fileParams.openai/fileUploadConfigfor those uploads.openai_file_api_base_urlin local/dev, since the file API can live separately fromchatgpt_base_url.CODEX_HOME/.tmp/codex_apps_downloads/...local_pathin the tool resultstore_in_library=trueuploads, skip the deprecated/files/{file_id}/uploadedfinalize call.Why this shape
codex_appsMCP surface instead of introducing a separate MCP server.codex_appstools.chatgpt_base_urlcan point at localcodex-backendwhile the file API lives elsewhere.Validation