Skip to content

feat: add MiniMax as LLM provider#17

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

feat: add MiniMax as LLM provider#17
octo-patch wants to merge 1 commit into
51bitquant:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

Add MiniMax as a first-class LLM provider alongside OpenAI, Groq, OpenRouter, Gemini, Anthropic, and Ollama.

MiniMax offers the MiniMax-M2.7 and MiniMax-M2.7-highspeed models with 204K context windows via an OpenAI-compatible API, making it a drop-in alternative for crypto trading analysis.

Changes

  • src/llm/__init__.py: Add minimax provider branch in get_llm() factory using ChatOpenAI with base_url=https://api.minimax.io/v1 and temperature=0.7 (MiniMax requires temperature in (0, 1])
  • config.example.yaml: Add MiniMax configuration example and list minimax in provider comments
  • README.md: Add MiniMax to supported providers list, add MINIMAX_API_KEY to env setup
  • README_CN.md: Same updates for Chinese documentation
  • tests/test_minimax_provider.py: 18 tests (12 unit + 3 config validation + 3 integration)

Usage

# Set API key
export MINIMAX_API_KEY=your-minimax-api-key
# config.yaml
model:
  name: "MiniMax-M2.7"
  provider: "minimax"

Test Plan

  • 12 unit tests: provider instantiation, base URL, API key, model name, temperature, timeout, caching, backward compatibility with OpenAI/Groq/Anthropic
  • 3 config tests: verify config.example.yaml, README.md, README_CN.md mention MiniMax
  • 3 integration tests: MiniMax API connectivity, M2.7-highspeed model, temperature constraint
  • Manual: configure config.yaml with provider: minimax and run backtest

All 18 tests pass.


MiniMax API docs: https://www.minimax.io/platform

Add MiniMax (https://www.minimax.io) as a first-class LLM provider alongside
OpenAI, Groq, OpenRouter, Gemini, Anthropic, and Ollama. MiniMax offers the
MiniMax-M2.7 and MiniMax-M2.7-highspeed models with 204K context windows via
an OpenAI-compatible API.

Changes:
- Add "minimax" provider branch in get_llm() factory using ChatOpenAI with
  base_url=https://api.minimax.io/v1 and temperature=0.7
- Update config.example.yaml with MiniMax example configuration
- Update README.md and README_CN.md with MiniMax provider docs and API key setup
- Add 18 tests (12 unit + 3 config + 3 integration) in tests/test_minimax_provider.py

Usage:
  Set MINIMAX_API_KEY in .env, then configure config.yaml:
    model:
      name: "MiniMax-M2.7"
      provider: "minimax"
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