Repository navigation
Conversation
A Claude instance pointed at Z.ai through ANTHROPIC_BASE_URL showed no usage limits: the CLI's get_usage only knows Anthropic accounts. Read the plan's five-hour and weekly windows, with reset times, from Z.ai's quota endpoint using the token the CLI already sends. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A Claude instance pointed at Kimi Code through ANTHROPIC_BASE_URL showed no usage limits. Read the plan's rolling and weekly windows, with reset times, from the same usages endpoint Kimi Code CLI's /usage reads, using the key the CLI already sends. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds substantial server-side logic and changes authenticated Claude refreshes to make outbound quota requests to Z.ai and Kimi using configured provider credentials. The new user-visible capability and security-sensitive credential/network handling require human review. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Re: Macroscope approvability verdict — this PR intentionally adds a new provider integration (Kimi Code usage metering on Claude relay instances), so human maintainer review is expected. No code change needed in response to this verdict. |
|
Note This comment is posted by Julius' dot The full branch adds Kimi quota metering alongside the Z.ai integration from #13586. These are new authenticated provider integrations, and the PR and linked prerequisite contain no maintainer approval of this combined direction and scope. Under prior approval, please agree that scope with maintainers and link the approval before requesting reconsideration. The missing visibility into relay plan limits remains a useful problem report. |
What changed and why
Claude instances using Kimi Code previously showed no plan limits because the Claude CLI only reads Anthropic usage. The server now queries Kimi Code's usage endpoint with the instance's existing credential. The plan summary and rolling quota windows feed the existing Usage screen and
/usage-limitsoutput; Moonshot's open platform remains outside this integration.This branch includes the Z.ai contribution and its parser repairs from #13586. Review the full branch as a combined stack; it must retain those repairs when the prerequisite lands.
Valid sibling quotas survive malformed rows, failed reads retain the last successful snapshot, and reset times and labels are normalized. Known units are matched exactly; monthly or invalid durations never invent pacing data.
Verification
Remaining proof
No authenticated Kimi response or integrated client before/after evidence has been captured. Payload assumptions are corroborated by Kimi CLI source and mock HTTP tests. This PR is not yet verified ready to merge; live-account/client proof remains pending.
Original implementation attribution: Claude Opus 5.5 in Claude Code. Audit repairs: GPT-6 Astra in Codex/T3 Code; independent repair review: GPT-6.1 Sol in Codex/T3 Code.