Skip to content

[Feature]: Show Z.ai GLM Coding Plan quota in the status bar #18506

Description

@ArtemBozhenko

Problem or use case

Orca tracks usage for Claude, Codex, Gemini, OpenCode Go, Kimi, MiniMax, Antigravity and Grok, but not for Z.ai's GLM Coding Plan. Plenty of people run GLM through Claude Code (ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic) or OpenCode; that traffic burns a plan quota with a 5-hour and a weekly window, and today the only way to see how close you are is the Z.ai web console. Since the provider list in the status bar is compiled in, there is no setting or plugin that can add it.

Proposed solution

Add Z.ai as a usage provider, following the OpenCode Go shape:

  • Settings → AI Provider Accounts → Z.ai: an API key field, stored as a protected secret.
  • A fetcher against GET https://api.z.ai/api/monitor/usage/quota/limit (the endpoint takes the raw key in Authorization — a Bearer prefix is rejected), mapping the returned windows to the 5-hour session and weekly buckets, plus the plan tier (lite / pro / max) as planType.
  • A default-on zai status-bar item with the usual visibility-menu toggle and appearance search entry.

Alternatives considered

Reading the quota from a local file the way Kimi/Grok do — Z.ai keeps no local usage state, so an API read is the only source.

Additional context

Related: #8476 (GLM model support), #10564 (ZCode as a first-class agent), #7569 (custom provider quota visibility). This issue is narrower: usage only, for a plan people already use through the existing agents.

I have a working implementation and will open a PR against this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions