#788

feat: add MiniMax provider support with M3 as default

Openocto-patchwants to merge intofrom

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: Add shouldApplyMiniMaxDefaults() to detect minimax/* model IDs, and apply a default temperature: 1 via defaultSettingsMiddleware. MiniMax's API rejects temperature === 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: Export shouldApplyMiniMaxDefaults from the package index.
  • packages/agent/models.test.ts: Add unit tests for shouldApplyMiniMaxDefaults and MiniMax getProviderOptionsForModel, covering M3 (default), M2.7, and M2.7-highspeed.

Supported models

Model IDDescription
minimax/minimax-m3 (default)512K context window, up to 128K output, image input support
minimax/minimax-m2.7Previous generation: Peak Performance. Ultimate Value.
minimax/minimax-m2.7-highspeedPrevious 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

Test plan

  • Unit tests for shouldApplyMiniMaxDefaults (M3 + M2.7 + M2.7-highspeed) pass
  • Unit tests for getProviderOptionsForModel with MiniMax model IDs pass
  • bun test packages/agent/models.test.ts — 19 pass, 0 fail

Activity

4
vercel[bot]7mo ago

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

nicoalbanese7mo ago

hey! thanks but this is probably something we should patch in the gateway? cc @shaper