Skip to content

feat: add MiniMax provider support#76

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

feat: add MiniMax provider support#76
octo-patch wants to merge 1 commit into
ferrislucas:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Add MiniMax chat model support via OpenAI-compatible API
  • Add model shortcuts: minimax (→ MiniMax-M2.7) and minimax-highspeed (→ MiniMax-M2.7-highspeed)
  • Add unit tests for MiniMax provider detection and model aliases

Usage

# Set your MiniMax API key
export MINIMAX_API_KEY=your-key-here

# Use MiniMax-M2.7 (default)
promptr -m minimax -p "Refactor this function" src/myfile.js

# Use MiniMax-M2.7-highspeed
promptr -m minimax-highspeed -p "Add error handling" src/myfile.js

# Use full model name directly
promptr -m MiniMax-M2.7 -p "Add unit tests" src/myfile.js

Implementation Details

  • Detects MiniMax models by checking if the model name starts with minimax (case-insensitive)
  • Uses MINIMAX_API_KEY environment variable and https://api.minimax.io/v1 base URL
  • Uses the modern tools API format (MiniMax does not support the legacy functions API)
  • Places system messages before user messages (required by MiniMax's API)
  • Clamps temperature to the valid range (0.0, 1.0] (MiniMax does not accept temperature=0)
  • Custom base URL override via MINIMAX_BASE_URL environment variable

API Reference

- Add MiniMax chat model provider using OpenAI-compatible API
- Add model aliases: "minimax" → MiniMax-M2.7, "minimax-highspeed" → MiniMax-M2.7-highspeed
- Use MINIMAX_API_KEY and https://api.minimax.io/v1 base URL for MiniMax models
- Use modern tools API (not legacy functions) for MiniMax compatibility
- Reorder system messages before user messages for MiniMax
- Clamp temperature to (0.0, 1.0] range required by MiniMax
- Add unit tests for MiniMax provider detection and model aliases
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