Skip to content

feat: Add Minimax provider support - #14

Merged
TopiCsarno merged 7 commits into
TopiCsarno:mainfrom
Phototonic:feature/kimi-minimax-support
Jul 2, 2026
Merged

feat: Add Minimax provider support#14
TopiCsarno merged 7 commits into
TopiCsarno:mainfrom
Phototonic:feature/kimi-minimax-support

Conversation

@Phototonic

Copy link
Copy Markdown

Description

This PR adds complete Minimax provider support to YapCap, enabling users to track their Minimax API token usage directly from the COSMIC panel applet.

Changes

  • New Provider: Full Minimax integration with API key-based authentication
  • UI/UX Improvements: Added explicit "API Key" and "Account" labels to Minimax login form fields for better clarity
  • Icon Assets: Added proper Minimax branding with dedicated icons for default and reversed variants
  • Documentation: Updated README.md and docs/spec.md to include Minimax provider information
  • Localization: Added Minimax-related translation strings

Additional Context

We initially attempted to add Kimi provider support as well but were unsuccessful due to current account and API limitations. The Kimi-related commits have been removed, keeping only the functional Minimax support.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Refactor
  • Cosmetic
  • Documentation update

Pre-flight Checklist

  • Code compiles without errors
  • All tests pass (352/352)
  • Changes follow repository coding guidelines
  • Documentation updated
  • No merge conflicts with main branch

phototonic and others added 5 commits June 25, 2026 15:25
- Remove all Kimi-related code (provider, UI, error handling, config)
- Keep Minimax provider functionality intact
- Fix Minimax test that was failing due to missing percent fields
- Add minimax.svg and minimax-reversed.svg from official Minimax branding
- Update provider_assets.rs to use Minimax icons instead of Codex placeholder
- Icons use official Minimax logo from their website (filecdn.minimax.chat)
- Add Minimax to providers list in README with API key tracking description
- Update README header and account management sections to include Minimax
- Add comprehensive Minimax provider section (3.6) to spec.md
- Update document metadata, system context diagram, and all provider references
- Update last modified date to 2026-06-25

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Replace Codex icon usage with dedicated Minimax icons
- Add separate icons for default and reversed variants
- Ensure Minimax has proper branding in the UI

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add 'API Key' and 'Account' text labels above respective input fields
- Change label field initialization from 'Default' to empty string
- Ensures both form fields start empty with proper placeholders
- Improves UX clarity for users adding Minimax accounts

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@TopiCsarno

Copy link
Copy Markdown
Owner

Hi, thanks for the contribution!
I've enabled CI for this PR.

Please check that these checks pass

cargo fmt --all -- --check
cargo test --all
just check

One early functional note from testing: I tried a normal MiniMax sk-api-* key with purchased Credits. The quota endpoints returned HTTP 200, but with:

{
"base_resp": {
"status_code": 2062,
"status_msg": "no active token plan subscription"
},
"model_remains": null
}

The app currently reports this as a generic parse failure. The implementation should parse base_resp.status_code and surface the MiniMax API message clearly. Once CI is green, I’ll take another pass at the MiniMax-specific behavior.

phototonic added 2 commits June 26, 2026 15:20
- Fix core issue: parse MiniMax base_resp errors before model_remains
- Add MinimaxError::ApiError variant for API-specific error messages
- Fix AppError integration for MinimaxError rate limiting methods
- Remove unused code (delete_api_key, validate, InvalidBearerHeader)
- Fix code organization: move functions before test module
- Apply rustfmt formatting and fix clippy warnings
@Phototonic

Copy link
Copy Markdown
Author

Pushed some changes to fix up failing CI checks, as well as some changes to hopefully handle the generic parse failure for the minimax API correctly.

@TopiCsarno
TopiCsarno merged commit f9bb4fe into TopiCsarno:main Jul 2, 2026
1 check passed
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.

2 participants