[Bug]: Grok refresh restores removed gateway models from cache
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu tại apps/server/src/provider/Layers/ProviderRegistry.ts và kiểm tra shouldRetainMissingProviderModels, mergeProviderModels cũng như điểm nối mergeProviderSnapshot được export. Thêm trường hợp hồi quy bằng cách sử dụng các snapshot Grok mới và trước đó, sau đó xác minh rằng quá trình phát hiện thành công sẽ xóa các model không phải Custom bị thiếu, trong khi quá trình phát hiện thất bại hoặc chưa hoàn tất và các model Custom được chỉ định rõ ràng vẫn giữ nguyên hành vi được ghi chép.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 24k
- Fork
- 6.3k
- Merge trung bình
- 10 giờ 46 phút
- Pull request đã merge (30 ngày)
- 299
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pingdotgg/t3code
-
enhancement via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#14541 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pingdotgg/t3code#14536 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pingdotgg/t3code#14452 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
area/core status/need-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
google-gemini/gemini-cli#29602 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: backend enhancement priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
snapotter-hq/SnapOtter#1879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Tencent/BrowserSkill#390 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue status: needs triaging type: bug version: 2.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
medusajs/medusa#17094 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày