-
-
Notifications
You must be signed in to change notification settings - Fork 360
Description
Description
When using copilot-api with Claude Code, the WebSearch tool returns "did 0 searches" and fails to perform any web searches.
Environment
- copilot-api version: latest
- Client: Claude Code CLI
- GitHub Copilot subscription: Active
Steps to Reproduce
- Start copilot-api server
- Configure Claude Code to use copilot-api as the API endpoint
- Ask Claude Code a question that triggers the WebSearch tool (e.g., "Search the web for the latest Node.js LTS version")
- Observe that the response indicates "did 0 searches"
Expected Behavior
Web search should return results, similar to how it works in VS Code Copilot Chat with @github #web or when Bing search is enabled.
Actual Behavior
The WebSearch tool is passed through as a regular function tool, but GitHub Copilot doesn't recognize or execute it, resulting in no searches being performed.
Root Cause Analysis
Based on research, GitHub Copilot's web search works differently than expected:
-
Bing Search is server-side: When "Copilot Access to Bing" is enabled in GitHub settings, Copilot automatically triggers Bing search based on query context - it's NOT exposed as an explicit function/tool call in the API.
-
VS Code's
#fetchtool is client-side: The#fetchtool in VS Code Copilot Chat is executed locally by VS Code, not by the Copilot API. -
Current behavior: copilot-api translates Claude Code's
WebSearchtool to an OpenAI-style function tool, but Copilot API doesn't recognize it as its own internal capability.