[Bug]: Grok refresh restores removed gateway models from cache
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
从 apps/server/src/provider/Layers/ProviderRegistry.ts 开始,检查 shouldRetainMissingProviderModels、mergeProviderModels 以及导出的 mergeProviderSnapshot 接口。使用新的和之前的 Grok 快照添加回归用例,然后验证成功的发现会移除缺失的非 Custom 模型,而失败或不完整的发现以及显式的 Custom 模型会保留其文档所述的行为。
由索引模型根据 Issue 内容生成。
描述
Before submitting
- I searched existing issues and did not find a duplicate for Grok model removal.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Connect Grok CLI to a third-party model gateway (CodexHub in this case) and let T3 discover its additional model IDs.
- Disconnect Grok CLI from that gateway and restore the official Grok configuration.
- Confirm
grok modelsandgrok agent stdioACPinitialize._meta.modelState.availableModelsno longer contain the gateway models. - Refresh provider status in T3 and inspect the Grok model list in Settings or the model picker.
Expected behavior
A successful, complete Grok model discovery replaces the previously discovered inventory. Removed gateway models disappear from the client and persisted cache. Explicit custom models continue to follow current T3 settings; failed or incomplete discovery can retain the last known inventory.
Actual behavior
T3 still lists the disconnected gateway's models. This is a server inventory merge problem, not evidence that Grok CLI is still routed through the gateway.
Read-only verification on this machine:
- Grok's
config.tomlno longer contains CodexHub references. - T3's Grok instance has no custom models or instance environment overrides.
- Both
grok modelsand ACP initialize return exactlygrok-4.7,grok-4.7-build-fast,grok-4.6, andgrok-4.5. - T3's persisted Grok snapshot still contains 17 rows: the four current models, the old
grok-buildfallback, and 12codexhub-*rows. The stale rows haveisCustom: falsebecause they were discovered from the CLI. - Running the actual
mergeProviderModelsfunction with that previous snapshot and the four freshly advertised models reproduces 17 merged rows, including all 12 removed gateway models, even withstatus: "ready"and authenticated/installed state.
Diagnosis and minimal reproduction
On current main, shouldRetainMissingProviderModels returns true unconditionally for Grok. mergeProviderModels then appends every previous non-custom model absent from the new list.
The Grok probe itself already receives the correct current list; it is the shared registry merge that restores removed rows.
A minimal regression case at the exported mergeProviderSnapshot seam:
const fresh = {
instanceId: ProviderInstanceId.make("grok"),
driver: ProviderDriverKind.make("grok"),
enabled: true,
installed: true,
status: "ready",
auth: { status: "authenticated" },
version: "1.0.44",
checkedAt: "2026-09-30T00:00:00.000Z",
models: [{ slug: "grok-4.7", name: "Grok 4.7", isCustom: false }],
} satisfies ServerProvider;
const previous = {
...fresh,
models: [
...fresh.models,
{ slug: "codexhub-removed-model", name: "Removed gateway model", isCustom: false },
],
};
// Expected only grok-4.7; current code returns both rows.
expect(mergeProviderSnapshot(previous, fresh).models.map((m) => m.slug))
.toEqual(["grok-4.7"]);
This affects the shared server inventory consumed by web, desktop, and mobile. A frontend-only filter would leave stale persisted entries behind.
Impact
Minor bug or occasional failure. The model picker advertises models that the current Grok configuration no longer exposes.
Version or commit
Source diagnosis and reproduction: main @ 0fcd5f90611451cca842689faea53b5450c022da (also checked against upstream main on 2026-09-30). This SHA describes the investigated source, not an asserted build SHA of the installed desktop app.
Environment
Linux; Grok CLI 1.0.44 (5b807183dd79) [stable]; Node v26.10.0; official Grok account; previously connected through CodexHub.
Related work
- #9773 merged the same removal semantics for Codex only.
- #4095 merged the analogous fix for OpenCode only.
- #10292 proposed broader inventory consistency, but was closed without merging.
Current main still excludes Grok from successful-discovery replacement. I did not find a Grok-specific issue or an active fix for this path.
Workaround
No cache deletion or live state changes were attempted. Ordinary refresh still restores removed models through the merge logic.
Investigated and filed with GPT-6.1 Sol through the Codex harness in T3 Code.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 14 小时 12 分钟
- 30 天内合并 PR
- 194
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
via-triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
via-triage
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
[Bug]: Update button overflows the sidebar at its minimum width可能已有人在做 @Derpedyea 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
pingdotgg/t3code#27767 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Dragging a sidebar thread from the lower part of the list auto-scrolls the sidebar to the bottom可能已有人在做 @juliusmarminge 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
pingdotgg/t3code#27146 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
check:passed streams:add
难度 1/5 1 小时以内 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
GiganticMinecraft/seichi-playguide#183 ·
维护者通常 1 天内回复
-
area: core complexity: easy impact: medium
难度 2/5 1-3 小时 新手友好度 86/100
ueberdosis/tiptap#8668 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
longbridge/nsh#804 ·
维护者通常 1 天内回复