Commit 9c16b5e
committed
feat(minimax): add MiniMax provider with tier-aware rate limiting
Add MiniMax as a built-in provider using the generic tier framework (#82).
MiniMax is an OpenAI-compatible API provider with the M2.x model family
(M2.7, M2.5, M2.1, M2) and published token plan rate tiers.
Changes:
- New MiniMaxProvider with RATE_LIMIT_TIERS (starter/plus/max/ultra)
derived from published 5-hour rolling window limits
- Uses resolve_rate_limiter() from BaseProvider for tier resolution
- reasoning_split=True by default to separate thinking from content
- Bumped retry budget: 5 retries / 30s max for load-shedding tolerance
- Registered in provider registry with openai package dependency hint
- Conservative PROVIDER_DEFAULTS (Starter-tier: 5 RPM / 25K TPM)
- CLI env vars: MINIMAX_API_KEY, MINIMAX_BASE_URL,
MINIMAX_REASONING_SPLIT, MINIMAX_TIER
- 30 unit tests (constructor, tiers, generate, stream_chat, registry)
Rate limit tiers (from https://platform.minimax.io/docs/token-plan/intro):
Starter: 1,500 req/5hrs -> 5 RPM / 25K TPM
Plus: 4,500 req/5hrs -> 15 RPM / 75K TPM
Max: 15,000 req/5hrs -> 50 RPM / 250K TPM
Ultra: 30,000 req/5hrs -> 100 RPM / 500K TPM
Highspeed variants (e.g., MiniMax-M2.7-highspeed) share the same rate
limits as their base plan -- the difference is faster inference, not quota.
This provider is structurally identical to Z.AI (#83) and was trivial
to implement because both use the generic tier framework. The framework
eliminated all per-provider boilerplate for tier resolution.
Depends on: #82 (generic tier framework)
Ref: #681 parent ed682fb commit 9c16b5e
5 files changed
Lines changed: 802 additions & 1 deletion
File tree
- packages
- cli/src/repowise/cli
- core/src/repowise/core
- providers/llm
- tests/unit/test_providers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
281 | 291 | | |
282 | 292 | | |
283 | 293 | | |
| |||
336 | 346 | | |
337 | 347 | | |
338 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
339 | 361 | | |
340 | 362 | | |
341 | 363 | | |
342 | 364 | | |
343 | | - | |
| 365 | + | |
344 | 366 | | |
345 | 367 | | |
346 | 368 | | |
| |||
381 | 403 | | |
382 | 404 | | |
383 | 405 | | |
| 406 | + | |
384 | 407 | | |
385 | 408 | | |
386 | 409 | | |
| |||
0 commit comments