Repository navigation
Description
- Copilot Chat Extension Version: 0.48.2026051101 in VS Code Insiders; 0.47.0 in Stable
- VS Code Version: 1.120.0-insider, commit 05ca786, date 2026-05-11T03:48:51Z. Also observed in Stable 1.119.0.
- OS Version: macOS 26.4.1 (25E253), arm64
- Feature (e.g. agent/edit/ask mode): Chat/model picker/model fetch
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): none; models fail to load
- Logs:
GitHub Copilot Chat output repeatedly shows:
TypeError: Cannot convert argument to a ByteString because the character at index 0 has a value of 65279 which is greater than 255.
at webidl.converters.ByteString (node:internal/deps/undici/undici:4005:17)
at Object.record<ByteString, ByteString> (node:internal/deps/undici/undici:3912:32)
at webidl.converters.HeadersInit (node:internal/deps/undici/undici:9210:67)
at Object.RequestInit (node:internal/deps/undici/undici:3968:21)
at new Request (node:internal/deps/undici/undici:9767:34)
...
at async US._fetchModels (.../extensions/copilot/dist/extension.js:7036:4553): Failed to fetch models
The UI shows Language model unavailable, and the Language Models view shows no Copilot auto mode endpoints.
Root-cause evidence from local VS Code storage:
~/Library/Application Support/Code/User/globalStorage/storage.jsoncontained a UTF-8 BOM (U+FEFF, decimal65279) at the start oftelemetry.devDeviceId.~/Library/Application Support/Code - Insiders/User/globalStorage/storage.jsonalso contained the same BOM at the start oftelemetry.devDeviceId.- Removing only that BOM while VS Code was closed fixed model fetching.
- If VS Code Insiders remains running, it rewrites the bad in-memory value back to disk, causing the issue to recur.
- Stable stayed clean after the repair, while Insiders reintroduced the BOM in
telemetry.devDeviceIdafter restart/runtime.
No GitHub auth or network change was required; the failure appears to happen before/while constructing fetch headers because the BOM-containing devDeviceId is passed into request metadata/header construction.
Steps to Reproduce:
- Have
telemetry.devDeviceIdin VS Code global storage begin withU+FEFF/ UTF-8 BOM. - Start VS Code / VS Code Insiders with GitHub Copilot Chat enabled.
- Open Copilot Chat or the Language Models picker.
- Observe
Language model unavailableand repeatedCannot convert argument to a ByteString... value of 65279errors while fetching models.
Expected:
Copilot should either sanitize/strip invalid characters from devDeviceId before using it in request headers/metadata, or regenerate the value if it is malformed.
Actual:
Model fetching fails completely until the hidden BOM is manually removed from telemetry.devDeviceId while VS Code is closed.
Related: #314693 reports the same 65279 ByteString failure but does not identify telemetry.devDeviceId as the corrupt value.
Activity
lramos15 commentedon May 11, 2026
Upstream issue microsoft/vscode-deviceid#34