From 24342813fe2196335ac8e510e8f59f716197d0e8 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 17 Apr 2026 04:25:47 -0700 Subject: [PATCH] fix(qqbot): correct Authorization header format in send_message REST path (#11569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The send_message tool's direct-REST QQBot path used "QQBotAccessToken {token}" which QQ's API rejects with 401. The correct format is "QQBot {token}" — the gateway adapter at gateway/platforms/qqbot.py uses this format in all 5 header sites (lines 341, 551, 579, 1068, 1467); this was the one outlier. Credit to @Quon for surfacing this in #10257 (that PR had unrelated issues in its media-upload logic and was closed; this salvages the genuine 1-line fix). --- tools/send_message_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/send_message_tool.py b/tools/send_message_tool.py index 37a16f78c..4bc93ce42 100644 --- a/tools/send_message_tool.py +++ b/tools/send_message_tool.py @@ -1274,7 +1274,7 @@ async def _send_qqbot(pconfig, chat_id, message): # Step 2: Send message via REST headers = { - "Authorization": f"QQBotAccessToken {access_token}", + "Authorization": f"QQBot {access_token}", "Content-Type": "application/json", } url = f"https://api.sgroup.qq.com/channels/{chat_id}/messages"