Skip to content

Model call failed: {"message":"tools: Tool names must be unique.","code":"invalid_request_body"} #456

@doggy8088

Description

@doggy8088

Describe the bug

Start from today. The error keeps appearing.

 Welcome to GitHub Copilot CLI
 Version 0.0.353 · Commit f8fd3e3

 Copilot can write, test and debug code right from your terminal. Describe a task to get started or enter ? for help. Copilot uses
  AI, check for mistakes.

 ● Logged in with gh as user: doggy8088

 ● Configured MCP servers: Context7, chrome-devtools

 ● Connected to GitHub MCP Server

 > hi

 ✗ Model call failed: {"message":"tools: Tool names must be unique.","code":"invalid_request_body"} (Request ID:
   EBA2:1C5BEE:2291FC:27985E:6908E7A8)

 ✗ Model call failed: {"message":"tools: Tool names must be unique.","code":"invalid_request_body"} (Request ID:
   EBA2:1C5BEE:22AD20:27B7E0:6908E7A9)
Image

Affected version

0.0.353 Commit: f8fd3e3

Steps to reproduce the behavior

  1. Run copilot --allow-all-tools --allow-all-path
  2. Type hi

Expected behavior

I expected to run without error.

Additional context

I tried to remove ~/.copilot/mcp-config.json file. The error still happen.

I suspect the problem is caused by the GitHub MCP Server. But, even I disabled GitHub MCP Server. The error still exist.

Image

Logs:

2025-11-03T17:46:39.155Z [ERROR] {
  "stack": "CAPIError: 400 tools: Tool names must be unique.\n    at t.fromAPIError (file:///home/will/.nvm/versions/node/v22.16.0/lib/node_modules/@github/copilot/index.js:1905:898)\n    at J1e.getCompletionWithTools (file:///home/will/.nvm/versions/node/v22.16.0/lib/node_modules/@github/copilot/index.js:1905:5284)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Ude.getCompletionWithTools (file:///home/will/.nvm/versions/node/v22.16.0/lib/node_modules/@github/copilot/index.js:1906:1431)\n    at async Bil (file:///home/will/.nvm/versions/node/v22.16.0/lib/node_modules/@github/copilot/index.js:2456:573)\n    at async t.getCompletionWithTools (file:///home/will/.nvm/versions/node/v22.16.0/lib/node_modules/@github/copilot/index.js:2460:58389)\n    at async z7n (file:///home/will/.nvm/versions/node/v22.16.0/lib/node_modules/@github/copilot/index.js:2486:19713)\n    at async epl (file:///home/will/.nvm/versions/node/v22.16.0/lib/node_modules/@github/copilot/index.js:2486:16987)",
  "message": "400 tools: Tool names must be unique.",
  "status": 400,
  "headers": {},
  "requestID": "00000-b3d6972e-aa67-4600-9393-c0ded6b0bc62",
  "error": {
    "message": "tools: Tool names must be unique.",
    "code": "invalid_request_body"
  },
  "code": "invalid_request_body",
  "request_id": "00000-b3d6972e-aa67-4600-9393-c0ded6b0bc62",
  "ghRequestId": "EBB2:CA1DD:28404A:2E68C1:6908EA7D",
  "name": "CAPIError"
}

After removing the .github/agents/ folder, everything is working correctly now. I believe the error message could be improved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions