Tool search configuration support#1933
Open
almaleksia wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds cross-SDK support for configuring the runtime’s tool-search behavior on session create/resume, and extends tool results to optionally carry tool-search references returned by a tool-search tool.
Changes:
- Add
tool_search/toolSearchsession option to CreateSession/ResumeSession across Rust, Python, Node, Go, Java, and .NET SDKs. - Add optional tool-search reference metadata to tool results (
tool_references/toolReferences) across SDKs. - Update tests and request builders/serialization layers to carry the new fields through to the CLI/runtime wire format.
Show a summary per file
| File | Description |
|---|---|
| rust/tests/e2e/tool_results.rs | Updates E2E test helper to include tool_references in expanded tool results. |
| rust/src/wire.rs | Adds tool_search to create/resume wire payload structs (camelCase on the wire). |
| rust/src/types.rs | Introduces ToolSearchConfig; threads tool_search through SessionConfig/ResumeSessionConfig; adds tool_references to ToolResultExpanded. |
| rust/src/tool.rs | Ensures MCP tool-result conversion initializes tool_references. |
| rust/src/session.rs | Ensures tool failure results initialize tool_references. |
| python/copilot/tools.py | Adds tool_references to ToolResult (needs adjustment to avoid a useless string expression). |
| python/copilot/session.py | Adds ToolSearchConfig TypedDict; forwards tool_references when responding with tool results. |
| python/copilot/client.py | Adds tool_search parameter to create/resume and serializes it to toolSearch wire format. |
| python/copilot/init.py | Exposes ToolSearchConfig from the package API surface. |
| nodejs/src/types.ts | Adds ToolReferences to tool result type; introduces ToolSearchConfig and toolSearch in session config typing. |
| nodejs/src/index.ts | Re-exports ToolSearchConfig. |
| nodejs/src/client.ts | Forwards toolSearch in create/resume session JSON-RPC payloads. |
| java/src/test/java/com/github/copilot/ToolResultsTest.java | Updates tests for the expanded ToolResultObject record signature. |
| java/src/main/java/com/github/copilot/SessionRequestBuilder.java | Forwards toolSearch from config into create/resume requests. |
| java/src/main/java/com/github/copilot/rpc/ToolSearchConfig.java | Adds new RPC model for tool-search configuration. |
| java/src/main/java/com/github/copilot/rpc/ToolResultObject.java | Adds toolReferences field to the record and updates factory methods/docs. |
| java/src/main/java/com/github/copilot/rpc/SessionConfig.java | Adds toolSearch to the Java session config object + clone support. |
| java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java | Adds toolSearch to resume request RPC shape. |
| java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java | Adds toolSearch to resume config + clone support. |
| java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java | Adds toolSearch to create request RPC shape. |
| go/types.go | Adds ToolSearchConfig, threads it through session configs and wire request structs; adds ToolReferences to tool result. |
| go/session.go | Forwards ToolReferences when sending tool results back to the runtime. |
| go/client.go | Forwards ToolSearch into create/resume requests. |
| dotnet/src/Types.cs | Adds ToolReferences to tool result type; introduces ToolSearchConfig and threads it into session config base (doc typo present). |
| dotnet/src/Client.cs | Threads ToolSearch into create/resume request records. |
Review details
- Files reviewed: 25/25 changed files
- Comments generated: 2
- Review effort level: Low
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.
Adding tool_search option to CreateSession/ResumeSession and tool_references as optional field in ToolResult.