app-server: align dynamic tool identifiers with Responses API#20724
Merged
eternal-openai merged 2 commits intomainfrom May 6, 2026
Merged
app-server: align dynamic tool identifiers with Responses API#20724eternal-openai merged 2 commits intomainfrom
eternal-openai merged 2 commits intomainfrom
Conversation
pakrym-oai
approved these changes
May 5, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
Codex currently accepts dynamic tool names and namespaces that the upstream Responses function-tool path does not actually support. In practice, that means app-server can register a dynamic tool successfully and only discover later that the LLM-facing tool contract will reject or mishandle it.
This PR tightens the app-server-side dynamic tool contract to match the Responses API before we stack dynamic tool hook support on top of it.
What changed
nameagainst the Responses function-tool identifier contract:^[a-zA-Z0-9_-]+$, length1..128namespacethe same way, with the Responses namespace length limit1..64functions,multi_tool_use,file_search,web,browser,image_gen,computer,container,terminal,python,python_user_visible,api_tool,tool_search, andsubmodel_delegatorcodex-rs/app-server/README.mdthread/startrequest with Responses-incompatible dynamic tool identifiersVerification
cargo test -p codex-app-server validate_dynamic_tools_cargo test -p codex-app-server --test all thread_start_rejects_dynamic_tools_not_supported_by_responses