openclaw - 💡(How to fix) Fix [Bug]: GitHub Copilot image tool requests are routed as copilot-language-server despite Copilot-Integration-Id: vscode-chat, causing model availability mismatch (400) [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Image tool requests through GitHub Copilot fail with HTTP 400 because the server reports integrator copilot-language-server and rejects model github-copilot/gemini-3.1-pro-preview, while the OpenClaw request path sets Copilot-Integration-Id: vscode-chat.

Error Message

Observe tool failure with HTTP 400 and error text: Observed error payload includes:

Root Cause

Image tool requests through GitHub Copilot fail with HTTP 400 because the server reports integrator copilot-language-server and rejects model github-copilot/gemini-3.1-pro-preview, while the OpenClaw request path sets Copilot-Integration-Id: vscode-chat.

Fix Action

Fixed

Code Example

Root Cause Analysis:
The issue lies in the initial token exchange process. When OpenClaw calls resolveCopilotApiToken to request /v2/token, it fails to explicitly identify itself as vscode-chat in the request headers/body. As a fallback, GitHub issues a temporary Copilot API token with the restricted copilot-language-server scope.

Since the permission boundaries are locked and encoded directly within this generated token, any subsequent attempts to override the integration ID by injecting Copilot-Integration-Id: vscode-chat into the chat/completions request headers are ignored by the server. The backend strictly honors the claims baked into the token.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Image tool requests through GitHub Copilot fail with HTTP 400 because the server reports integrator copilot-language-server and rejects model github-copilot/gemini-3.1-pro-preview, while the OpenClaw request path sets Copilot-Integration-Id: vscode-chat.

Steps to reproduce

Configure OpenClaw to use the GitHub Copilot provider for image tool calls. Trigger an image tool request using model github-copilot/gemini-3.1-pro-preview. Observe tool failure with HTTP 400 and error text: The requested model is not available for integrator "copilot-language-server"... Verify the correct Copilot-Integration-Id header is being sent.

<img width="1959" height="902" alt="Image" src="https://github.com/user-attachments/assets/3d509fdb-248e-432c-9852-5d37e81d5aa7" />

Expected behavior

The request should succeed for the selected model, or OpenClaw should pre-detect incompatibility and select a supported model before sending the request.

<img width="1641" height="970" alt="Image" src="https://github.com/user-attachments/assets/b7eb8238-d164-4f07-9f3e-f5322805c96b" />

Actual behavior

The image tool request fails with HTTP 400. Observed error payload includes:

integrator: copilot-language-server requested model: github-copilot/gemini-3.1-pro-preview message: model not available for that integrator and header verification hint.

<img width="1285" height="959" alt="Image" src="https://github.com/user-attachments/assets/06f81213-453a-424b-a5c1-a31287229273" />

OpenClaw version

2026.5.7 (eeef486)

Operating system

wsl2 on windows 11

Install method

installer script: curl -fsSL https://openclaw.ai/install.sh | bash

Model

github-copilot/gemini-3.1-pro-preview

Provider / routing chain

openclaw -> github-copilot provider -> image tool

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Root Cause Analysis:
The issue lies in the initial token exchange process. When OpenClaw calls resolveCopilotApiToken to request /v2/token, it fails to explicitly identify itself as vscode-chat in the request headers/body. As a fallback, GitHub issues a temporary Copilot API token with the restricted copilot-language-server scope.

Since the permission boundaries are locked and encoded directly within this generated token, any subsequent attempts to override the integration ID by injecting Copilot-Integration-Id: vscode-chat into the chat/completions request headers are ignored by the server. The backend strictly honors the claims baked into the token.

Impact and severity

No response

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The request should succeed for the selected model, or OpenClaw should pre-detect incompatibility and select a supported model before sending the request.

<img width="1641" height="970" alt="Image" src="https://github.com/user-attachments/assets/b7eb8238-d164-4f07-9f3e-f5322805c96b" />

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: GitHub Copilot image tool requests are routed as copilot-language-server despite Copilot-Integration-Id: vscode-chat, causing model availability mismatch (400) [1 pull requests]