Repository navigation
Conversation
6c84ab2 to
cd9d5f2
Compare
|
@drifkin would you mind taking a look at this PR (#16263) when you have a chance? This PR adds support for namespaced tool calls in the OpenAI-compatible Responses API, addressing #15921. It translates If the approach looks reasonable, I’d appreciate a review or help routing it toward merge. |
cd9d5f2 to
eb608e4
Compare
eb608e4 to
cbb9112
Compare
12bff25 to
a962d6a
Compare
507808d to
fbeb2c0
Compare
15b572c to
3c05eb9
Compare
c53c2eb to
3a78148
Compare
6e8daeb to
e41a8b9
Compare
|
@drifkin, a quick update following the namespace support added by @dhiltgen in #17593—thanks for providing that foundation. I have rebased and substantially narrowed this PR so it no longer duplicates the basic namespace expansion. It is now a single commit containing only the remaining correctness pieces:
The PR is based directly on current Would you be willing to take another look at the updated, reduced diff? |
e41a8b9 to
6c1c328
Compare
6c1c328 to
54dcfb5
Compare
Run the nested configure command before each native build while preserving the v0.34.4 mlx, mlxc, and XGrammar targets. Co-authored-by: Codex <noreply@openai.com>
Preserve explicit pinned llama.cpp, MLX, and MLX-C sources for per-architecture builds. Co-authored-by: Codex <noreply@openai.com>
Order Metal v4 after v3 only when both targets exist, and cover reversed and single-target declaration shapes. Co-authored-by: Codex <noreply@openai.com>
Reconcile request-scoped namespace identities with v0.34.4 Responses and tool-search conversion, including legacy aliases and mixed web-search output. Co-authored-by: Codex <noreply@openai.com>
54dcfb5 to
a8f5a12
Compare
Problem
Fixes #15921.
Ollama flattens namespace tools for its internal chat representation and must
recover the original
(namespace, name)pair when returning a Responses toolcall. Losing that pair prevents clients such as Codex from routing the call to
the requested MCP tool. The Codex multi-agent failure reported in #18284 is a
real-world example of this round-trip symptom.
Current
mainexpands namespace declarations and restores ordinary namespacedcalls, but its lookup is not injective. For example,
namespace
a.b/ memberc, namespacea/ memberb.c, and flat functiona.b.call produce the same internal name. Resolution then depends ondeclaration order and can return the wrong tool identity to the client. Mixed
web-search output also bypasses request-scoped namespace restoration.
What this changes
tool-search results, and tool-call history;
declaration order;
unambiguous;
mixed web-search Responses output.
Scope
The change is limited to Responses request/output translation and the existing
web-search response assembly path.
Validation
go test ./openai ./middleware -count=1passes. Focused tests cover namespaceround trips, collision rejection independent of declaration order, legacy
aliases, tool-search results, history, streaming, non-streaming, and mixed
web-search output. Repository lint and
go build ./...also pass.Runtime validation passes non-streaming, streaming, and namespaced-history
Responses requests with
gpt-oss:20b.AI assistance
Codex materially assisted with implementation review, tests, validation, and
this PR description. The contributor reviewed the final changes and test
results.