feat(provider): 支持 MiniMax 接入与混合分组路由 - #6315
Open
chhuax wants to merge 1 commit into
Open
Conversation
Contributor
|
All contributors have signed the CLA. ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
chhuax
force-pushed
the
feature/minimax-provider
branch
from
August 28, 2026 06:04
38fd99e to
25d65a0
Compare
Author
|
recheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
目前系统没有将 MiniMax 作为一等平台接入。即使管理员把 MiniMax API Key 配成 OpenAI 兼容账号,仍存在以下问题:
minimax隔离平台,容易与 OpenAI 账号混用。方案
本 PR 在现有 CN provider 架构上增加独立的
PlatformMiniMax,不引入额外 registry 重构,并把平台能力接入账号、分组、调度、网关、计费、迁移和管理端。协议与端点
MiniMax API Key 账号支持以下模式:
https://api.minimax.io/v1/chat/completionshttps://api.minimax.io/anthropic/v1/messageshttps://api.minimax.io/v1/responsesResponses 复用现有原生 Responses 转发链,包括客户端工具适配、
max_output_tokens保留和响应转换;Anthropic 请求走供应商原生 Messages 直通路径。MiniMax 当前仅开放按量付费账号模式。Composite 混合分组
minimax加入 Composite 可选目标平台、具体平台校验、调度快照、模型列表和渠道定价匹配。minimax/*、minimax-*以及MiniMax-M3等模型名并路由到 MiniMax 账号池。/v1/models和 Codex 模型清单包含MiniMax-M3、MiniMax-M2.7、MiniMax-M2.7-highspeed。定价
根据 MiniMax Pay-as-you-go pricing 更新 fallback pricing:
MiniMax-M3Standard:输入$0.30/MTok、输出$1.20/MTok、缓存读取$0.06/MTok。MiniMax-M2.7、MiniMax-M2.7-highspeed等模型的缓存写入价格。管理端
MiniMax 暂未加入 Channel Monitor 的余额/配额探测:官方没有适合该场景的轻量公开查询端点。账号仍沿用现有上游错误处理和响应式冷却机制。
迁移与兼容性
新增
232_add_minimax_platform.sql,只扩展以下数据库 allowlist,不修改已有数据:user_platform_quotas.platformcomposite_model_routes.target_platform已有平台和账号行为保持不变。自定义 base URL、请求头覆写、错误透传和 LiteLLM 定价同步均沿用现有机制。
测试
go test -tags=unit ./...vue-tsc -bvite build