feat: add MiniMax-M2.7 LLM support via official API#5
Open
octo-patch wants to merge 1 commit into432539:mainfrom
Open
feat: add MiniMax-M2.7 LLM support via official API#5octo-patch wants to merge 1 commit into432539:mainfrom
octo-patch wants to merge 1 commit into432539:mainfrom
Conversation
- Add `provider` column to models table; empty = chatgpt.com (legacy), 'minimax' = MiniMax official OpenAI-compatible API - Add MiniMaxConfig to config (minimax.api_key / minimax.base_url) - Implement internal/upstream/minimax.Client with non-streaming Chat() and streaming StreamChat() methods, both OpenAI-compatible - Route provider=minimax models in gateway.ChatCompletions without touching the chatgpt.com account scheduler - Add streamMiniMax() and extractMiniMaxDelta() for standard OpenAI delta-chunk SSE format (differs from chatgpt.com JSON-Patch SSE) - Update admin model CRUD to expose and validate the provider field - DB migration 20260423000001 adds provider column and seeds MiniMax-M2.7 - Unit tests: 8 tests covering client creation, non-stream/stream chat, error propagation, and gateway handler wiring
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.
Summary
providercolumn tomodelstable: empty = chatgpt.com legacy path,minimax= MiniMax official OpenAI-compatible APIinternal/upstream/minimax.Clientwith non-streaming Chat() and streaming StreamChat() methodsprovider=minimaxmodels in gateway.ChatCompletions without touching the chatgpt.com account schedulerstreamMiniMax()+extractMiniMaxDelta()for MiniMax's standard OpenAI delta-chunk SSE formatproviderfield in admin model CRUD API20260423000001adds theprovidercolumn and seeds theMiniMax-M2.7chat modelminimax.api_key/minimax.base_url(envGPT2API_MINIMAX_API_KEY)Test Plan
go build ./...— zero compilation errorsgo test ./internal/upstream/minimax/...— 5 unit tests passgo test ./internal/gateway/...— 3 tests passUsage
minimax.api_key: your-api-keymodel=MiniMax-M2.7