Skip to content

feat: add MiniMax provider support#90

Open
BingqingLyu wants to merge 3 commits into
mainfrom
fork-pr-3165-feature-add-minimax-provider
Open

feat: add MiniMax provider support#90
BingqingLyu wants to merge 3 commits into
mainfrom
fork-pr-3165-feature-add-minimax-provider

Conversation

@BingqingLyu

@BingqingLyu BingqingLyu commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds MiniMax as an OpenAI-compatible provider for Qwen Code.

Changes

  • New provider: MiniMaxOpenAICompatibleProvider extending DefaultOpenAICompatibleProvider
    • Default base URL applied in buildClient() override (matches sibling provider pattern)
    • Supports api.minimaxi.com as an alternative (domestic mirror)
    • URL detection uses new URL(baseUrl).hostname to prevent substring false-positives (fixes CodeQL warnings)
    • Temperature: guards against null per SDK types (number | null | undefined)
    • response_format: removed via typed destructuring — no any cast or delete
  • Token limits: explicit entries for MiniMax-M2.7 / M2.7-highspeed (200K input, 64K output)
  • Documentation: new MiniMax section in docs/users/configuration/model-providers.md
  • Tests: 15 unit tests including null-temperature and hostname-spoofing cases

Supported Models

Model ID Description
MiniMax-M2.7 Peak Performance, Ultimate Value
MiniMax-M2.7-highspeed Same performance, faster and more agile

API References

octo-patch added 3 commits April 12, 2026 16:39
- Add MiniMaxOpenAICompatibleProvider extending DefaultOpenAICompatibleProvider
- Use OpenAI-compatible interface with https://api.minimax.io/v1 as default base URL
- Enforce temperature in (0.0, 1.0] range; remove unsupported response_format
- Register provider detection in determineProvider() factory
- Add token limits for MiniMax-M2.7 (200K input, 64K output)
- Add unit tests for all provider behaviors
- Fix URL detection to use hostname comparison (prevents substring
  false positives flagged by CodeQL)
- Move default base URL to buildClient() override — avoids mutating
  contentGeneratorConfig in the constructor (matches sibling pattern)
- Replace any cast + delete with typed destructuring for response_format
- Guard temperature against null (number | null | undefined per SDK types)
- Clarify token-limit comment: regex covers M2.7-highspeed too
- Add MiniMax section to model-providers.md with config examples
  for both MiniMax-M2.7 and MiniMax-M2.7-highspeed
…t pattern

- buildRequest now clamps temperature > 1.0 down to 1.0 (was previously
  passed through to API and would have failed). Adds debug logs via the
  project DebugLogger when an explicit user value is rewritten so the
  adjustment is observable.
- Removed redundant /^minimax-m2.7/ entry in tokenLimits.ts; the existing
  /^minimax-/ fallback already maps M2.7 / M2.7-highspeed to 200K.

Addresses review suggestions on QwenLM#3165.
@BingqingLyu BingqingLyu added conflicting-group-1 Conflicting PR group 1 — review as a batch conflicting-pr Shares at least one cross-PR dependency with other PRs and removed conflicting-pr labels May 7, 2026
@BingqingLyu

BingqingLyu commented May 7, 2026

Copy link
Copy Markdown
Owner Author

Conflict Group 1

This PR shares modified functions with 5 other PR(s): #1, #113, #114, #117, #88.

These PRs should be reviewed as a batch — merging one may affect the others.

Function File Also modified by
determineProvider index.ts #1, #113, #114, #117, #88
graph LR
    PR90["PR #90"]
    FdetermineProvider_2049["determineProvider<br>index.ts"]
    PR90 -->|modifies| FdetermineProvider_2049
    PR1["PR #1"]
    PR1 -->|modifies| FdetermineProvider_2049
    PR113["PR #113"]
    PR113 -->|modifies| FdetermineProvider_2049
    PR114["PR #114"]
    PR114 -->|modifies| FdetermineProvider_2049
    PR117["PR #117"]
    PR117 -->|modifies| FdetermineProvider_2049
    PR88["PR #88"]
    PR88 -->|modifies| FdetermineProvider_2049
Loading

Posted by codegraph-ai conflict detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicting-group-1 Conflicting PR group 1 — review as a batch conflicting-pr Shares at least one cross-PR dependency with other PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant