feat: add Kimi and MiniMax providers with status-bar icons - #38
Conversation
deviffyy
left a comment
There was a problem hiding this comment.
Thanks for the updates. This is much closer now, but there are a few provider behavior issues left:
- MiniMax status fields are optional, so valid quota data should still work when they are missing.
weekly_boost_permilleshould use MiniMax’s multiplier semantics (1500means1.5x).- Unlimited and unavailable MiniMax quotas should be distinguished instead of appearing as no data.
- Kimi’s weekly and five-hour quotas should be parsed independently, so one invalid section does not discard the other.
- Please remove the undocumented
MINIMAXI_API_KEYalias and tighten the missing-plan error detection.
Please keep the changes focused and consistent with the existing OpenQuota design and provider structure. Once these are addressed, please sync the branch with the latest main so we can run the cross-platform checks.
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.
Adds a MiniMax provider reporting Session (per-interval) and Weekly remaining quotas from GET https://www.minimax.io/v1/token_plan/remains using a Bearer API key. Modeled on providers/zai: client + mapper + auth, keychain-backed key (zeroized), success checked via base_resp.status_code, with a 'no token plan' -> permission error. Registered + contract/links covered, with unit tests.
…centage - Wire kimi + minimax SVG icons into the tray status-bar renderer's provider map so their logos show instead of the fallback circle. - Add elliptical-arc (A/a) support to the SVG path parser so the MiniMax logo, which uses arc commands, parses correctly. - Switch Kimi's session and weekly quotas from QuotaFormat::Count to QuotaFormat::Percent so the status bar shows 'NN%' like the other percentage-based providers (Moonshot's API still returns absolute counts internally; used_percent was already computed).
a784149 to
b43dbd6
Compare
|
Thanks, the provider changes look good and CI is green. There’s just one final docs-only cleanup before we merge: could you add the short 'What it tracks' table used in the other provider guides to both Kimi and MiniMax, and wrap the MiniMax paragraphs to match the existing Markdown style? No other changes are needed. |
deviffyy
left a comment
There was a problem hiding this comment.
Thanks, this now fits the existing provider structure and documentation style, and all cross-platform checks are green. Ready to merge.
Summary
Adds Kimi Code and MiniMax global providers, including provider docs, registry integration, settings links, and status-bar marks. This branch is rebased on the current
main.Review fixes
status: 3quota windows as Unlimited, usesweekly_boost_permilleas a multiplier, and selects only thegeneralmodel.MINIMAXI_API_KEYalias and restricted no-plan detection to the explicit MiniMax no-token-plan response.Validation
cargo fmt --checkcargo test --all-targets— 518 passedcargo clippy --all-targets -- -D warningspnpm verify:contractspnpm checkpnpm lintThe floating-window width work is intentionally separate in #39.