Repository navigation
docs(tool-search): configuration by client, one Responses row - #950
Merged
Merged
Conversation
Add a "Configuration by client" section to the tool search matrix. Merge the two contradicting Responses rows into one, and note that OpenAI's server-side search is planned in #876. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
amiddavid
commented
Nov 8, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | 33df32edccea |
blocking |
Verdict: blocking
Findings
- docs/tool-search-matrix.md:16 — "any model" is wrong: a Responses request that names a Claude model defers nothing and gets no search tool
- What fails: a reader routes Claude models through the OpenAI Responses endpoint (a litellm-style gateway allows it) and reads this row. The row says the proxy adds
context_guru_toolsand defers "tools the history rule picks" for any model. In the code,ApplySearchstops on a Claude model name before it looks at the tools:case AnthropicModel(r.Model): o.Why = "anthropic"(tooldefer/clientsearch.go:324). The Claude path (Apply) never runs for the Responses wire, because the host gates it onwire != schema.WireAnthropic || provider != bschemas.Anthropic(proxy/tooldefer.go:400), and/openai/v1/responsesis wired with provider OpenAI (proxy/proxy.go:524-527). So such a request defers nothing, and the model gets no way to load a tool. The same wrong claim repeats atdocs/tool-search-matrix.md:107-108: "The proxy checks the tools in the request, not the model name." - Proof: trace above. The row below it in the same file (
docs/reference/presets.md:182) says the removal path is for "GPT, GLM and Kimi", which matches the code. - Fix: write "any non-Claude model" in the row, and add one line to the Responses section: a Claude model on this wire defers nothing (it is left to the Anthropic path, which the Responses wire never takes).
- What fails: a reader routes Claude models through the OpenAI Responses endpoint (a litellm-style gateway allows it) and reads this row. The row says the proxy adds
Non-blocking
docs/tool-search-matrix.md:60and:111: "or leaveultrahigh" reads as "or keep ultrahigh", the opposite of the intent ("or switch away from ultrahigh"). Line 157 (old text) has the same phrasing. Suggest "or use a lower preset".docs/tool-search-matrix.md:88: "Codex falls back to HTTP at once". The code comment says HTTPS (proxy/proxy.go:528-531). Pick one word and keep it.
What I checked
- The full diff (one commit,
docs/tool-search-matrix.mdonly, +98/-2) and the whole file around it. - Preset facts:
ultrahigh=xhigh+toolfilter defer: auto, no other preset defers (config/config.go:670-673,:964-966);--presetflag andPRESETenv (cmd/context-guru-proxy/main.go:85); the YAML example merges per component with the user block winning (config/config.go:465-472), and the example includesdefer: auto, so it is correct. toolfilterkeys:defer(auto/off, defaultoff),keep,always_defer, keep wins over always_defer,mcp__<server>names (components/reformat/toolfilter.go:35-41,:86-112; matching intooldefer/tooldefer.go:152-191).- Stats labels named in the doc:
requests,retries_400,turned_off,add_backs,wrong_guesses,client_loads,direct_calls,client_search_disabled(unknown_description,break) — all present in the/statstool_deferblock (proxy/tooldefer.go:748-790,metrics/metrics.go:1101). ENABLE_TOOL_SEARCH: valuesfalse|0|no|off(tooldefer/gate.go:169-175,context-guru-plugin/scripts/signal.sh:41,62); the Codex plugin's signal hook sends only session, event and kind, so the doc's "no hook that sends it" is right (codex-marketplace/.../codex_plugin.py:594-614).- Codex: WebSocket upgrade gets 426, other GETs keep 405 (
proxy/proxy.go:528-536); owntool_searchmeans nothing deferred (NativeSearch,tooldefer/clientsearch.go:327,712-723); the Codex preset picker exists (codex-marketplace/.../codex_plugin.py:792-794, skills/preset-picker). - Responses path: string
input→input_not_array;previous_response_idwith no record makes no new decision (tooldefer/clientsearch.go:346-363). - Probe gating: a new decision on a Claude model needs a Pass verdict, else the thread defers nothing, so "the first session after the change defers nothing" is right (
tooldefer/apply.go:139-185); the Chat Completions path has no probe (proxy/tooldefer.go:492-494). - Cross-checked the claims against
docs/reference/presets.md:182, which agrees with the code except where the finding says so.
amiddavid
commented
Nov 8, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 1 of 2 | 33df32edccea |
blocking |
Verdict: blocking
Findings
- docs/tool-search-matrix.md:16 — the new "any model" claim on the Responses row is wrong for Claude models
- What fails: a Responses request whose model name contains "claude" (for example Codex pointed at a Claude model through an OpenAI-compatible upstream) gets no search tool and no deferral. The row says such a client gets our
context_guru_tools, for "any model", because "the proxy checks the tools, not the model". - Proof: the dispatch sends every Responses request to the client-search path only (
proxy/tooldefer.go:398-401); thedefer_loadingpath requireswire == WireAnthropic && provider == Anthropic(proxy/tooldefer.go:402-404), so it never runs on a Responses wire. InsideApplySearch, the model check runs before the tools check:case AnthropicModel(r.Model): o.Why = "anthropic"; return o, nil(tooldefer/clientsearch.go:324-326), andAnthropicModelmatches any name containing "claude" (tooldefer/probe.go:341-343).NativeSearch, the tools check, is the next case (tooldefer/clientsearch.go:327). So for a Claude model the proxy checks the model, not the tools, and defers nothing. The sibling Chat Completions row avoids this by naming its models ("GLM, Kimi, GPT chat"); the Responses row now claims "any model". - Fix: scope the row and the section bullet (lines 107-108) to non-Claude models — for example "any model but Claude" — or add a sentence saying a Claude model on a Responses wire defers nothing today. Note: the parenthetical "checks the tools, not the model" predates this PR; the "any model" wording is what this PR adds.
- What fails: a Responses request whose model name contains "claude" (for example Codex pointed at a Claude model through an OpenAI-compatible upstream) gets no search tool and no deferral. The row says such a client gets our
Non-blocking
- Line 23: "All four setups" — five subsections follow (Claude Code on, Claude Code off, Codex, Chat Completions, Responses). Say "four clients" or "five setups" so the count matches what the reader sees.
- Line 66: "
retries_400: ... 400s that the proxy retried with the original" — the counter also books 422s (proxy/tooldefer.go:615, "a 400 or 422"). The field name says 400; one word ("400/422") would make it exact. - Line 60: "Turn off:
toolfilter: {defer: off}, or leaveultrahigh" — "leave" reads two ways ("keep" or "depart from"). "Or switch offultrahigh" is unambiguous. - Line 109: "Client setting: the request
inputmust be an array" — this is a request shape, not a client setting. The other bullets in that slot name real settings.
What I checked
- Read the full diff (one file,
docs/tool-search-matrix.md, +98/-2) and the whole file around it. - Verified against the code, line by line:
toolfilterkeysdefer/keep/always_defer,offas the default,keepwinning overalways_defer(components/reformat/toolfilter.go:35-40,86-112;tooldefer/tooldefer.go:188-207—vetobeatsalwaysin the switch).ultrahigh=xhighplusdefer: auto, and no other preset defers (config/config.go:670-673,964-992; only onedefer:in the preset YAMLs).--presetflag andPRESETenv var (cmd/context-guru-proxy/main.go:85);preset:YAML key (config/config.go:27); user component config overrides the preset's per-component node, so the example correctly repeatsdefer: auto(config/config.go:455-464).- Preset picker: skill exists, runs
settings.py preset set --name <name>; its own text matches "the first session on each model after the restart is not deferred". - Probe gating: first request with no verdict defers nothing for that thread (
tooldefer/apply.go:164-178); the client-search path has no probe, so its first request can defer (proxy/tooldefer.go:474-475). ENABLE_TOOL_SEARCHvalues false/0/no/off (tooldefer/gate.go:169-175); the session-start hook sends it (context-guru-plugin/hooks/hooks.json,scripts/signal.sh:41,62); the Codex plugin has noENABLE_TOOL_SEARCHanywhere.- Codex: WebSocket upgrade answered with 426 (
proxy/proxy.go:528-535); nativetool_searchdefers nothing (tooldefer/clientsearch.go:327-332); Codex preset picker exists. - Responses:
input_not_arrayandprevious_response_idreasons and their behavior (tooldefer/clientsearch.go:341-363). - Every
/statstool_deferfield named in the doc:requests,retries_400,turned_off,add_backs,client_loads,direct_calls,wrong_guesses,client_search_disabledwith reasonsunknown_description/break(proxy/tooldefer.go:748-791;tooldefer/gate.go:50-51).
- Live tests were not run (not approved). This is a docs-only change: no data-dependence row and no behavior-change note are needed.
- Say "non-Claude model": a Claude model on the Responses wire defers nothing. - Fix the setup count, "400 or 422", "use a lower preset", "HTTPS", and relabel the `input` rule as a request shape. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Collaborator
Author
|
Round 1 fixed in 94d8a00.
|
amiddavid
commented
Nov 8, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | resumed | 1 of 2 | 2 of 2 | 94d8a0047643 |
approve |
Verdict: approve
Findings
None. The round-1 finding is fixed and correct.
Round-1 findings, re-checked
- "any model" wrong for Claude models on the Responses wire (mine, and reviewer 2's finding 1 — same defect).
- Fixed. The row now says "any non-Claude model (the proxy checks the model name, then the tools)". That matches the code order exactly:
AnthropicModelfirst,NativeSearchsecond (tooldefer/clientsearch.go:324-327). The Responses section adds "Claude models: a Claude model on this wire defers nothing today. Thedefer_loadingpath does not run on Responses." — also correct: thedefer_loadingpath needswire == WireAnthropic && provider == Anthropic(proxy/tooldefer.go:402-404). - Reviewer 2's fix proposal was the same as mine. Both are answered by the same two edits.
- Fixed. The row now says "any non-Claude model (the proxy checks the model name, then the tools)". That matches the code order exactly:
Non-blocking notes from round 1, re-checked
- "All four setups" → "All five setups". Fixed. Five subsections follow.
retries_400"400s" → "400s and 422s" / "a 400 or 422" in all three places. Fixed. MatchesdeferRetry, which books "a 400 or 422" (proxy/tooldefer.go:615).- "or leave
ultrahigh" → "or use a lower preset" in both places. Fixed. - "Client setting: the request
input..." → relabeled "Request shape:". Fixed. - Reviewer 2's "falls back to HTTP" → "falls back to HTTPS". Fixed. The code comment says "Only 426 Upgrade Required makes it fall back to HTTPS at once" and the error text says "use HTTPS POST" (
proxy/proxy.go:529-535).
Non-blocking
- The table has no row for a Claude model on a Responses wire; only the section text covers it. A reader who reads only the table misses that case. A short row, or a pointer under the table, would close it.
- "A 400 or 422 on a deferred request turns deferral off for the tenant and model" — the code turns deferral off only when the original request then succeeds; when the original fails too, deferral stays on (
proxy/tooldefer.go:615-630). The sentence is a simplification that predates this PR; this commit only widened 400 to "400 or 422".
What I checked
- Last review: round 1, 33df32e, 2026-11-08T13:51:19Z.
- New commits read: 1 —
94d8a004"docs(tool-search): fix the Responses claims from review round 1" (one file,docs/tool-search-matrix.md, +12/-12). - Read in full: 2 reviews, 1 comment, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt). - New items since my last review:
- Reviewer 2's round-1 review (posted 67 seconds before mine, not read before mine went out): one finding, identical to mine, plus two non-blocking notes ("leave ultrahigh", HTTP vs HTTPS). I checked both notes myself: the wording one is a fair reading, and the HTTPS one matches the code comment. The author fixed both.
- The author's comment "Round 1 fixed in 94d8a00" listing six fixes. I verified each one in the diff and against the code (see above). All six are in the commit and all are correct.
- Commit
94d8a004: read the full diff and the changed file around each change. Every edit matches the code: the check order, the Claude-model exclusion, the five setups, the 400/422 wording, the lower-preset wording, the request-shape label, and the HTTPS wording.
- No new code, no behavior change, no data-dependence impact. Live tests not run (not approved); not needed for a docs-only change.
amiddavid
commented
Nov 8, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | resumed | 2 of 2 | 2 of 2 | 94d8a0047643 |
approve |
Verdict: approve
Findings
None. Both round-1 findings are fixed, and the fix commit adds no new defect.
Earlier findings
- Mine, 1 (blocking): "any model" on the Responses row. Fixed. The row now says "any non-Claude model (the proxy checks the model name, then the tools)". That matches the code order:
AnthropicModel(r.Model)runs beforeNativeSearch(tooldefer/clientsearch.go:324-332). The section bullet now says the same, and the new "Claude models" line ("defers nothing today. Thedefer_loadingpath does not run on Responses") matches the host gate (proxy/tooldefer.go:400: the Anthropic path needswire == WireAnthropic). - Reviewer 1, 1 (blocking): same defect. Fixed by the same change. I checked it myself; the proof above is mine.
- Reviewer 1, non-blocking (count, retries_400 wording, "leave ultrahigh", "client setting" label, HTTP/HTTPS). All fixed: "All five setups" (five subsections follow), "400s and 422s" and "a 400 or 422" in the three Watch bullets, "or use a lower preset" in three places, the bullet is relabeled "Request shape", and the Codex paragraph says HTTPS, which matches the code comment (
proxy/proxy.go:528-531). - My non-blocking ("leave ultrahigh", HTTP/HTTPS). Fixed the same way.
Non-blocking
- The two table rows (Chat Completions and Responses) still say "A 400 turns deferral off" in the "On a break or disable" column, while the body text now says "a 400 or 422". The column text predates this PR. One word would line them up.
- The Watch bullets say a 400 or 422 "turns deferral off for the tenant and model". The code turns it off only when the original request then succeeds; when the original fails too, deferral stays on (
proxy/tooldefer.go:615-637,Breakonly onoriginalOK). The sentence is a fair simplification of the common case.
What I checked
- Last review: round 1, 33df32e, 2026-11-08T13:50:12Z.
- New commits read: 1 —
94d8a004"docs(tool-search): fix the Responses claims from review round 1" (one file, +12/−12). - Read in full: 2 reviews, 1 comment, 0 inline comments (from the three saved files).
- New items since my last review: the author's comment "Round 1 fixed in 94d8a00" with the six-point fix list — I checked each point against the diff and the code, as above.
- The 422 claim: the retry path fires on 400 and 422 (
proxy/proxy.go:2022-2025), anddeferRetrybooks both into theretries_400counter (proxy/tooldefer.go:623-637, comment at:768). The doc's new wording is right. - The setup count: five subsections follow the sentence (Claude Code on, Claude Code off, Codex, Chat Completions, Responses).
- Re-read the changed sections of
docs/tool-search-matrix.mdin the final file, not only the diff.
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.
Summary
Docs only. No code change, no behavior change, no data dependence change.
What changed
All in
docs/tool-search-matrix.md:ToolSearchon, and off), Codex, a Chat Completions client, and a Responses client with no search. Each has: how to turn it on, client-side settings, how to turn deferral off, and which/statstool_deferfields to watch. It has one sharedtoolfiltertable (defer,keep,always_defer) and a YAML example.context_guru_toolson any model. A "Planned, not built" note says OpenAI's server-side search is planned in feat(tooldefer): native tool search for gpt-5.6+ on the Responses API #876.How it was checked
Each name was found with
git grepon origin/main:defer,keep,always_defer:components/reformat/toolfilter.go,config/config.go(ultrahigh block),proxy/savemoretools.goultrahighpreset,--preset/PRESET:config/config.go,cmd/context-guru-proxy/main.go,docs/reference/presets.mdsettings.py preset set --name:context-guru-plugin/skills/preset-picker/SKILL.md; Codex picker undercodex-marketplace/plugins/context-guru/skills/preset-pickerENABLE_TOOL_SEARCH(false/0/no/off):context-guru-plugin/scripts/signal.sh,tooldefer/gate.goCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS:apply/breakpoint.go, plugincostly_settings.jsonproxy/proxy.go(StatusUpgradeRequired)input_not_array,native_search,previous_response_id:tooldefer/clientsearch.go/statsfieldsclient_search_disabled,client_loads,direct_calls,requests,retries_400,turned_off,add_backs,wrong_guesses:proxy/tooldefer.goNo new page, so
mkdocs.ymlis unchanged.Left out
supports_websockets: not in the code. The page names the 426 answer without the Codex setting.