Skip to content

feat: add MiniMax M2.7 as configurable backend for Ask about Code#53

Open
octo-patch wants to merge 1 commit intojohannesjo:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax M2.7 as configurable backend for Ask about Code#53
octo-patch wants to merge 1 commit intojohannesjo:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Adds MiniMax M2.7 (204K context) as an alternative LLM provider for the Ask about Code inline Q&A feature
  • Users can switch between Claude Code (default) and MiniMax in the Settings → Ask about Code section
  • When MiniMax is selected, the app calls the MiniMax API directly via its OpenAI-compatible endpoint — no claude CLI required
  • API key is stored in app state and persisted across restarts

Changes

File What changed
electron/ipc/ask-code-minimax.ts New MiniMax streaming backend: SSE parser, abort-signal handling, Bearer auth
electron/ipc/ask-code-minimax.test.ts 12 unit tests (chunks, errors, cancel, auth header, model, temperature, stream flag)
electron/ipc/ask-code.ts Route to MiniMax or Claude based on provider arg
electron/ipc/register.ts Forward provider / minimaxApiKey from IPC call args
src/store/{types,core,ui,store,persistence}.ts New askCodeProvider + minimaxApiKey store fields, persisted to state.json
src/components/SettingsDialog.tsx Provider dropdown + conditional API-key input
src/components/AskCodeCard.tsx Pass provider + apiKey through IPC
README.md Mention MiniMax as a supported Ask-about-Code provider

Test plan

  • Run npm test — 12 new passing tests, all existing tests still pass
  • Open Settings (Ctrl+,) → see new "Ask about Code" section with provider dropdown
  • Select MiniMax, enter a valid MINIMAX_API_KEY, select code in a task, ask a question — response streams in
  • Switch back to Claude Code — Claude CLI is used as before
  • Restart the app — provider and key are persisted

The "Ask about Code" inline Q&A feature now supports MiniMax as an
alternative to the Claude Code CLI. Users can switch providers in
Settings and supply a MINIMAX_API_KEY to use MiniMax M2.7 (204K
context) without needing claude installed.

- electron/ipc/ask-code-minimax.ts: streaming MiniMax backend via
  OpenAI-compatible API, with abort-signal handling and SSE parsing
- electron/ipc/ask-code.ts: route to MiniMax or Claude based on
  provider arg passed through IPC
- electron/ipc/register.ts: forward provider/minimaxApiKey from IPC args
- src/store/{types,core,ui,store,persistence}.ts: persist askCodeProvider
  and minimaxApiKey settings
- src/components/SettingsDialog.tsx: provider selector + API key input
- src/components/AskCodeCard.tsx: pass provider/apiKey through IPC
- README.md: mention MiniMax as supported Ask-about-Code provider
- electron/ipc/ask-code-minimax.test.ts: 12 unit tests
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.

1 participant