OpenClaw + GitHub Copilot GPT-5.4 技术修复指南

OpenClaw + GitHub Copilot GPT-5.4 Technical Fix Guide

Date: 2026-03-07

Overview

This guide documents how to make github-copilot/gpt-5.4 work inside OpenClaw when the model already works in OpenCode but fails in OpenClaw.

The final solution requires both:

  1. a config fix in ~/.openclaw/openclaw.json
  2. a runtime patch in the installed OpenClaw bundle

This is necessary because the problem is not only model registration. It is also an OpenClaw transport-routing issue for GitHub Copilot Responses API traffic.

Symptoms

The following errors may appear during debugging:

Symptom 1: model rejected

github-copilot/gpt-5.4 ... not allowed 

Symptom 2: IDE auth header missing

HTTP 400: bad request: missing Editor-Version header for IDE auth 

Symptom 3: unsupported provider mode

No API provider registered for api: github-copilot 

Symptom 4: wrong endpoint

HTTP 400: model "gpt-5.4" is not accessible via the /chat/completions endpoint 

Symptom 5: gateway instability

gateway disconnected: closed | idle 

Root Cause Analysis

There are four distinct problems.

1. Model config and allowlist mismatch

OpenClaw could see the provider, but github-copilot/gpt-5.4 was not fully wired into the active model config path used by the agent defaults.

2. Missing GitHub Copilot IDE headers

GitHub Copilot requires IDE-style headers for auth. OpenClaw was sending requests through a generic OpenAI-compatible path, so required headers were not included.

Required headers:

User-Agent: GitHubCopilotChat/0.35.0 Editor-Version: vscode/1.107.0 Editor-Plugin-Version: copilot-chat/0.35.0 Copilot-Integration-Id: vscode-chat 

Without them, Copilot returns:

missing Editor-Version header for IDE auth 

3. GPT-5.4 is not a Chat Completions model

gpt-5.4 must use the Responses API, not /chat/completions.

So this is wrong for gpt-5.4:

"api":"openai-completions"

This is required instead:

"api":"openai-responses"

4. OpenClaw transport routing only handled openai, not github-copilot

Even after changing gpt-5.4 to openai-responses, OpenClaw still fell back to the generic stream path because its embedded runner only activated the Responses transport for provider openai.

That caused OpenClaw to keep hitting /chat/completions for GitHub Copilot GPT-5.4.

Files Involved

Config file

~/.openclaw/openclaw.json

Installed OpenClaw runtime bundle

/home/water/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/reply-DhtejUNZ.js

Reapply script

~/.openclaw/workspace/ken-patchs/reapply-openclaw-copilot-gpt54-patches.mjs

Step 1: Fix the OpenClaw config

Update the GitHub Copilot provider block in ~/.openclaw/openclaw.json.

Provider-level requirements

Use:

"baseUrl":"https://api.individual.githubcopilot.com","api":"openai-completions"

Why keep provider API as openai-completions?

  • OpenClaw runtime expects the provider to stay on a supported generic adapter path
  • switching the entire provider to github-copilot caused runtime/provider registration failures

Model-level requirements for GPT-5.4

Set the gpt-5.4 model entry to:

{"id":"gpt-5.4","name":"GPT-5.4","api":"openai-responses","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":128000,"maxTokens":64000}

Agent model registration

Make sure this exists:

"agents":{"defaults":{"models":{"github-copilot/gpt-5.4":{}}}}

Step 2: Patch OpenClaw to inject Copilot IDE headers

OpenClaw needs to attach Copilot IDE headers before sending provider requests.

In /home/water/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/reply-DhtejUNZ.js, add a wrapper like this near the other provider wrappers:

constGITHUB_COPILOT_IDE_HEADERS={"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"};functioncreateGitHubCopilotHeadersWrapper(baseStreamFn){const underlying = baseStreamFn ?? streamSimple;return(model, context, options)=>{returnunderlying(model, context,{...options,headers:{...GITHUB_COPILOT_IDE_HEADERS,...options?.headers }});};}

Then apply it inside the provider wrapper logic:

if(provider ==="github-copilot") agent.streamFn =createGitHubCopilotHeadersWrapper(agent.streamFn);

Step 3: Patch OpenClaw to route GitHub Copilot Responses correctly

Find the branch that decides which stream transport to use.

Original behavior:

}elseif(params.model.api ==="openai-responses"&& params.provider ==="openai"){

Replace it with:

}elseif(params.model.api ==="openai-responses"&&(params.provider ==="openai"|| params.provider ==="github-copilot")){

Why this matters:

  • before the patch, github-copilot never entered the Responses transport branch
  • OpenClaw fell back to streamSimple
  • streamSimple hit /chat/completions
  • GPT-5.4 rejected that endpoint

After this patch:

  • github-copilot + openai-responses uses the correct Responses transport
  • GPT-5.4 no longer falls back to Chat Completions

Step 4: Validate and restart

Validate config JSON

node-e"JSON.parse(require('fs').readFileSync('/home/water/.openclaw/openclaw.json','utf8')); console.log('OK')"

Validate patched bundle syntax

node--check"/home/water/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/reply-DhtejUNZ.js"

Restart gateway

openclaw gateway restart 

Verification Procedure

  1. Set the model to github-copilot/gpt-5.4
  2. Send a simple prompt like hi
  3. Confirm the gateway stays connected
  4. Confirm none of these errors return:
missing Editor-Version header for IDE auth model "gpt-5.4" is not accessible via the /chat/completions endpoint No API provider registered for api: github-copilot 

Reapply After OpenClaw Updates

Because the runtime fix patches the installed OpenClaw bundle, upgrades or reinstalls may overwrite it.

Use the reapply script:

node ~/.openclaw/workspace/ken-patchs/reapply-openclaw-copilot-gpt54-patches.mjs openclaw gateway restart 

Design Notes

Why not switch the whole provider to api: "github-copilot"?

That looked tempting, but OpenClaw’s runtime path did not have a compatible registered streaming provider for that mode in this setup, which caused runtime/provider registration failures.

Why not keep GPT-5.4 on openai-completions?

Because GitHub Copilot GPT-5.4 is not accessible on /chat/completions. It must go through the Responses API.

Why did OpenCode work earlier?

OpenCode already handled the GitHub Copilot transport path correctly, including the required Copilot headers and the proper API mode, while OpenClaw needed both config and runtime fixes.

  • Keep this guide with the reapply script path documented nearby
  • After any OpenClaw upgrade, rerun the patch script
  • If OpenClaw changes its bundle file name, update the script path target accordingly
  • If GitHub Copilot changes required IDE header versions, update both the runtime patch and reapply script

Quick Recovery Commands

node ~/.openclaw/workspace/ken-patchs/reapply-openclaw-copilot-gpt54-patches.mjs openclaw gateway restart openclaw status 

Final State

With the config fix and runtime patches in place, github-copilot/gpt-5.4 works in OpenClaw and the gateway remains stable.

Read more

免费降AI率终极指南:6款实测有效的降AI工具合集,论文降AIGC一键搞定

免费降AI率终极指南:6款实测有效的降AI工具合集,论文降AIGC一键搞定

“我发誓,这部分真的是我自己写的,为什么AI率还是70%?!” 相信我,这个哀嚎,是2025-2026年毕业季每个论文党的噩梦。 你可能只是用AI开了个头、润色了几个句子,或者干脆就是自己苦思冥想写出来的,但检测报告一出来,那刺眼的“高AIGC风险”瞬间让人血压飙升。于是你开始最原始的手动降AI:替换同义词、颠倒句子顺序、中英文翻译……折腾一晚上,降AI率微乎其微,还把原文改得支零破碎 我花了两周实测了市面上主流的6款工具。今天这篇不是广告合集,而是一份帮你“排雷”和“种草”的实战红黑榜。目标只有一个:帮你找到能真正降低AI率,同时保留学术调性、不毁格式的毕业神器。 1、笔灵 综合评价: 如果你时间紧迫,只想要一个“能打”的、最省心的方案,可以直接选它。 传送门:https://ibiling.cn/paper-pass?from=ZEEKLOGjiangaislcs(建议电脑打开) 我的论文是教育学方向的,初稿AI率高达83%

拒绝AI胡说八道!今天我终于学会了在Coze给机器人装上“私有大脑”(保姆级实操复盘)

拒绝AI胡说八道!今天我终于学会了在Coze给机器人装上“私有大脑”(保姆级实操复盘)

经常折腾AI Agent(智能体)的朋友可能都有过这样的烦恼:明明给Bot设定了很高大上的人设,但真到了关键时刻,问它一点公司内部的业务流程,或者自己整理的独家资料,它就开始“一本正经地胡说八道”,或者礼貌地回复你:“抱歉,我没有相关信息。” 那种感觉,就像是雇了一个哈佛高材生,结果发现他上班第一天没带脑子。 核心原因很简单:大模型虽然博学,但它不知道你这边的“私房话”。今天我花了一下午时间,终于在Coze(扣子)平台上把这个问题彻底解决了——我成功搭建了自己的第一个“知识库(Knowledge Base)”。 这哪里是建库,这简直就是给AI强行挂载了一个“外挂大脑”!整个过程比我想象中要丝滑得多,效果立竿见影。趁着热乎劲,我把今天的实操全流程复盘出来,希望能帮到同样想让Bot变聪明的你。   一、 什么是Coze知识库?为什么要建它? 用最通俗的话说,大模型本身是“通识教育”,它知道地球是圆的,知道李白是诗人。但它不知道你们公司的报销流程是怎样的,也不知道你那份 50 页的PDF私密文档里写了什么核心数据。 Coze的知识库,就是允许我们将私有的、

法奥机器人学习使用

法奥机器人学习使用

1 视频课程 2 学习工具 虚拟机环境 3 拖动锁定 限制拖动模式下机器人的各向自由度,为0则可以自由拖动。 4 工具坐标 对机器人末端安装的工具进行标定:拖动机器人以不同姿态多次前往同一个点; 6点法相对4点法还会标定姿态; 5 矩阵运动功能—码垛 6 单点螺旋线 提前标定螺旋线起点 轨迹绘制 7 版本号及软件升级 查看软件版本号 快速备份复制或应用机器人数据 软件升级 8 工件坐标系 原点-x轴-z轴 原点 - X轴 - XY正平面 9 变量系统 lua变量声明 m = 0 n = “test” 变量查询(在面板可看) RegisterVar(“number”,“m”) RegisterVar(“string”,“n”) 系统变量

一文读懂VR/AR/MR:小白也能分清的虚实交互技术

一文读懂VR/AR/MR:小白也能分清的虚实交互技术

目录 * 前言 * 一、逐个击破 —— 三种技术的 “大白话” 解读 * 1.1 VR(虚拟现实):钻进 “虚拟世界” 不出来 * 1.2 AR(增强现实):给 “现实世界” 加层 “滤镜” * 1.3 MR(混合现实):在 “现实里” 玩 “虚拟物件” * 二、核心区别大对比 —— 一张表 + 一张图看懂 * 2.1 对比表格 * 2.2 可视化对比图(核心区别一目了然) * 三、避坑指南 —— 小白最容易混淆的 2 个误区 * 3.1 误区 1: