Skip to content

Copilot provider: 400 model_not_supported for claude-haiku-5-5 / claude-sonnet-5-5 (stale COPILOT_MODEL_ID_MAPPING) #1022

Closed

Description

@web3wannabe

Summary

Selecting Claude Haiku 5.5 (or Claude Sonnet 5.5) under the GitHub Copilot provider in /model fails on every turn with:

Error: 400 Invalid_request_error The requested model is not supported.

The very same model works fine under the Command Code provider. So it is a Copilot-provider-only failure and does not depend on the user's plan or config.

Root cause

@byokkit/cmd-provider-copilot@0.1.2 (latest) — COPILOT_MODEL_ID_MAPPING in dist/chunk-EO2W2NPS.js maps Command Code hyphenated ids → Copilot dotted ids. That is the intended mechanism (per the comment right above the table: "these now map hyphen→dot like the older Claude ids"), but the table is stale — it is missing the newest Claude 5.5 ids.

toCopilotModelId() falls through (?? modelId), forwards the hyphenated id verbatim, and Copilot rejects it.

var COPILOT_MODEL_ID_MAPPING = {
  "claude-fable-5-1": "claude-fable-5.1",
  "claude-opus-5-5":  "claude-opus-5.5",   // present → works
  "claude-sonnet-4-6":"claude-sonnet-4.6",
  "claude-opus-4-8":  "claude-opus-4.8",
  "claude-opus-4-7":  "claude-opus-4.7",
  "claude-opus-4-6":  "claude-opus-4.6",
  "claude-haiku-4-5-20251001": "claude-haiku-4.5"
  // missing:
  // "claude-haiku-5-5":  "claude-haiku-5.5"
  // "claude-sonnet-5-5": "claude-sonnet-5.5"
};

Proof (direct Copilot API, provider's own headers)

POST https://api.githubcopilot.com/chat/completions, Copilot-Integration-Id: vscode-chat:

model id sent result
claude-haiku-5-5 400 {"message":"The requested model is not supported.","code":"model_not_supported","type":"invalid_request_error"}
claude-haiku-5.5 200
claude-sonnet-5-5 400
claude-sonnet-5.5 200
claude-opus-5-5 200 (present in the table → works)

Copilot's own /models list advertises claude-haiku-5.5, claude-sonnet-5.5, claude-opus-5.5 (dotted), confirming the target id form.

Expected

Claude Haiku 5.5 / Sonnet 5.5 work under the GitHub Copilot provider exactly like they do under the Command Code provider.

Fix

Extend COPILOT_MODEL_ID_MAPPING with the missing 5.5 entries:

   "claude-fable-5-1": "claude-fable-5.1",
   "claude-opus-5-5": "claude-opus-5.5",
+  "claude-sonnet-5-5": "claude-sonnet-5.5",
+  "claude-haiku-5-5": "claude-haiku-5.5",

Environment

  • Command Code CLI v1.82.1 (latest)
  • @byokkit/cmd-provider-copilot@0.1.2 (latest; no newer version published)
  • macOS arm64 · zsh
  • Trace IDs: 42684743eb4a6478f6dbef94e0990651, 51fdad26433974c045ae0e67a301dac1, d9795050afa64495e9a96fd6a51772f2

Related but separate: #738 (GPT-lane summaryParts crash on Copilot's Responses API).

Activity

  1. web3wannabe commented on Oct 14, 2026

    @web3wannabe
    Author

    Proposed fix (verified)

    File: @byokkit/cmd-provider-copilot@0.1.2 → dist/chunk-EO2W2NPS.js → COPILOT_MODEL_ID_MAPPING

    Add the two missing hyphen→dot entries:

       "claude-fable-5-1": "claude-fable-5.1",
       "claude-opus-5-5": "claude-opus-5.5",
    +  "claude-sonnet-5-5": "claude-sonnet-5.5",
    +  "claude-haiku-5-5": "claude-haiku-5.5",

    Why this works: toCopilotModelId() is MAPPING[id] ?? id, so with these entries the provider emits the exact dotted id Copilot accepts instead of forwarding the hyphenated one verbatim.

    Verified after applying the patch to the installed package:

    toCopilotModelId("claude-haiku-5-5")  -> "claude-haiku-5.5"
    toCopilotModelId("claude-sonnet-5-5") -> "claude-sonnet-5.5"
    

    and a direct POST https://api.githubcopilot.com/chat/completions with those dotted ids returns 200 (the hyphenated ids return the 400 model_not_supported shown in the report).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions