feat(models): 补充 xAI Grok 4.6——订阅侧已可用,目录静态清单未跟进
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 401
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
## 现象
接入 SuperGrok 订阅后,模型列表里 xAI 最新只到 **Grok 4.5**,没有已经发布的 Grok 4.6。
- 客户端版本:0.1.45
- 版本区域:CN
- OS:win32 x64 (10.0.19045)
## 本地实测:订阅侧已经能用,缺的只是目录条目
用 `XDT_MODELS_PATH` 指向一份手工加了 `xai/grok-4.6` 的目录文件启动客户端后:
- 模型列表正常出现 Grok 4.6
- 选中后发送消息,**调用成功,可正常使用**
条目参数照抄 grok-4.5(500k 上下文、low/medium/high 三档、默认 high),未改任何路由或鉴权代码。也就是说 SuperGrok 订阅已经能路由到 4.6,客户端侧唯一缺的就是目录里那一条。
## 为什么升级客户端也等不到
**1. xAI 是目录里唯一靠静态清单维护的供应商**
`packages/model-providers/src/builtin.ts` 的注释写明:SuperGrok 订阅 OAuth 没有列模型通道,所以 xai 的清单是唯一必须静态维护的,活在 `catalog/providers.json`。Anthropic / OpenAI / xd 都有各自的动态发现路径,只有 xAI 出新模型必须靠人工加条目。
**2. 仓库最新代码里没有**
`packages/model-providers/catalog/providers.json` 的 xai 段目前 8 条,最新是 `xai/grok-4.5`:
```
xai/grok-4.5, xai/grok-4.3, xai/grok-build-0.1, xai/grok-4.20-multi-agent-0309,
xai/grok-4.20-0309-reasoning, xai/grok-4.20-0309-non-reasoning,
xai/grok-4.20, xai/grok-code-fast
```
该文件最后一次改动是 2026-08-10 的 i18n 提交(`e78f44ae`);截至 main 分支 `a034e93a` 仍未加入 4.6。
**3. 线上热更目录同样没有**
本机 last-known-good 快照 `%APPDATA%\Cindy\cache\model-catalog\.json`(2026-08-13 11:19 从目录接口拉取,`modelRegistry.updatedAt = 2026-08-12T09:34:20Z`)里的 xai 清单与仓库完全一致,也只到 4.5。
所以这不是客户端版本落后,而是目录本身还没更新——用户等发版也拿不到。
## 期望
把 `xai/grok-4.6` 加进 `catalog/providers.json` 的 xai 段(`claude-code` 与 `codex` 两个 runtime)。由于这份文件同时发布到 OSS `cfg/providers.json` 且启动时拉取,更新后用户重启即可看到,不必等客户端发版。
官方参数(https://docs.x.ai/developers/grok-4-6 ):
| 项 | 值 |
|---|---|
| API model id | `grok-4.6` |
| 上下文 | 500k |
| 输入 / 输出 | 文本 + 图像 / 文本 |
| 定价 | 与 4.5 持平 |
xAI release notes 已列为 API 可用:https://docs.x.ai/developers/release-notes
Contributor guide
Research direction
Start with packages/model-providers/catalog/providers.json and inspect the existing xai/grok-4.5 entry and the surrounding runtime entries. Add xai/grok-4.6 for the claude-code and codex runtimes using the stated 500k context and capability details, then verify the catalog includes the new model and remains valid JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json, typescript
- Domain
- ai, backend
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100