#788
feat: add MiniMax provider support with M3 as default
Summary
This PR adds MiniMax chat model support to @open-harness/agent via the Vercel AI Gateway, with MiniMax-M3 as the default model.
Changes
packages/agent/models.ts: AddshouldApplyMiniMaxDefaults()to detectminimax/*model IDs, and apply a defaulttemperature: 1viadefaultSettingsMiddleware. MiniMax's API rejectstemperature === 0, so this default ensures callers that omit temperature get a valid value. Comment updated to call out M3 (default), M2.7, and M2.7-highspeed coverage.packages/agent/index.ts: ExportshouldApplyMiniMaxDefaultsfrom the package index.packages/agent/models.test.ts: Add unit tests forshouldApplyMiniMaxDefaultsand MiniMaxgetProviderOptionsForModel, covering M3 (default), M2.7, and M2.7-highspeed.
Supported models
| Model ID | Description |
|---|---|
minimax/minimax-m3 (default) | 512K context window, up to 128K output, image input support |
minimax/minimax-m2.7 | Previous generation: Peak Performance. Ultimate Value. |
minimax/minimax-m2.7-highspeed | Previous generation low-latency variant |
All three IDs are already part of GatewayModelId in @ai-sdk/gateway and are routed through the existing Vercel AI Gateway. Older variants (M2.5/M2.1/M2/M1) are not included.
Why M3
MiniMax-M3 is the latest MiniMax model. Highlights:
- 512K context window
- Up to 128K max output tokens
- Image input supported (text + images; video/audio/documents not supported)
- OpenAI-compatible and Anthropic-compatible APIs
API references
- Chat (OpenAI Compatible): https://platform.minimax.io/docs/api-reference/text-openai-api
- Chat (Anthropic Compatible): https://platform.minimax.io/docs/api-reference/text-anthropic-api
- Pricing: https://platform.minimax.io/docs/guides/pricing-paygo
Test plan
- Unit tests for
shouldApplyMiniMaxDefaults(M3 + M2.7 + M2.7-highspeed) pass - Unit tests for
getProviderOptionsForModelwith MiniMax model IDs pass -
bun test packages/agent/models.test.ts— 19 pass, 0 fail
Activity
4hey! thanks but this is probably something we should patch in the gateway? cc @shaper
Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.