mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #812] [CLOSED] serve: Codex MCP tools (web search) fail as 'unsupported call': map namespace__name calls back to their namespace #2844
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2844
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/812
Author: @robwijnhoven
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:serve-namespace-double-underscore📝 Commits (1)
1417ed4serve: map namespace calls written as namespace__name back to their namespace📊 Changes
2 files changed (+20 additions, -0 deletions)
View changed files
📝
serve/responses.py(+4 -0)📝
serve/test_responses.py(+16 -0)📄 Description
Related to #451.
Problem
Codex sends its MCP tools as
namespacetools, e.g.{"type": "namespace", "name": "mcp__websearch", "tools": [{"type": "function", "name": "web_search", ...}]}. The Responses adapter presents that tool to the model asmcp__websearch.web_searchand maps that name back to(namespace, name)for thefunction_callitem.Qwen3.8-Flash-Next (IQ3_S) does not write the dotted name. It writes
mcp__websearch__web_search, the flat form Codex has long used for MCP tools. That spelling has no entry in the reverse map, so the call comes back as a plain functionmcp__websearch__web_searchwith nonamespace, and Codex refuses it:So MCP tools (web search here) never run through Codex on Strata, while the model is calling them correctly in spirit.
Fix
request_toolsalso registersf"{namespace}__{name}"for every namespaced tool, withsetdefault, so a real tool that happens to carry that exact flat name still wins. The call then comes back withnamespace: "mcp__websearch",name: "web_search", and Codex runs it.Validation
test_namespace_call_written_with_double_underscore(over HTTP, MockEngine): fails before the change, passes after.python -m unittest serve.test_responsesin a Docker build of v0.1.39 (Linux, CUDA image): 20 tests, all new and existing namespace/custom-call tests pass. One error,test_json_schema_text_format, also fails on an unmodified v0.1.39 image here (r["error"]is None), so it is unrelated to this change.unsupported call: mcp__websearch__web_searchon every attempt. After:mcp: websearch/web_search (completed)and the result reached the model. A 4-turn shell tool loop in the same setup worked before and after.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.