Skip to content

GitHub Copilot provider always fails with "Connection error" for all models #29

Description

@balazs-szekely-semilab

What happened?

Environment

  • Caveman Code: 0.65.2

  • OS: Windows 11

  • Node.js: 20.20.2

  • Installation method:

    npm install -g @juliusbrussee/caveman-code

Description

I am unable to use any model through the GitHub Copilot provider. Every request fails with the generic error message:

Connection error.

The issue occurs consistently across multiple models (Claude, Gemini, and GPT), suggesting the problem is not model-specific.

CLI Output

 cave mode: active | compression: full



 ✓ New session started


│  hello
 Error: Connection error.
 Error: Connection error.
 Error: Connection error.
 Error: Connection error.

 Error: Retry failed after 3 attempts: Connection error.

 Model: gemini-3.1-pro-preview

│  hello
 Error: Connection error.
 Error: Connection error.
 Error: Connection error.
 Error: Connection error.

 Error: Retry failed after 3 attempts: Connection error.

 Model: gpt-5.5

│  hello
 Error: Connection error.
 Error: Connection error.
 Error: Connection error.
 Error: Connection error.

 Error: Retry failed after 3 attempts: Connection error.

Session log:

{"type":"session","version":3,"id":"8ee88b98-2c5f-4b20-9581-4ffef74faab5","timestamp":"2026-06-03T06:05:00.883Z","cwd":"C:\\TestRepo"}
{"type":"model_change","id":"348e5002","parentId":null,"timestamp":"2026-06-03T06:05:00.909Z","provider":"github-copilot","modelId":"claude-sonnet-4.6"}
{"type":"thinking_level_change","id":"47e1aaf4","parentId":"348e5002","timestamp":"2026-06-03T06:05:00.909Z","thinkingLevel":"high"}
{"type":"message","id":"16f60997","parentId":"47e1aaf4","timestamp":"2026-06-03T06:05:17.508Z","message":{"role":"user","content":[{"type":"text","text":"hello"}],"timestamp":1780466717507}}
{"type":"message","id":"216f84e6","parentId":"16f60997","timestamp":"2026-06-03T06:05:19.762Z","message":{"role":"assistant","content":[],"api":"anthropic-messages","provider":"github-copilot","model":"claude-sonnet-4.6","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466717861,"errorMessage":"Connection error."}}
{"type":"message","id":"3d6fc8ca","parentId":"216f84e6","timestamp":"2026-06-03T06:05:23.909Z","message":{"role":"assistant","content":[],"api":"anthropic-messages","provider":"github-copilot","model":"claude-sonnet-4.6","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466721794,"errorMessage":"Connection error."}}
{"type":"message","id":"b588c754","parentId":"3d6fc8ca","timestamp":"2026-06-03T06:05:30.057Z","message":{"role":"assistant","content":[],"api":"anthropic-messages","provider":"github-copilot","model":"claude-sonnet-4.6","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466727928,"errorMessage":"Connection error."}}
{"type":"message","id":"daac02c7","parentId":"b588c754","timestamp":"2026-06-03T06:05:40.007Z","message":{"role":"assistant","content":[],"api":"anthropic-messages","provider":"github-copilot","model":"claude-sonnet-4.6","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466738087,"errorMessage":"Connection error."}}
{"type":"model_change","id":"9c142235","parentId":"daac02c7","timestamp":"2026-06-03T06:06:21.684Z","provider":"github-copilot","modelId":"gemini-3.1-pro-preview"}
{"type":"message","id":"b588bdb1","parentId":"9c142235","timestamp":"2026-06-03T06:06:24.997Z","message":{"role":"user","content":[{"type":"text","text":"hello"}],"timestamp":1780466784996}}
{"type":"message","id":"56a5d3f4","parentId":"b588bdb1","timestamp":"2026-06-03T06:06:27.081Z","message":{"role":"assistant","content":[],"api":"openai-completions","provider":"github-copilot","model":"gemini-3.1-pro-preview","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466785010,"errorMessage":"Connection error."}}
{"type":"message","id":"5f706e3a","parentId":"56a5d3f4","timestamp":"2026-06-03T06:06:30.985Z","message":{"role":"assistant","content":[],"api":"openai-completions","provider":"github-copilot","model":"gemini-3.1-pro-preview","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466789101,"errorMessage":"Connection error."}}
{"type":"message","id":"190614b7","parentId":"5f706e3a","timestamp":"2026-06-03T06:06:37.244Z","message":{"role":"assistant","content":[],"api":"openai-completions","provider":"github-copilot","model":"gemini-3.1-pro-preview","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466795010,"errorMessage":"Connection error."}}
{"type":"message","id":"bfd68fd9","parentId":"190614b7","timestamp":"2026-06-03T06:06:47.396Z","message":{"role":"assistant","content":[],"api":"openai-completions","provider":"github-copilot","model":"gemini-3.1-pro-preview","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466805275,"errorMessage":"Connection error."}}
{"type":"model_change","id":"28997d96","parentId":"bfd68fd9","timestamp":"2026-06-03T06:07:12.923Z","provider":"github-copilot","modelId":"gpt-5.5"}
{"type":"message","id":"cb14d4a9","parentId":"28997d96","timestamp":"2026-06-03T06:07:15.380Z","message":{"role":"user","content":[{"type":"text","text":"hello"}],"timestamp":1780466835380}}
{"type":"message","id":"dbed0a3d","parentId":"cb14d4a9","timestamp":"2026-06-03T06:07:17.426Z","message":{"role":"assistant","content":[],"api":"openai-responses","provider":"github-copilot","model":"gpt-5.5","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466835381,"errorMessage":"Connection error."}}
{"type":"message","id":"870f332d","parentId":"dbed0a3d","timestamp":"2026-06-03T06:07:21.619Z","message":{"role":"assistant","content":[],"api":"openai-responses","provider":"github-copilot","model":"gpt-5.5","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466839448,"errorMessage":"Connection error."}}
{"type":"message","id":"4701f40d","parentId":"870f332d","timestamp":"2026-06-03T06:07:27.671Z","message":{"role":"assistant","content":[],"api":"openai-responses","provider":"github-copilot","model":"gpt-5.5","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466845641,"errorMessage":"Connection error."}}
{"type":"message","id":"1b8c61e8","parentId":"4701f40d","timestamp":"2026-06-03T06:07:37.726Z","message":{"role":"assistant","content":[],"api":"openai-responses","provider":"github-copilot","model":"gpt-5.5","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1780466855697,"errorMessage":"Connection error."}}

caveman doctor output:

  [ok]  Agent dir — C:\Users\balazs.szekely\.cave\agent
  [ok]  stdout is a TTY
  [ok]  Truecolor support (COLORTERM) — truecolor
  [warn] TERM — (empty)
  [info] Terminal program — vscode
  [info] SSH session — no
  [info] Windows Restricted Tokens — Windows sandbox path is preview — running natively under PS
  [ok]  Tool: git — C:\Program Files\Git\cmd\git.exe
  [warn] Tool: rg — missing — optional
  [warn] Tool: fd — missing — optional
  [ok]  Tool: tar — C:\Windows\System32\tar.exe
  [ok]  Tool: curl — C:\Windows\System32\curl.exe
  [warn] Auth — no API keys found in env. Run `caveman login` or set ANTHROPIC_API_KEY / OPENAI_API_KEY / etc.
  [ok]  First-run wizard — completed
  [info] Telemetry — disabled (default)
  [info] MCP config files — no .mcp.json found (project or user). Run `caveman mcp add <name>` to register one.

Summary: 7 ok, 4 warn, 0 fail, 5 info

However, in CLI /login reports GitHub Copilot as authenticated:

Select provider to login:                                                                                          

→ Anthropic (Claude Pro/Max)                                                                                       
  GitHub Copilot ✓ logged in                                                                                       
  Google Cloud Code Assist (Gemini CLI)                                                                            
  Antigravity (Gemini 3, Claude, GPT-OSS)                                                                          
  ChatGPT Plus/Pro (Codex Subscription)             

Any guidance on how to enable more detailed logging for GitHub Copilot requests would also be appreciated.

Steps to reproduce

  1. Start Caveman.

  2. Ensure GitHub Copilot is logged in (/login shows GitHub Copilot as authenticated).

  3. Select any GitHub Copilot model.

  4. Enter a simple prompt such as:

    hello
    

Expected behavior

The selected model should return a normal response.

Version

0.65.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions