JSON Schema format for defining tools does not conform to OpenAI's specification

Open
#320,926 1 comment 0 reactions 1 assignee View on GitHub

@vritant24 is already working on this.

Since Jun 11, 2026.

Assessment

This issue has not been assessed yet.

Description

  • Copilot Chat Extension Version: 0.52.0

  • VS Code Version: 1.124.0

  • OS Version: Windows 11 25H2 26200.8246

  • Feature (e.g. agent/edit/ask mode): Custom endpoint/agent

  • Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Custom endpoint

  • Logs:
    2026-06-11 16:39:14.074 [trace] SSE: {"code":"InvalidParameter","message":"<400> InternalError.Algo.InvalidParameter: The parameters, when provided as a dict, must confirm to a valid openai-compatible JSON schema. Please check the schema definition for tool: terminal_selection.","request_id":"xxxxxx"}
    2026-06-11 16:39:14.075 [info] ccreq:d2d5dcce.copilotmd | unknown | qwen3.7-plus | 383ms | [copilotLanguageModelWrapper]
    2026-06-11 16:39:14.105 [info] [ToolCallingLoop] Stop hook result: shouldContinue=false, reasons=undefined

  • Tool Definition:
    {
    "name": "terminal_last_command",
    "description": "Get the last command run in the active terminal.",
    "parameters": {},
    "type": "function",
    "strict": false
    },
    {
    "name": "terminal_selection",
    "description": "Get the current selection in the active terminal.",
    "parameters": {},
    "type": "function",
    "strict": false
    },

Steps to Reproduce:

1.Add custom endpoints using responses api provide by Aliyun(https://dashscope-us.aliyuncs.com/compatible-mode/v1)
2.Create an agent chat.
3.It will throw an expection because tools' parameters are null dicts instead of {"type": "object", "properties": {}}

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.