Pull requests / #812
#812 serve: Codex MCP tools (web search) fail as 'unsupported call': map namespace__name calls back to their namespace
closed · @robwijnhoven · 0 comentários · No GitHub
Setup & installServer & APINVIDIA / CUDAModels & quantsLinux
Descrição
Related to #451.
## Problem
Codex sends its MCP tools as `namespace` tools, e.g. `{"type": "namespace", "name": "mcp__websearch", "tools": [{"type": "function", "name": "web_search", ...}]}`. The Responses adapter presents that tool to the model as `mcp__websearch.web_search` and maps that name back to `(namespace, name)` for the `function_call` item.
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 function `mcp__websearch__web_search` with no `namespace`, and Codex refuses it:
```
ERROR codex_core::tools::router: error=unsupported call: mcp__websearch__web_search
```
So MCP tools (web search here) never run through Codex on Strata, while the model is calling them correctly in spirit.
## Fix
`request_tools` also registers `f"{namespace}__{name}"` for every namespaced tool, with `setdefault`, so a real tool that happens to carry that exact flat name still wins. The call then comes back with `namespace: "mcp__websearch"`, `name: "web_search"`, and Codex runs it.
## Validation
- New test `test_namespace_call_written_with_double_underscore` (over HTTP, MockEngine): fails before the change, passes after.
- `python -m unittest serve.test_responses` in 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.
- Real use: Codex CLI 0.160.0 → Strata 0.1.39 (IQ3_S, RTX 3090, 262K context) with a streamable-HTTP MCP search server. Before: `unsupported call: mcp__websearch__web_search` on 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](https://claude.com/claude-code)
No site
Links install, modelos, releases.