Thread details shows the local Claude login's usage for a Claude instance routed through a custom ANTHROPIC_BASE_URL
Maintainer thường phản hồi trong vòng 1 ngà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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Read apps/server/src/provider/ClaudeProvider.ts where customApiEndpoint is computed and usageLimits is built from capabilities.usage; compare how the custom endpoint is represented with the proposed unavailable reason. Check apps/web/src/components/chat/ThreadDetailsUsage.tsx to confirm the displayed fallback behavior. Done means custom endpoint threads no longer show the local OAuth account’s limits; an open pull request is already linked.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
Thread details → Usage limits always shows Weekly 100% and Weekly · Fable 100% (full bars, % left) and no Session row, in every Claude thread. It never changes as I use Claude. The main limits view shows real, non-zero usage for the accounts that actually serve my requests.
Diagnosis
My Claude requests go through a CLIProxyAPI hub: ~/.claude/settings.json sets env.ANTHROPIC_BASE_URL to the hub. The claude CLI is also signed in with an OAuth Claude subscription that the hub doesn't use for these requests.
ClaudeProvider.ts sees the non-Anthropic base URL and marks the instance as customEndpoint ("First-party account fields cannot verify custom endpoint credentials"). It still publishes capabilities.usage (the CLI's get_usage result) as the instance's usageLimits. get_usage reports the local OAuth login, not the account the custom endpoint routes to. That login is unused, so the instance gets valid-looking limits at 0% used:
"five_hour": null,
"seven_day": { "utilization": 0, "resets_at": "2026-11-26T06:00:00Z" },
"model_scoped": [{ "display_name": "Fable", "utilization": 0 }]
(claude 2.1.329, get_usage control request, captured while the hub accounts were in active use.)
ThreadDetailsUsage renders only the instance's own snapshot, so it shows 100% left for Weekly and Weekly · Fable and drops Session (five_hour: null). The streamed rate_limit_events through the proxy carry no numbers ({"status":"allowed","isUsingOverage":false}), so nothing corrects it during a turn.
This differs from #30990. There the CLI has no OAuth login, so the probe fails and the card says Unavailable. Here the CLI returns a different account's numbers, which look valid. The fallback proposed in #27740 runs only when the instance's limits carry a notice, so it would not trigger here.
Suggested fix: when the Claude instance resolves to customEndpoint, don't attribute the CLI's get_usage result to it. Publish unavailable limits with a reason, so the card reads as unavailable or falls back to the usage hub as in #27740, instead of showing another account's numbers.
Steps to reproduce
- Sign the
claudeCLI in to Claude subscription account A (claude auth login). - In
~/.claude/settings.json, setenv.ANTHROPIC_BASE_URLto a CLIProxyAPI hub that serves Claude through other accounts. (My config also sets_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL=1; I haven't tested without it.) - Use the default
claudeAgentinstance, with no T3-level env overrides. Add the hub as acliproxyusage limit source. - Use Claude in a few threads, then open Thread details with Usage limits enabled.
Expected: the limits of the account serving the requests, or Unavailable.
Actual: account A's limits (Weekly 100%, Weekly · Fable 100%, no Session). They never move.
Version
0.1.11-nightly.20261120.4979 (desktop app and local server). Source read at main @ df09ced7.
Environment
macOS (Darwin 27.0), T3 Code (Nightly) desktop app against its local server, Claude Code CLI 2.1.329, CLIProxyAPI hub on the LAN configured as a cliproxy usage limit source.
Evidence
- Thread details card:
Weekly ▬▬▬ 100%,Weekly · Fable ▬▬▬ 100%, no Session row. get_usageoutput above (trimmed).apps/server/src/provider/ClaudeProvider.ts:customApiEndpointis computed, thenusageLimitsis still built fromcapabilities.usage.apps/web/src/components/chat/ThreadDetailsUsage.tsx: uses the account matchinginstanceId, elseprovider.usageLimits.
Related issues
#30990 (same setup, but the card shows Unavailable), #27740 (hub fallback, which only runs when the limits carry a notice), #36297.
Workaround
None in T3. Use Usage → Limits for the hub accounts' real numbers.
Produced by Opus 5.5 (Claude Code) following the T3 Code triage playbook.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 4 giờ 29 phút
- Pull request đã merge (30 ngày)
- 488
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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs more info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#39400 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Wrapped PR titles lose bottom padding in the thread details panelCó thể đã có người làm @iamdatvt94 đã nhận 1 ngày trước. Đang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/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 73/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:plugins kind:bug priority:p2 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Escaped `*` followed by `*` (`\**`) never matchesCó thể đã có người làm @bardrop đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
editorconfig/editorconfig-core-js#172 ·
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 82/100
vega/vega-webgpu#40 ·
-
Adjust break point sizingĐang mởtype: bug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
puckeditor/puck#1929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compression() compresses every response at Brotli quality 11Có thể đã có người làm @staylor đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày