Skip to content

feat(models): show Kimi For Coding usage quota (#848) - #1113

Open
agegr wants to merge 1 commit into
mainfrom
feat/kimi-coding-usage
Open

agegr wants to merge 1 commit into
mainfrom
feat/kimi-coding-usage

Conversation

@agegr

@agegr agegr commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Adds kimi-coding to the provider usage list with an adapter for GET https://api.kimi.com/coding/v1/usages (same origin as the provider's base URL), following the existing pattern; no route change.

  • usage → a count bucket "Overall"; each limits[] entry → a count bucket labelled from its window (e.g. 300 min → "5h") with its reset time
  • parallel.limit and user.membership.level → metrics
  • API key (KIMI_API_KEY) and a Kimi Code OAuth sign-in both reach the endpoint as Authorization: Bearer … (checked with fetch faked and a scratch auth.json); no credential → auth-unavailable

Not verified against the live endpoint: the mapping follows the response sample in #848 only. As with MiniMax, the UI shows count buckets as remaining / limit without their reset time.

Files: lib/provider-usage.ts, lib/provider-usage-ids.ts (+ identical demo/ copy); test in lib/provider-usage.test.mjs. tsc, eslint, npm test pass.

Closes #848

🤖 Generated with Claude Code

PROVIDER_USAGE_IDS gains kimi-coding with an adapter for
GET https://api.kimi.com/coding/v1/usages, on the same origin as the
provider's base URL. The overall quota and each rate-limit window become
count buckets with their reset time; the parallel-request limit and
membership level become metrics. Both an API key and a Kimi Code OAuth
credential reach the endpoint as a Bearer token through the existing
query path. The mapping follows the response sample in the issue; it
was not checked against the live endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(models): support provider usage quota for Kimi For Coding / 用量配额展示支持 Kimi For Coding (kimi-coding)

1 participant