`reasoningEffort` setting is applied to the wrong custom endpoint

Open
#320,805 2 comments 0 reactions 1 assignee View on GitHub

@justschen is already working on this.

Since Jun 10, 2026.

Assessment

This issue has not been assessed yet.

Description

Bug: reasoningEffort setting is applied to the wrong custom endpoint due to index mismatch (UI alphabetical sorting vs. array order)

Info

  • Copilot Chat Extension Version: built-in
  • VS Code Version: 1.124.0 (Universal)
  • OS Version:
  • Feature (e.g. agent/edit/ask mode): Chat UI
  • Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): all
  • Logs:

Description

When modifying the reasoningEffort for a custom endpoint via the Copilot Chat UI, the setting is incorrectly mapped back to the underlying configuration array using its sorted UI index, rather than its unique name or identifier.

Example: (Full example see below)
Given the following original configuration array:

[
  {"name": "Copilot", ...},          // Array index 0
  {"name": "B CustomEndpoint", ...}, // Array index 1
  {"name": "A CustomEndpoint", ...}  // Array index 2
]

Since the Chat UI sorts the endpoints alphabetically, "A CustomEndpoint" is displayed before "B CustomEndpoint".

When attempting to change the reasoningEffort for "A CustomEndpoint" in the UI, the system uses the alphabetical index (index 1) and incorrectly applies the setting to the object at index 1 of the original array (which is "B CustomEndpoint").

As a result, the following object is mistakenly injected into "B CustomEndpoint":

[
  {"name": "Copilot", ...},
  {
    "name": "B CustomEndpoint", ...,
    "settings": {
      "model-b": {
        "reasoningEffort": "high"
      }
  },
  {"name": "A CustomEndpoint", ...}

Expected Behavior

The UI should map the reasoningEffort update using the endpoint's name or ID to look up the correct object in the array, rather than relying on the array index which breaks when the UI list is sorted.

Full Example

Before selecting thinking effort in UI:

[
  {
    "name": "B CustomEndpoint",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.e079954}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "b-ai-1",
        "name": "B-AI-1",
        "url": "https://[redacted].com/v1/chat/completions",
        "apiType": "chat-completions",
        "toolCalling": true,
        "vision": true,
        "thinking": true,
        "maxInputTokens": 400000,
        "maxOutputTokens": 128000,
        "supportsReasoningEffort": ["none", "low", "medium", "high", "xhigh"]
      }
    ]
  },
  {
    "name": "A CustomEndpoint",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.e079954}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "a-ai-1",
        "name": "A-AI-1",
        "url": "https://[redacted].com/v1/chat/completions",
        "apiType": "chat-completions",
        "toolCalling": true,
        "vision": true,
        "thinking": true,
        "maxInputTokens": 400000,
        "maxOutputTokens": 128000,
        "supportsReasoningEffort": ["low", "medium", "high", "max"]
      }
    ]
  }
]

After:

[
  {
    "name": "B CustomEndpoint",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.e079954}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "b-ai-1",
        "name": "B-AI-1",
        "url": "https://[redacted].com/v1/chat/completions",
        "apiType": "chat-completions",
        "toolCalling": true,
        "vision": true,
        "thinking": true,
        "maxInputTokens": 400000,
        "maxOutputTokens": 128000,
        "supportsReasoningEffort": ["none", "low", "medium", "high", "xhigh"]
      }
    ],
    "settings": {
      "a-ai-1": {
        "reasoningEffort": "max"
      }
    }
  },
  {
    "name": "A CustomEndpoint",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.e079954}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "a-ai-1",
        "name": "A-AI-1",
        "url": "https://[redacted].com/v1/chat/completions",
        "apiType": "chat-completions",
        "toolCalling": true,
        "vision": true,
        "thinking": true,
        "maxInputTokens": 400000,
        "maxOutputTokens": 128000,
        "supportsReasoningEffort": ["low", "medium", "high", "max"]
      }
    ]
  }
]
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.