microsoft / microsoft/vscode

Copilot chat with llama.cpp fails on every second request

Open
#336,121 2 comments 0 reactions 1 assignee Claimed by @DonJayamanne View on GitHub
triage-needed
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

1. launch a llama.cpp server with no extra inference/request-related params, in my case:

```
llama serve --offline --model .../DeepSeek-V4-Flash-0731-UD-IQ3_XXS-00001-of-00004.gguf --host 0.0.0.0 --port 60814 --api-key xxx --alias DeepSeek-V4-Flash-0731-UD-IQ3_XXS
```

2. add its endpoint config in chatLanguageModels.json
3. select this model in chat, and set the mode in Agent mode
4. ask a question; then the first request successes (model responses with tool calls, vscode executes tool calls and adds tool responses to the second request), but the second request fails with:

```
Sorry, your request failed. Please try again.

Client Request Id: cf395ae0-f185-44d7-a67c-04b5b20f64d8

Reason: Please check your firewall rules and network connection then try again. Error Code: fetch failed: Headers Timeout Error.: Error: Please check your firewall rules and network connection then try again. Error Code: fetch failed: Headers Timeout Error. at xH._provideLanguageModelResponse (/home/tsan/.vscode-server/cli/servers/Stable-645f29cc3176500b4b5762ba887cf2a7f0ffdf2c/server/extensions/copilot/dist/extension.js:1592:15885) at async xH.provideLanguageModelResponse (/home/tsan/.vscode-server/cli/servers/Stable-645f29cc3176500b4b5762ba887cf2a7f0ffdf2c/server/extensions/copilot/dist/extension.js:1592:16998)
```

the llama.cpp log seems not receiving the second request.

5. click "Try again", then the first request successes, the second request fails with the same error.

Image

VS Code version: Code 1.137.0 (645f29cc3176500b4b5762ba887cf2a7f0ffdf2c, 2026-09-08T13:43:59-07:00)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 6.8.0-1028-intel
Remote OS version: Linux x64 6.8.0-1028-intel
Remote OS version: Linux x64 7.1.13-200.fc44.x86_64
Remote OS version: Linux x64 7.0.4-200.fc44.x86_64
Remote OS version: Linux x64 7.0.4-200.fc44.x86_64

System Info

|Item|Value|
|---|---|
|CPUs|12th Gen Intel(R) Core(TM) i7-12700 (20 x 2112)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x4680 [Intel(R) UHD Graphics 770], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.6647 *ACTIVE*
GPU1: VENDOR= 0x8086, DEVICE=0x4680 [Intel(R) UHD Graphics 770], DRIVER_VERSION=32.0.101.6647
GPU2: VENDOR= 0x8086, DEVICE=0x4680 [Intel(R) UHD Graphics 770], DRIVER_VERSION=32.0.101.6647
GPU3: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.22621.5415
Machine model name:
Machine model version:
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: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|31.70GB (0.94GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: star2|
|OS|Linux x64 6.8.0-1028-intel|
|CPUs|Intel(R) Xeon(R) 6710E (128 x 1349)|
|Memory (System)|755.39GB (694.76GB free)|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: star2|
|OS|Linux x64 6.8.0-1028-intel|
|CPUs|Intel(R) Xeon(R) 6710E (128 x 1600)|
|Memory (System)|755.39GB (694.79GB free)|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: pve2-fedora1|
|OS|Linux x64 7.1.13-200.fc44.x86_64|
|CPUs|12th Gen Intel(R) Core(TM) i7-12700 (16 x 0)|
|Memory (System)|25.41GB (21.77GB free)|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: vm-fedora|
|OS|Linux x64 7.0.4-200.fc44.x86_64|
|CPUs|12th Gen Intel(R) Core(TM) i7-12700 (10 x 0)|
|Memory (System)|10.77GB (4.10GB free)|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: vm-fedora|
|OS|Linux x64 7.0.4-200.fc44.x86_64|
|CPUs|12th Gen Intel(R) Core(TM) i7-12700 (10 x 0)|
|Memory (System)|10.77GB (4.10GB free)|
|VM|0%|
Extensions (28)

Name|Identifier|Author|Version
---|---|---|---
PDF Preview|analytic-signal.preview-pdf|analytic-signal|1.0.0
ANSI Colors|iliazeus.vscode-ansi|iliazeus|1.1.7
OAI Compatible Provider for Copilot|johnny-zhao.oai-compatible-copilot|johnny-zhao|0.4.2
Black Formatter|ms-python.black-formatter|ms-python|2026.6.0
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
isort|ms-python.isort|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
Tinymist Typst|myriad-dreamin.tinymist|myriad-dreamin|0.15.8
rust-analyzer|rust-lang.rust-analyzer|rust-lang|0.3.3041
Cline|saoudrizwan.claude-dev|saoudrizwan|4.1.17
Bookmarks|alefragnani.bookmarks|alefragnani|14.1.1
Auto Close Tag|formulahendry.auto-close-tag|formulahendry|0.5.15
Auto Rename Tag|formulahendry.auto-rename-tag|formulahendry|0.1.10
GitHub Codespaces|github.codespaces|GitHub|1.18.16
GitHub Repositories|github.remotehub|GitHub|0.64.0
Draw.io Integration|hediet.vscode-drawio|hediet|1.9.0
Jupyter Keymap|ms-toolsai.jupyter-keymap|ms-toolsai|1.1.2
Dev Containers|ms-vscode-remote.remote-containers|ms-vscode-remote|0.469.0
Remote - SSH|ms-vscode-remote.remote-ssh|ms-vscode-remote|0.128.0
Remote - SSH: Editing Configuration Files|ms-vscode-remote.remote-ssh-edit|ms-vscode-remote|0.87.0
WSL|ms-vscode-remote.remote-wsl|ms-vscode-remote|0.104.3
Azure Repos|ms-vscode.azure-repos|ms-vscode|0.40.0
Remote Explorer|ms-vscode.remote-explorer|ms-vscode|0.5.0
Remote Repositories|ms-vscode.remote-repositories|ms-vscode|0.42.0
Slint|slint.slint|Slint|1.17.1
LinkerScript|zixuanwang.linkerscript|ZixuanWang|1.0.4

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.