Skip to content

feat: add MiniMax as a supported LLM provider#3666

Open
octo-patch wants to merge 3 commits intoQuivrHQ:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as a supported LLM provider#3666
octo-patch wants to merge 3 commits intoQuivrHQ:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link

@octo-patch octo-patch commented Mar 14, 2026

Summary

  • Add MiniMax as a first-class LLM provider for Quivr
  • Register MiniMax-M2.5 and MiniMax-M2.5-highspeed models (204K context window, up to 192K output tokens)
  • Use MiniMax's OpenAI-compatible API endpoint (https://api.minimax.io/v1)
  • Add unit test for MiniMax endpoint creation
  • Update README to list MiniMax among supported providers

Details

MiniMax offers OpenAI-compatible chat completion APIs. This PR adds MiniMax as a dedicated supplier in Quivr's DefaultModelSuppliers enum, with proper model configs and endpoint handling via ChatOpenAI.

Supported Models

Model Context Window Max Output Description
MiniMax-M2.5 204,800 tokens 192,000 tokens Peak Performance. Ultimate Value.
MiniMax-M2.5-highspeed 204,800 tokens 192,000 tokens Same performance, faster and more agile

Usage

export MINIMAX_API_KEY=your_api_key
from quivr_core.rag.entities.config import DefaultModelSuppliers, LLMEndpointConfig
from quivr_core.llm import LLMEndpoint

config = LLMEndpointConfig(
    supplier=DefaultModelSuppliers.MINIMAX,
    model="MiniMax-M2.5",
)
llm = LLMEndpoint.from_config(config)

Test plan

  • Syntax validation passes for all modified files
  • MiniMax API connectivity verified with live API call
  • Unit test added for MiniMax endpoint creation
  • Full test suite (requires Python 3.11+)

Files changed

  • core/quivr_core/rag/entities/config.py - Add MINIMAX enum + model configs
  • core/quivr_core/llm/llm_endpoint.py - Add MiniMax handler
  • core/tests/test_llm_endpoint.py - Add MiniMax test
  • README.md - Update supported providers list

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. area: backend Related to backend functionality or under the /backend directory labels Mar 14, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Add MiniMax (https://www.minimax.io/) as a first-class LLM provider,
enabling users to leverage MiniMax-M2.5 and MiniMax-M2.5-highspeed
models (204K context window) through their OpenAI-compatible API.

Changes:
- Add MINIMAX to DefaultModelSuppliers enum
- Register MiniMax-M2.5 and MiniMax-M2.5-highspeed model configs
- Add MiniMax handler in LLMEndpoint using ChatOpenAI with
  base_url https://api.minimax.io/v1
- Add unit test for MiniMax endpoint creation
- Update README to list MiniMax among supported providers

Usage:
  Set MINIMAX_API_KEY environment variable, then configure:
  supplier: "minimax"
  model: "MiniMax-M2.5"
@octo-patch octo-patch force-pushed the feature/add-minimax-provider branch from 9d22fcf to 09e07d7 Compare March 14, 2026 15:46
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Mar 14, 2026
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to model list
- Place M2.7 models before M2.5 in config for priority
- Keep all previous models (M2.5, M2.5-highspeed) as alternatives
- Update test to use M2.7 and add model config verification test
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="core/quivr_core/rag/entities/config.py">

<violation number="1" location="core/quivr_core/rag/entities/config.py:280">
P2: `"MiniMax-M2.7-highspeed"` config is unreachable via `get_llm_model_config` because `"MiniMax-M2.7"` appears first in the dict and matches via `startswith`. Swap the order so the longer (more specific) key is checked first.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Put MiniMax-M2.7-highspeed before MiniMax-M2.7 (and similarly for M2.5)
in the _model_defaults dict so that the more specific key is matched
first by the startswith lookup in get_llm_model_config.
@octo-patch
Copy link
Author

Good catch! Swapped the dict ordering so MiniMax-M2.7-highspeed appears before MiniMax-M2.7 (and similarly MiniMax-M2.5-highspeed before MiniMax-M2.5), ensuring the more specific key is matched first via startswith. Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Related to backend functionality or under the /backend directory size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant