bug: 内置 Grok 账号路由下 Grok 4.6 报 400 "Argument not supported: external_web_access"(web_search 工具标记未清理)
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
## 问题描述 / What happened
**实际行为**:使用内置 Grok 账号(订阅 OAuth 路由)的 Grok 4.6 模型对话时,任意消息发送均被上游 400 拒绝,错误横幅显示:
```json
{"code":"400","error":"Argument not supported: external_web_access"}
```
点「重试」无效,应属确定性失败(请求形状固定)。与订阅配额无关(额度尚余约 70%),与登录状态无关。
**期望行为**:Grok 4.6 正常响应;或至少像 PR #2444 对 XD 网关(`x-ai/grok*`)的处理那样,在该路由上把 `web_search` 工具上的 `external_web_access` 标记清理掉(或按 fail-closed 语义丢弃该工具)后再转发。
**补充分析**:
- PR #2444(2026-08-22 合并,`createGatewayGrokResponsesCompatTransform`)已修 XD 网关路由的同类 400,但范围明确不含 first-party xAI OAuth 路由(内置 Grok 账号),该路由仍会把 `external_web_access` 标记发给 Grok 上游,Grok 4.6 不支持该参数。
- 同一问题家族另见 #2947:Pi harness 中 Grok 4.6 拒绝不认识的 `x_search` 工具类型(422)——Grok 上游对请求中工具形状的严格校验是共性问题。
## 环境 / Environment
- Cindy 版本或 commit / version or commit: 0.1.79
- 平台与版本 / platform & OS version: macOS 26.5.1 (Build 25F80), arm64
- 模型与路由 / model & route: 内置 Grok 账号(订阅 OAuth),模型 Grok 4.6,思考等级「高」
## 复现步骤 / Steps to reproduce
1. 使用内置 Grok 账号登录(CN 区,订阅路由)
2. 新建对话,选择模型 Grok 4.6
3. 发送任意消息 → 立即返回 `{"code":"400","error":"Argument not supported: external_web_access"}`,点「重试」结果相同
## 日志与截图 / Logs & screenshots
错误横幅原文(已脱敏):
```
{"code":"400","error":"Argument not supported: external_web_access"}
```
会话左下角显示订阅额度「2天 剩余 70%」,可排除配额原因。
Contributor guide
Research direction
Start at the first-party xAI OAuth route and the createGatewayGrokResponsesCompatTransform entry point mentioned in PR #2444; compare how the XD gateway handles web_search. Reproduce with Grok 4.6 and verify that external_web_access is removed or the unsupported tool is dropped before forwarding, so the request no longer returns the 400 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100