Skip to content

feat(provider): add MiniMax Code - #555

Merged
caigee-cmd merged 1 commit into
caigee-cmd:mainfrom
guyu233:feat/minimaxcode-provider
Nov 20, 2026
Merged

caigee-cmd merged 1 commit into
caigee-cmd:mainfrom
guyu233:feat/minimaxcode-provider

Conversation

@guyu233

@guyu233 guyu233 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a first-class minimaxcode provider for the MiniMax Code subscription product (distinct from the MiniMax Open Platform API-key gateway), so it works like the other in-process providers (Qoder/WorkBuddy/Kimi/etc.).

  • Auth: official OAuth 2.0 Device Flow with PKCE S256 (public client mcode-public), CN + global sites. Device code / verification URI reuse the standard browser-login wizard UI; single-use refresh tokens are serialized per account and persisted immediately.
  • Chat: translates OpenAI chat requests to the Anthropic Messages API used by the Code CLI, with streaming (SSE → OpenAI chunks), non-streaming, tools/tool_calls, system promotion, and 401 refresh-and-retry.
  • Models: live catalog from /mavis/api/v1/models with a static fallback for the four known models.
  • Quota: status-only display (the gateway exposes no numeric balance over this surface).
  • Wiring: minimaxcode/ model prefix, provider descriptor, brand mark, bilingual changelog.

Protocol adapted from the independently verified F0Rextasy/minimaxcode2api implementation. No new runtime dependencies.

Test plan

  • go build ./...
  • go test ./internal/providers/minimaxcode ./internal/providers ./internal/app ./internal/console (architecture boundaries pass)
  • cd frontend && npm run build && npm run sync
  • python scripts/release-notes.py validate

@caigee-cmd
caigee-cmd force-pushed the feat/minimaxcode-provider branch from 4b50a3c to de2b3c1 Compare November 20, 2026 08:36
- OAuth device flow (PKCE S256) with CN/global regions and single-use refresh handling.

- OpenAI <-> Anthropic Messages translation with streaming, tools, and model catalog with static fallback.

- Standard device-code login UI, model prefix minimaxcode/, brand mark and bilingual changelog.
@caigee-cmd
caigee-cmd force-pushed the feat/minimaxcode-provider branch from de2b3c1 to eb2beab Compare November 20, 2026 09:07
@caigee-cmd
caigee-cmd merged commit 654d8e1 into caigee-cmd:main Nov 20, 2026
6 checks 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