Skip to content

feat: add MiniMax as first-class LLM provider#344

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

feat: add MiniMax as first-class LLM provider#344
octo-patch wants to merge 1 commit intopezzolabs:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Adds MiniMax as a fully integrated LLM provider in Pezzo, on par with OpenAI. MiniMax offers an OpenAI-compatible API with powerful models (M2.7 with 1M token context, M2.5 with 204K context).

Changes

  • Type System (libs/types): Add MiniMax to Provider enum and MiniMaxChatCompletion to PromptService enum with provider details and prompt mappings
  • Console UI (apps/console):
    • Add MiniMax to provider selector (fully available, not "Coming Soon")
    • Add MiniMax chat completion settings definition (model selector, temperature 0.01-1.0, max tokens, top_p)
    • Add MiniMax to API key management providers list
    • Add MiniMax logo asset
  • Proxy Server (apps/proxy): Add MiniMaxV1Handler and /minimax/v1/* router for proxying requests to https://api.minimax.io/v1 with observability and caching support
  • Server (apps/server): Add MiniMax cost calculation in report builder with per-model pricing (M2.7, M2.7-highspeed, M2.5, M2.5-highspeed)
  • Client SDK (libs/client): Add PezzoMiniMax class wrapping OpenAI SDK with MiniMax base URL, temperature clamping, and full observability integration
  • README: Add supported LLM providers table listing MiniMax alongside OpenAI

MiniMax Models Supported

Model Context Window Use Case
MiniMax-M2.7 1M tokens Latest flagship model
MiniMax-M2.7-highspeed 1M tokens Fast inference variant
MiniMax-M2.5 204K tokens Balanced performance
MiniMax-M2.5-highspeed 204K tokens Fast inference variant

Key Implementation Details

  • MiniMax uses an OpenAI-compatible API (https://api.minimax.io/v1), so the PezzoMiniMax client wraps the OpenAI SDK with a custom base URL
  • Temperature is clamped to (0.01, 1.0] range as required by MiniMax API
  • Cost tracking uses per-model pricing tiers
  • Full proxy support with caching and observability reporting

Test Plan

  • 13 unit + integration tests for provider types (enum values, provider details, mappings)
  • 9 unit + integration tests for server report builder (cost calculation, model variants, fallback pricing)
  • 6 unit tests for proxy handler (API proxying, temperature clamping, cache hits, error handling, properties parsing)
  • All 28 tests passing via npx nx test types && npx nx test server && npx nx test proxy

19 files changed, 1218 additions

Add MiniMax as a fully integrated LLM provider alongside OpenAI,
with support for M2.7, M2.7-highspeed, M2.5, and M2.5-highspeed models.

Changes:
- Add MiniMax to Provider/PromptService enums and provider mappings
- Add MiniMax chat completion settings with temperature clamping (0.01-1.0)
- Add MiniMax to console provider selector (available, not Coming Soon)
- Add MiniMax to API key management UI
- Add MiniMax proxy handler/router for OpenAI-compatible API forwarding
- Add MiniMax cost calculation in server report builder
- Add PezzoMiniMax client wrapper in @pezzo/client SDK
- Add MiniMax logo asset
- Add 28 tests (13 type + 9 server + 6 proxy)
- Update README with supported LLM providers table

Signed-off-by: octopus <[email protected]>
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