feat: 支持多模型提供商切换 (MiniMax M2.7/OpenAI/DeepSeek)#80
Open
octo-patch wants to merge 2 commits into
Open
Conversation
- 新增 ENABLE_SEARCH 环境变量控制DashScope搜索增强功能, 使用其他提供商时设为False避免兼容性问题 - 新增 _strip_think_tags 方法过滤模型返回的思考过程标签, 兼容MiniMax等带有推理标签的模型输出 - 在 README 和 .env.example 中添加 MiniMax、OpenAI、DeepSeek 等多提供商配置示例和文档 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update .env.example MiniMax config example to use MiniMax-M2.7 - Update README.md provider table to recommend MiniMax-M2.7
976b673 to
5c5ad85
Compare
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.
Summary
本项目目前默认使用阿里云 DashScope(通义千问),但其 OpenAI 兼容接口架构天然支持多种模型提供商。本 PR 增强了多提供商兼容性,主要改动:
ENABLE_SEARCH环境变量:TechAgent中enable_search为 DashScope 特有功能,使用 MiniMax / OpenAI / DeepSeek 等其他提供商时会导致兼容性问题。通过环境变量控制,默认开启以保持向后兼容_strip_think_tags方法:部分模型(如 MiniMax M2.7)会在回复中包含<think>...</think>推理过程标签,直接发送给用户会影响体验。新增过滤方法自动移除这些标签.env.example中添加 MiniMax、OpenAI、DeepSeek 的配置示例已测试的提供商
https://api.minimax.io/v1MiniMax-M2.7https://dashscope.aliyuncs.com/compatible-mode/v1qwen-maxChanges
ENABLE_SEARCHenv var to control DashScope-specific search feature_strip_think_tags()to filter<think>reasoning tags from model responses.env.examplewith MiniMax (M2.7), OpenAI, DeepSeek config examplesAPI Documentation