Skip to content

[codex] ChatGPT Library file upload/download hooks#19458

Open
lt-oai wants to merge 26 commits intomainfrom
lt/integrate-lib-app-cleanup-hooks
Open

[codex] ChatGPT Library file upload/download hooks#19458
lt-oai wants to merge 26 commits intomainfrom
lt/integrate-lib-app-cleanup-hooks

Conversation

@lt-oai
Copy link
Copy Markdown

@lt-oai lt-oai commented Apr 24, 2026

Summary

  • Allow connector_openai_library through Codex apps connector filtering.
  • Support store_in_library file uploads by calling /files/process_upload_stream after the file bytes upload
  • Propagate library_file_id into uploaded MCP file arguments.
  • materialize file download link if the materialize_file_download key exists in results meta

@lt-oai lt-oai force-pushed the lt/integrate-lib-app-cleanup-hooks branch 2 times, most recently from 7d77a77 to 07f5815 Compare April 24, 2026 23:05
@lt-oai
Copy link
Copy Markdown
Author

lt-oai commented Apr 24, 2026

@codex review

Copy link
Copy Markdown
Contributor

@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: 07f5815ef1

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/codex-api/src/files.rs Outdated
Comment thread codex-rs/codex-api/src/files.rs
Comment thread codex-rs/codex-api/src/files.rs Outdated
Comment thread codex-rs/codex-api/src/files.rs
Comment thread codex-rs/core/src/codex_apps_file_download.rs Outdated
@lt-oai lt-oai changed the title Simplify Codex Library file hooks [codex] ChatGPT Library file upload/download hooks Apr 25, 2026
@lt-oai lt-oai force-pushed the lt/integrate-lib-app-cleanup-hooks branch from 500f3e0 to 75102a2 Compare April 25, 2026 01:08
@lt-oai lt-oai marked this pull request as ready for review April 25, 2026 01:23
@lt-oai lt-oai requested a review from a team as a code owner April 25, 2026 01:23
Copy link
Copy Markdown
Contributor

@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: 75102a2dab

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/mcp_tool_call.rs Outdated
Comment thread codex-rs/codex-api/src/files.rs
Comment thread codex-rs/core/src/mcp_tool_call.rs Outdated
Comment thread codex-rs/core/src/file_watcher_tests.rs Outdated
Copy link
Copy Markdown
Collaborator

@dylan-hurd-oai dylan-hurd-oai left a comment

Choose a reason for hiding this comment

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

Couple things to address

Comment thread codex-rs/codex-api/src/files.rs
Comment thread codex-rs/codex-api/src/files.rs Outdated
Comment thread codex-rs/core/src/mcp_tool_call.rs Outdated
.call_tool(server, tool_name, rewritten_arguments, request_meta)
.await
.map_err(|e| format!("tool call error: {e:?}"))?;
let result = maybe_materialize_codex_apps_file_download_result(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd love to consider if there's a better approach here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

how do you feel about this refactoring? 9b178ab

Now maybe_materialize_codex_apps_file_download_result is outside of execute_mcp_tool_call(), and wrapped into postprocess_mcp_tool_result_for_openai_files. Still inside handle_approved_mcp_tool_call(). Basically postprocess_mcp_tool_result_for_openai_file() is now symmetrical to rewrite_mcp_tool_arguments_for_openai_files() that was introduced prior to this PR.

@lt-oai lt-oai force-pushed the lt/integrate-lib-app-cleanup-hooks branch from 1e743ba to b27a245 Compare April 28, 2026 20:20
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.

3 participants