feat: add Kimi (Moonshot) coding provider - #33
Closed
lamchun1110 wants to merge 1 commit into
Closed
Conversation
Adds a Kimi provider reporting Session (5-hour rolling window) and Weekly (main usage) quotas from GET https://api.kimi.com/coding/v1/usages using a Bearer API key. Modeled on providers/zai: client + mapper + auth, keychain- backed key (zeroized), with unit tests for the captured payload, error states, and plan detection. Registered in the runtime list and covered by the provider-registry contract and links test.
Contributor
Author
|
Superseded by #38, which combines Kimi and MiniMax into a single PR. The two were split across branches that touch the same shared files (registry, contract test, icon map) and would conflict on merge, and #38 also includes the status-bar icon fix so the logos render in the menu bar. Closing in favor of #38. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Kimi provider so OpenQuota can show Kimi Coding usage alongside the other AI coding tools.
What
providers/kimi/(modeled onproviders/zai/):client,mapper,auth,mod.limits[0].detail)usage)GET https://api.kimi.com/coding/v1/usages, Bearer API key.KIMI_API_KEY/~/.config/openquota/kimi.json), wrapped inZeroizing, never logged — same posture as Z.ai/OpenRouter.lib.rs), declared inproviders/mod.rs, covered by the provider-registry contract (scripts/verify/verify-provider-registry-contract.js) and the provider-links test.Verification
Caveat
The `/coding/v1/usages` endpoint is undocumented (discovered against the live API). The response shape has been stable in practice, but field paths may need adjustment if Moonshot changes it. Happy to gate behind a feature flag or adjust paths on request.
Contributed under the repo's MIT license. Built/tested on Linux and macOS.