microsoft / microsoft/vscode

BYOK: Can't use local model when VS Code Window is started without internet

Open
#324,245 0 comments 0 reactions 1 assignee Claimed by @vritant24 View on GitHub
bug model-byok
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

### Description

When I have a VS Code window that was started without internet connection, I can't use locally hosted models and get the error `Language model unavailable`.
It works fine on a window that was started with internet connection and disabled later. See video below

### Issue Details

Item|Value
---|---
Issue Category|Bug
Target|Visual Studio Code - Insiders
VS Code Version|Code - Insiders 1.128.0-insider (2be9624b801009a53db8f629bd7762137d100007, 2026-07-02T16:57:42Z)
OS Version|Darwin arm64 25.5.0

System Info

Item|Value
---|---
VS Code Version|Code - Insiders 1.128.0-insider (2be9624b801009a53db8f629bd7762137d100007, 2026-07-02T16:57:42Z)
OS Version|Darwin arm64 25.5.0
CPUs|Apple M5 Max (18 x 2400)
GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M5 Max, Version 26.5 (Build 25F71))], DRIVER_VENDOR=Apple, DRIVER_VERSION=26.5 *ACTIVE*
Machine model name: Mac
Machine model version: 17.6
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg)|5, 8, 8
Memory (System)|128.00GB (0.96GB free)
Process Argv|--crash-reporter-id f3441869-abe8-416f-bbd5-01c71ecec52f
Screen Reader|no
VM|0%
User Agent|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Code-Insiders/1.128.0-insider Chrome/148.0.7778.271 Electron/42.5.0 Safari/537.36
Installation pure|true

Extensions (37)

Name|Identifier|Author|Version
---|---|---|---
Ruff|charliermarsh.ruff|charliermarsh|2026.56.0
esbuild Problem Matchers|connor4312.esbuild-problem-matchers|connor4312|0.0.3
Dart|dart-code.dart-code|Dart-Code|3.139.20260702
ESLint|dbaeumer.vscode-eslint|dbaeumer|3.0.33
Paste as Markdown|digitarald.paste-as-markdown|digitarald|0.3.2
EditorConfig|editorconfig.editorconfig|EditorConfig|0.18.2
GitHub Actions|github.vscode-github-actions|github|0.32.1
GitHub Pull Requests|github.vscode-pull-request-github|GitHub|0.155.2026070310
Bicep|ms-azuretools.vscode-bicep|ms-azuretools|0.44.1
Container Tools|ms-azuretools.vscode-containers|ms-azuretools|2.4.5
Spanish Language Pack for Visual Studio Code|ms-ceintl.vscode-language-pack-es|MS-CEINTL|1.127.2026070311
.NET Install Tool|ms-dotnettools.vscode-dotnet-runtime|ms-dotnettools|3.1.0
PostgreSQL|ms-ossdata.vscode-pgsql|ms-ossdata|1.26.0
Python Debugger|ms-python.debugpy|ms-python|2026.7.11831007
Python|ms-python.python|ms-python|2026.5.2026061001
Pylance|ms-python.vscode-pylance|ms-python|2026.2.107
Python Environments|ms-python.vscode-python-envs|ms-python|1.37.2026070201
Data Wrangler|ms-toolsai.datawrangler|ms-toolsai|1.24.2
Jupyter|ms-toolsai.jupyter|ms-toolsai|2026.6.2026061001
Jupyter Keymap|ms-toolsai.jupyter-keymap|ms-toolsai|1.1.2
Jupyter Notebook Renderers|ms-toolsai.jupyter-renderers|ms-toolsai|1.3.2025062701
Jupyter Cell Tags|ms-toolsai.vscode-jupyter-cell-tags|ms-toolsai|0.1.9
Jupyter Slide Show|ms-toolsai.vscode-jupyter-slideshow|ms-toolsai|0.1.6
Dev Containers|ms-vscode-remote.remote-containers|ms-vscode-remote|0.464.0
Extension Test Runner|ms-vscode.extension-test-runner|ms-vscode|0.0.14
Akusto Explorer|ms-vscode.kusto-client|ms-vscode|0.5.2026061601
PowerShell|ms-vscode.powershell|ms-vscode|2025.4.0
TS/JS VS Code Customized Language Service|ms-vscode.ts-customized-language-service|ms-vscode|1.1.2026062202
Chat Customizations Evaluations|ms-vscode.vscode-chat-customizations-evaluations|ms-vscode|1.1.2026062409
GitHub Issue Notebooks|ms-vscode.vscode-github-issue-notebooks|ms-vscode|0.0.134
VS Code Team Tools|ms-vscode.vscode-team-tools|ms-vscode|0.1.2026062603
Codex – OpenAI’s coding agent|openai.chatgpt|openai|26.5623.101652
Protobuf (Protocol Buffers)|pbkit.vscode-pbkit|pbkit|0.0.8
Excalidraw|pomdtr.excalidraw-editor|pomdtr|3.9.3
CSV|repreng.csv|ReprEng|1.3.0
TypeScript (Native Preview)|typescriptteam.native-preview|TypeScriptTeam|0.20260703.1
Vitest|vitest.explorer|vitest|1.50.7

Theme extensions: 9

A/B Experiments

```
vsliv368:30146709
pythonvspyt551:31249597
nativeloc1:31118317
dwcopilot:31158714
dwoutputs:31242946
copilot_t_ci:31333650
g012b348:31231168
pythonrdcb7:31268811
pythonpcpt1cf:31399617
6518g693:31302842
6abeh943:31336334
envsactivate1:31349248
editstats-enabled:31346256
cloudbuttont:31366566
3efgi100_wstrepl:31403338
cp_cls_t_966_ss:31526232
4je02754:31481634
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490507
cp_cls_c_1081:31454833
conptydll_true:31485575
ia-use-proxy-models-svc:31446143
e9c30283:31453065
test_treatment2:31471001
46204921:31447328
idci7584:31454084
e3e4d672:31454087
ei9d7968:31462942
nes-extended-on:31455475
89g7j272:31506658
7e884298:31462391
7e187181:31482583
i2gc6536:31472020
52612955:31508042
h08i8180:31475367
ddid_c:31478205
hmra_i5g22:-9
7df3h592:31491241
cp_cls_t_1082:31535311
cc5hd740:31492954
logging_enabled_new:31490725
jb_cp_cls_t_632:31543129
32d76977:31503652
ha629193:31508444
cdk-lw-on:31524445
nes-vscode-team-custom-1:31540236
f9bf7985:31514991
31fi7170_t:31517328
a1ije391_t:31533808
api_cot_ctrl:31509853
g4a0e106:31510899
41836166:31537719
prpt_ctrl:31513638
jbcp_cls_pctr_t:31531130
3f904173:31522231
cp_intellij_c_nes:31533503
jf4hg949:31526829
hide-eh-duplicates:31533831
h561g132:31531228
ah-cli-default-hide-local:31534101
ihg5j128:31534457
f412h606:31540278
b1c25fc8:31539904
max-result-20:31544850
sandbox-ui-on-2:31543161
```

### Attachments

![screenshot-1.png](https://github.com/user-attachments/assets/0536d60f-78a8-435d-a8b8-ed85160a1305)

https://github.com/user-attachments/assets/aa3e935c-15f4-44d0-a075-2dca0c95a192

```
2026-07-03 17:31:05.262 [info] Logged in as Giuspepe
2026-07-03 17:31:05.265 [info] FetcherService: electron-fetch failed with error: net::ERR_INTERNET_DISCONNECTED
2026-07-03 17:31:05.271 [info] FetcherService: electron-fetch failed with error: net::ERR_INTERNET_DISCONNECTED
2026-07-03 17:31:05.275 [info] FetcherService: node-fetch failed with error: fetch failed
2026-07-03 17:31:05.279 [info] FetcherService: node-fetch failed with error: fetch failed
2026-07-03 17:31:05.282 [info] FetcherService: node-http failed with error: getaddrinfo ENOTFOUND api.github.com
2026-07-03 17:31:05.283 [warning] Failed to get copilot token due to fetch throwing: net::ERR_INTERNET_DISCONNECTED
2026-07-03 17:31:05.283 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2026-07-03 17:31:05.283 [error] Error: Failed to get copilot token. reason: RequestFailed
at loe._authShowWarnings (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1723:19165)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async loe.getCopilotToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1723:16686)
at async Jhe.getCopilotToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1380:9944)
at async rie._getToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1690:9523)
at async rie._provideLanguageModelChatInfo (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1690:3198)
at async Kd.$provideLanguageModelChatInfo (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:536:41825)
2026-07-03 17:31:05.283 [info] FetcherService: node-http failed with error: getaddrinfo ENOTFOUND api.github.com
2026-07-03 17:31:05.285 [info] Logged in as Giuspepe
2026-07-03 17:31:05.287 [info] FetcherService: electron-fetch failed with error: net::ERR_INTERNET_DISCONNECTED
2026-07-03 17:31:05.292 [info] FetcherService: electron-fetch failed with error: net::ERR_INTERNET_DISCONNECTED
2026-07-03 17:31:05.296 [info] FetcherService: node-fetch failed with error: fetch failed
2026-07-03 17:31:05.300 [info] FetcherService: node-fetch failed with error: fetch failed
2026-07-03 17:31:05.304 [info] FetcherService: node-http failed with error: getaddrinfo ENOTFOUND api.github.com
2026-07-03 17:31:05.304 [warning] Failed to get copilot token due to fetch throwing: net::ERR_INTERNET_DISCONNECTED
2026-07-03 17:31:05.304 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2026-07-03 17:31:05.304 [error] Error: Failed to get copilot token. reason: RequestFailed
at loe._authShowWarnings (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1723:19165)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async loe.getCopilotToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1723:16686)
at async Jhe.getCopilotToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1380:9944)
at async rie._getToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1690:9523)
at async rie._provideLanguageModelChatInfo (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/copilot/dist/extension.js:1690:3198)
at async Kd.$provideLanguageModelChatInfo (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:536:41825)
2026-07-03 17:31:05.304 [info] FetcherService: node-http failed with error: getaddrinfo ENOTFOUND api.github.com
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.