[Bug]: Grok refresh restores removed gateway models from cache
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
apps/server/src/provider/Layers/ProviderRegistry.ts から始めて、shouldRetainMissingProviderModels、mergeProviderModels、およびエクスポートされた mergeProviderSnapshot の接合点を調べます。新しい Grok スナップショットと以前の 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
- スター
- 23.6k
- フォーク
- 6.1k
- 平均マージ
- 10時間 20分
- マージ済み PR(30日)
- 309
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pingdotgg/t3code#14452 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
solana-foundation/program-examples#747 · コメント 1 件 ·
メンテナーはふだん 9 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
remotion-dev/remotion#11847 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openwatersio/slackwater#355 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
melgarafael/DeskcommCRM#1998 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
webarkit/jsfeatNext#225 ·
メンテナーはふだん 1 日以内に返信