External tool_search_tool override (overridesBuiltInTool: true) is bypassed on the generic-client tool search path
まだ誰も着手していません。
評価
調査の方向性
Start by tracing the generic-client tool-search path and how it handles the registered tool_search_tool override; compare it with the OpenAI client path, where the issue says the override is invoked. Reproduce with toolSearch enabled and inspect events.jsonl for external_tool.requested and tool_search.activated. Done when the generic-client path invokes the host handler and activates its returned toolReferences.
索引モデルが issue の本文から書いたものです。
説明
Summary
When an SDK host registers a custom tool_search_tool with overridesBuiltInTool: true and enables toolSearch: { enabled: true }, models on the generic-client tool-search path bypass the external override and run the runtime's built-in full-text search instead.
On GPT models in the same runtime process and with the exact same session configuration, external_tool.requested fires and invokes the host's custom tool_search_tool handler as documented.
Environment
@github/copilot-sdk:1.0.29- Bundled Copilot runtime (
copilotVersionin session events):1.0.107 - OS: Windows x64
Steps to Reproduce
- Create a Copilot SDK session with
toolSearch: { enabled: true }, enough deferred tools (e.g., >30 MCP/external tools) to trigger deferral, and a customtool_search_tooloverride:
await client.createSession({
model,
toolSearch: { enabled: true },
mcpServers: { /* server(s) exposing deferred tools */ },
tools: [
{
name: "tool_search_tool",
description: "Custom tool search override",
parameters: {
type: "object",
properties: {
query: { type: "string" },
limit: { type: "number" },
},
required: ["query"],
},
overridesBuiltInTool: true,
skipPermission: true,
defer: "never",
handler: async (args, invocation) => ({
resultType: "success",
toolReferences: [/* custom-ranked tool names */],
textResultForLlm: "...",
}),
},
],
});
-
Send a prompt that requires discovering a deferred tool in two sessions inside the same runtime process:
- Session A: a GPT model (uses the OpenAI client tool-search path).
- Session B: a non-GPT / non-Claude model, such as a BYOK OpenAI-compatible local model (uses the
generic-clienttool-search path).
-
Inspect
events.jsonlfor both sessions whentool_search_toolexecutes.
Expected Behavior
Both sessions invoke the registered tool_search_tool override (overridesBuiltInTool: true), emitting external_tool.requested / external_tool.completed and activating the toolReferences returned by the host's handler.
Actual Behavior
- Session A (GPT model):
tool.execution_start(tool_search_tool) →external_tool.requested→external_tool.completed→tool.execution_complete. The host's custom handler runs and controls tool ranking/activation. - Session B (non-GPT / non-Claude model):
tool.execution_start(tool_search_tool) →hook.start/hook.end(preToolUse) →tool_search.activated(strategy: "generic-client") →hook.start/hook.end(postToolUse) →tool.execution_completewithdetailedContent: "Client-side tool search loaded 5 tool(s).".external_tool.requestednever fires.- The runtime executes its built-in full-text search instead of the host's override.
Impact
Hosts that customize tool_search_tool (for example, to apply domain ranking or custom selection semantics) get consistent tool discovery on GPT models, but silently lose their custom search logic on any model routed through generic-client (including BYOK / local models).
- 主要言語
- Python
- スター
- 11.5k
- フォーク
- 2k
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-cli のほかの issue
-
area:plugins
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/copilot-cli#5567 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationオープンarea:tools
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#5476 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5340 ·
github/copilot-cli の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Status: Triage Suggestion
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
collabnix/awesome-mcp-lists#515 ·
メンテナーはふだん 1 日以内に返信
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickieオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信