feat: add MiniMax as embedding provider (embo-01, 1536 dims)#287
Open
octo-patch wants to merge 1 commit intozilliztech:masterfrom
Open
feat: add MiniMax as embedding provider (embo-01, 1536 dims)#287octo-patch wants to merge 1 commit intozilliztech:masterfrom
octo-patch wants to merge 1 commit intozilliztech:masterfrom
Conversation
Add MiniMax embo-01 embedding model (1536 dimensions) as a new embedding provider alongside OpenAI, VoyageAI, Gemini, and Ollama. MiniMax uses a non-OpenAI-compatible embedding API with distinct request format (texts array + type field for db/query distinction), so this implements a custom provider using native fetch. Changes: - packages/core: MiniMaxEmbedding class extending base Embedding - packages/mcp: Factory pattern, config, and logging integration - Documentation: README, MCP README, env vars guide, .env.example - Tests: 19 unit tests + 3 integration tests
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
Add MiniMax as a new embedding provider, supporting the embo-01 model (1536 dimensions).
MiniMax's embedding API uses a non-OpenAI-compatible format (uses
textsarray +typefield for db/query distinction), so this implements a custom provider using nativefetchrather than wrapping the OpenAI SDK.Changes
packages/core/src/embedding/minimax-embedding.ts—MiniMaxEmbeddingclass extending the baseEmbeddingabstract class with fullembed(),embedBatch(),detectDimension(),setModel(),setType(), andgetSupportedModels()supportpackages/core/src/embedding/index.ts— Export the new providerpackages/mcp/src/embedding.ts— Add MiniMax to the factory pattern and loggingpackages/mcp/src/config.ts— AddMiniMaxto provider union type, config interface, env var reading, help text, and examplespackages/mcp/README.md— Add MiniMax configuration section with setup instructionsREADME.md— Add MiniMax to supported embedding providers listdocs/getting-started/environment-variables.md— AddMINIMAX_API_KEYandMINIMAX_BASE_URLenv vars.env.example— Add MiniMax configuration sectionConfiguration
Key Design Decisions
textsarray (notinput)typefield (dbfor indexing,queryfor search)vectorsarray (notdata[].embedding)typeparameter support —setType('db' | 'query')allows switching between storage and query embedding modes, matching MiniMax's API semanticsfetch(available in Node.js 18+)Test Plan
MINIMAX_API_KEYenv var, auto-skipped without it)packages/coreandpackages/mcp