feat: add MiniMax provider catalog support - #1918
Conversation
Reviewer's Guide在模型提供者枚举中增加 MiniMax 作为受支持的提供者,通过兼容 OpenAI 的路径为 LLM 和 Embeddings 提供路由,允许在多模态工作流白名单中使用,并引入专门的 MiniMax catalog YAML,其中包含两个模型及其能力元数据。 通过 OpenAI 兼容路径进行 MiniMax 路由的序列图sequenceDiagram
actor User
participant BaseModels as get_provider_llm_class
participant EmbeddingsFactory as get_provider_embedding_class
User->>BaseModels: get_provider_llm_class(ModelProvider.MINIMAX)
BaseModels-->>User: CompatibleChatOpenAI
User->>EmbeddingsFactory: get_provider_embedding_class(ModelProvider.MINIMAX)
EmbeddingsFactory-->>User: OpenAIEmbeddings
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 以:
Getting HelpOriginal review guide in EnglishReviewer's GuideAdds MiniMax as a supported provider across the model provider enum, OpenAI-compatible routing for LLMs and embeddings, multimodal workflow allowlist, and introduces a dedicated MiniMax catalog YAML with two models and capabilities metadata. Sequence diagram for MiniMax routing through OpenAI-compatible pathssequenceDiagram
actor User
participant BaseModels as get_provider_llm_class
participant EmbeddingsFactory as get_provider_embedding_class
User->>BaseModels: get_provider_llm_class(ModelProvider.MINIMAX)
BaseModels-->>User: CompatibleChatOpenAI
User->>EmbeddingsFactory: get_provider_embedding_class(ModelProvider.MINIMAX)
EmbeddingsFactory-->>User: OpenAIEmbeddings
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
- 在
minimax_models.yaml中,建议尽量复用现有的能力键(例如thinking),而不是引入thinking_only,除非能力的 schema 和下游逻辑已经明确支持这个新值。 - 请确认通过
CompatibleChatOpenAI和OpenAIEmbeddings来路由 MiniMax 时,是否与 MiniMax API 的语义(请求/响应字段、认证、速率限制)保持一致;如果存在任何差异,建议为 MiniMax 引入一个专门的、与提供方绑定的类。 - 由于 MiniMax 已被加入到支持多模态的 provider allowlist 中,请确保该 provider 下的非多模态模型(比如 MiniMax-M2.7)要么能通过能力进行过滤,要么能在工作流 UI/校验中得到合理的处理。
面向 AI 智能体的提示词
Please address the comments from this code review:
## Overall Comments
- In `minimax_models.yaml`, consider reusing existing capability keys (e.g., `thinking`) instead of introducing `thinking_only` unless the capability schema and downstream logic already explicitly support this new value.
- Confirm that routing MiniMax through `CompatibleChatOpenAI` and `OpenAIEmbeddings` matches the MiniMax API semantics (request/response fields, auth, rate limits), or introduce a dedicated provider-specific class if any divergences exist.
- Since MiniMax is added to the multimodal-compatible provider allowlist, ensure that non-multimodal models under this provider (like MiniMax-M2.7) are either filtered by capability or handled gracefully by the workflow UI/validation.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- In
minimax_models.yaml, consider reusing existing capability keys (e.g.,thinking) instead of introducingthinking_onlyunless the capability schema and downstream logic already explicitly support this new value. - Confirm that routing MiniMax through
CompatibleChatOpenAIandOpenAIEmbeddingsmatches the MiniMax API semantics (request/response fields, auth, rate limits), or introduce a dedicated provider-specific class if any divergences exist. - Since MiniMax is added to the multimodal-compatible provider allowlist, ensure that non-multimodal models under this provider (like MiniMax-M2.7) are either filtered by capability or handled gracefully by the workflow UI/validation.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `minimax_models.yaml`, consider reusing existing capability keys (e.g., `thinking`) instead of introducing `thinking_only` unless the capability schema and downstream logic already explicitly support this new value.
- Confirm that routing MiniMax through `CompatibleChatOpenAI` and `OpenAIEmbeddings` matches the MiniMax API semantics (request/response fields, auth, rate limits), or introduce a dedicated provider-specific class if any divergences exist.
- Since MiniMax is added to the multimodal-compatible provider allowlist, ensure that non-multimodal models under this provider (like MiniMax-M2.7) are either filtered by capability or handled gracefully by the workflow UI/validation.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Updated the PR to keep MiniMax support scoped to the documented text models: MiniMax is no longer exposed as an embedding provider, and multimodal input now follows each model's declared capabilities so MiniMax-M2.7 remains text-only. I ran Python compile checks, focused catalog/source assertions, and git diff --check. |
Reason: Add MiniMax provider support to the model catalog and OpenAI-compatible runtime routing.
Changes:
Checks:
python -m compileallfor the patched Python modules.uv run pythonsource-level verification of the new provider enum, runtime routing, and catalog file.Summary by Sourcery
在模型目录和运行时路由中添加对 MiniMax 的支持。
新功能:
Original summary in English
Summary by Sourcery
Add MiniMax as a supported provider across the model catalog and runtime routing.
New Features: