fix(codex): preserve namespace MCP tools forwarded to Codex Responses… - #1483
Merged
diegosouzapw merged 1 commit intoApr 21, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
… API normalizeCodexTools() was dropping all tools with type !== "function", which stripped namespace-typed MCP tool groups (e.g. mcp__atlassian__) before the request reached the Codex API. Codex then saw an empty tools array and refused to call any MCP tools. Fix: detect type === "namespace" entries, preserve them as-is (Codex API supports them natively), and register sub-tool names in validToolNames so tool_choice validation still works correctly. Also whitelist "namespace" in the openai-responses translator to prevent a throw on the same type when the translation path is invoked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for 'namespace' tools, which represent MCP tool groups used by the Codex and OpenAI Responses API. The changes include updating the tool normalization logic to register sub-tool names for validation and adjusting the request translator to permit the 'namespace' tool type. I have no feedback to provide as there are no review comments.
Merged
5 tasks
Poid-ZA
pushed a commit
to Poid-ZA/OmniRoute
that referenced
this pull request
Aug 5, 2026
… API (diegosouzapw#1483) Integrated into release/v3.7.0
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… API (diegosouzapw#1483) Integrated into release/v3.7.0
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.
… API
normalizeCodexTools() was dropping all tools with type !== "function", which stripped namespace-typed MCP tool groups (e.g. mcp__atlassian__) before the request reached the Codex API. Codex then saw an empty tools array and refused to call any MCP tools.
Fix: detect type === "namespace" entries, preserve them as-is (Codex API supports them natively), and register sub-tool names in validToolNames so tool_choice validation still works correctly. Also whitelist "namespace" in the openai-responses translator to prevent a throw on the same type when the translation path is invoked.
Summary
Related Issues
Validation
npm run lintnpm run test:unitnpm run test:coverage>= 60%for statements, lines, functions, and branchesTests Added Or Updated
Coverage Notes
src/,open-sse/,electron/, orbin/, explain which tests cover the change.Reviewer Notes