Skip to content

feat: 支持多模型提供商切换 (MiniMax M2.7/OpenAI/DeepSeek)#80

Open
octo-patch wants to merge 2 commits into
shaxiu:mainfrom
octo-patch:feat/add-minimax-and-multi-provider-support
Open

feat: 支持多模型提供商切换 (MiniMax M2.7/OpenAI/DeepSeek)#80
octo-patch wants to merge 2 commits into
shaxiu:mainfrom
octo-patch:feat/add-minimax-and-multi-provider-support

Conversation

@octo-patch
Copy link
Copy Markdown

@octo-patch octo-patch commented Mar 12, 2026

Summary

本项目目前默认使用阿里云 DashScope(通义千问),但其 OpenAI 兼容接口架构天然支持多种模型提供商。本 PR 增强了多提供商兼容性,主要改动:

  • 新增 ENABLE_SEARCH 环境变量TechAgentenable_search 为 DashScope 特有功能,使用 MiniMax / OpenAI / DeepSeek 等其他提供商时会导致兼容性问题。通过环境变量控制,默认开启以保持向后兼容
  • 新增 _strip_think_tags 方法:部分模型(如 MiniMax M2.7)会在回复中包含 <think>...</think> 推理过程标签,直接发送给用户会影响体验。新增过滤方法自动移除这些标签
  • 文档和配置示例:在 README 中添加支持的模型提供商表格,在 .env.example 中添加 MiniMax、OpenAI、DeepSeek 的配置示例

已测试的提供商

提供商 MODEL_BASE_URL 推荐模型 测试状态
MiniMax https://api.minimax.io/v1 MiniMax-M2.7 Tested
通义千问 https://dashscope.aliyuncs.com/compatible-mode/v1 qwen-max Default

Changes

  • Add ENABLE_SEARCH env var to control DashScope-specific search feature
  • Add _strip_think_tags() to filter <think> reasoning tags from model responses
  • Update .env.example with MiniMax (M2.7), OpenAI, DeepSeek config examples
  • Update README with supported providers table (MiniMax M2.7 recommended)

API Documentation

PR Bot and others added 2 commits March 18, 2026 19:12
- 新增 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
@octo-patch octo-patch force-pushed the feat/add-minimax-and-multi-provider-support branch from 976b673 to 5c5ad85 Compare March 18, 2026 11:14
@octo-patch octo-patch changed the title feat: 支持多模型提供商切换 (MiniMax/OpenAI/DeepSeek) feat: 支持多模型提供商切换 (MiniMax M2.7/OpenAI/DeepSeek) Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant