Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: address review findings from PR #523
- Fix Python tests: add missing required argument to create_session() calls
- Fix Go: separate misplaced buildUnsupportedToolResult doc comment from mergeExcludedTools
- Fix Go sample: whitespace alignment from merge

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Loading branch information
patniko and Copilot committed Feb 27, 2026
commit 7a753ebea75de886b3b025f738e68292a26b8520
2 changes: 1 addition & 1 deletion go/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,6 @@ func buildFailedToolResult(internalError string) ToolResult {
}
}

// buildUnsupportedToolResult creates a failure ToolResult for an unsupported tool.
// mergeExcludedTools returns a deduplicated list combining excludedTools with
// the names of any SDK-registered tools, so the CLI won't handle them.
func mergeExcludedTools(excludedTools []string, tools []Tool) []string {
Expand All @@ -1377,6 +1376,7 @@ func mergeExcludedTools(excludedTools []string, tools []Tool) []string {
return merged
}

// buildUnsupportedToolResult creates a failure ToolResult for an unsupported tool.
func buildUnsupportedToolResult(toolName string) ToolResult {
return ToolResult{
TextResultForLLM: fmt.Sprintf("Tool '%s' is not supported by this client instance.", toolName),
Expand Down
4 changes: 2 additions & 2 deletions python/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ async def mock_request(method, params):
return await original_request(method, params)

client._client.request = mock_request
await client.create_session()
await client.create_session({})
assert "excludedTools" not in captured["session.create"]
finally:
await client.force_stop()
Expand All @@ -255,7 +255,7 @@ async def test_resume_session_adds_tools_to_excluded(self):
await client.start()

try:
session = await client.create_session()
session = await client.create_session({})

captured = {}
original_request = client._client.request
Expand Down
2 changes: 1 addition & 1 deletion test/scenarios/tools/tool-overrides/go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
defer client.Stop()

session, err := client.CreateSession(ctx, &copilot.SessionConfig{
Model: "claude-haiku-4.5",
Model: "claude-haiku-4.5",
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
Tools: []copilot.Tool{
copilot.DefineTool("grep", "A custom grep implementation that overrides the built-in",
Expand Down
Loading