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

【AirSim 教程指南】Part 4:无人机物理引擎与动力学模拟(碰撞、风场、传感器噪声、飞行动力学)

【AirSim 教程指南】Part 4:无人机物理引擎与动力学模拟(碰撞、风场、传感器噪声、飞行动力学)

AirSim 教程指南——Part 4:无人机物理引擎与动力学模拟(碰撞、风场、传感器噪声、飞行动力学) 🚁 面向准备进行 真实无人机仿真、控制算法验证(MPC / PID / RL) 的开发者 🌪 全面解析 AirSim 如何模拟无人机的动力学、环境扰动与噪声模型 🎯 让你的仿真结果“更像真机”,避免算法过拟合虚拟环境 📌 目录 1. AirSim 中的无人机动力学:从六自由度到推进模型 2. 碰撞系统:检测、事件回调与恢复策略 3. 风场模型:风向、风速、阵风、湍流 4. 噪声系统:传感器噪声、动力噪声、IMU 噪声 5. 真机一致性:如何校准仿真让它接近你的无人机 1. AirSim 中的无人机动力学:

机器人 - 关于MIT电机模式控制

目录 一、MIT电机模式简单介绍 1.1 简单介绍 1.2 MIT模式的控制参数 1.3 使用场景 二、调试时建议 2.1 调试 2.2 问题定位 一、MIT电机模式简单介绍 1.1 简单介绍 Mixed Integrated Torque为一种混合控制模式,在同一帧CAN数据里包含 位置、速度、扭矩三类的闭环指令。驱动器里面把位置环、速度环、前馈扭矩相加,得到一个参考电流,然后再交给电流环完成精准扭矩输出。 1.2 MIT模式的控制参数 参数含义取值范围(常见)说明kp位置比例系数(刚度)0 ~ 500 (单位视驱动器而定)kp = 0 时位置环失效,

ESP32 小智 AI 机器人入门教程从原理到实现(自己云端部署)

此博客为一篇针对初学者的详细教程,涵盖小智 AI 机器人的原理、硬件准备、软件环境搭建、代码实现、云端部署以及优化扩展。文章结合了现有的网络资源,取长补短,确保内容易于理解和操作。 简介: 本教程将指导初学者使用 ESP32 微控制器开发一个简单的语音对话机器人“小智”。我们将介绍所需的基础原理、硬件准备、软件环境搭建,以及如何编写代码实现语音唤醒和与云端大模型的对接。通过本教程,即使没有深厚的 AI 或嵌入式经验,也可以一步步制作出一个能听懂唤醒词并与人对话的简易 AI 机器人。本教程提供详细的操作步骤、代码示例和图示,帮助您轻松上手。 1. 基础原理 ESP32 架构及其在 AI 领域的应用: ESP32 是一款集成 Wi-Fi 和蓝牙的双核微控制器,具有较高的主频和丰富的外设接口,适合物联网和嵌入式 AI 应用。特别是新版的 ESP32-S3 芯片,不仅运行频率高达 240MHz,还内置了向量加速指令(

Telegram搜索机器人推荐——查找海量资源,提升信息检索效率

大家好,本文首发于 ZEEKLOG 博客,主要面向需要在 Telegram 中高效检索资源的同学。我结合自己的实测体验,总结了几款实用的搜索机器人与完整操作流程,帮助大家解决“怎么快速找到频道、群组、文件”的痛点。如果你也在为信息筛选耗时头疼,建议耐心读完并亲手试试,收获会很大。觉得有帮助别忘了给个点赞、收藏和关注支持一下 🙂 📚 本文目录 * 使用准备 * 什么是Telegram搜索机器人? * Telegram搜索机器人的核心功能 * 推荐的Telegram搜索机器人 * 如何使用Telegram搜索机器人? * Telegram搜索机器人的应用场景 * 总结 在信息爆炸的时代,如何高效获取自己想要的资源?Telegram搜索机器人为你带来全新解决方案,无需翻找频道、群组,只需输入关键词,即可一键查找海量内容。无论是影视剧、电子书、图片还是优质群组,Telegram搜索机器人都能帮你轻松找到。推荐搜索机器人:@soso、@smss、@jisou 使用准备 1. 能访问外网,不会魔法的同学请参考:这里 2. 安装 Telegram