You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
z.ai GLM Coding Plan users (via OpenCode) have no usage surface. Research (spec §Readers/opencode:zai) verified live: GET https://api.z.ai/api/monitor/usage/quota/limit with the raw opencode zai-coding-plan key as Authorization (no Bearer — Bearer 401s), key from ~/.local/share/opencode/auth.json.
Settings: OpenCode usage-source dropdown becomes live (none | zai), greyed with a hint when OpenCode is disabled or no credential exists.
Registry source opencode:zai active when OpenCode enabled AND source = zai.
Response mapping: classify CREDIT_LIMIT windows by unit (3 = 5-hour, 6 = weekly; never positional), nextResetTime epoch ms → reset, plan = data.level, both rows all-models; HTTP 200 with success:false inner envelope ⇒ error row; unclassifiable layout ⇒ error, not a guess.
Security: single read-only request; key only in memory + header; opencode auth.json read-only.
Phase 3 of the spec. Depends on Phase 1 (registry + settings dropdown plumbing).
Acceptance criteria
Reader mapping unit tested with order-shuffled fixtures, inner-failure envelope, unclassifiable layout.
Dropdown state logic tested (disabled cases + credential absence).
z.ai row renders in modal rail/detail; exhaustion integration works (all-models scope).
Live-verified response fixture captured 2026-09-20 committed (no key material).
Activity
fix(usage): address the Phase 1 review — three blockers, two should-f…
Juliusolsson05 commentedon Sep 22, 2026
Implementation complete in PR #1126 (enablement + both readers + review fixes from four orchestrated reviewers). CI running; will merge after green.
fix(usage): final review — terminal-kind splits, direction defaults, …
docs(usage): add phase 1 implementation plan for provider usage enabl…
feat(usage): z.ai coding-plan quota reader via the OpenCode credential
feat(usage): OpenCode usage-source dropdown with z.ai credential gating
fix(usage): address the Phase 1 review — three blockers, two should-f…
fix(usage): final review — terminal-kind splits, direction defaults, …