mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-28 16:20:56 +08:00
✨ feat(llm): 优化 DeepSeek 适配器 (#2160)
检查bot是否运行正常 / bot check (push) Waiting to run
CodeQL Code Security Analysis / Analyze (python) (push) Waiting to run
Sequential Lint and Type Check / pyright-call (push) Blocked by required conditions
Release Drafter / Update Release Draft (push) Waiting to run
Ruff Lint / Ruff Lint (push) Waiting to run
Force Sync to Aliyun / sync (push) Waiting to run
Sequential Lint and Type Check / ruff-call (push) Waiting to run
Update Version / update-version (push) Waiting to run
检查bot是否运行正常 / bot check (push) Waiting to run
CodeQL Code Security Analysis / Analyze (python) (push) Waiting to run
Sequential Lint and Type Check / pyright-call (push) Blocked by required conditions
Release Drafter / Update Release Draft (push) Waiting to run
Ruff Lint / Ruff Lint (push) Waiting to run
Force Sync to Aliyun / sync (push) Waiting to run
Sequential Lint and Type Check / ruff-call (push) Waiting to run
Update Version / update-version (push) Waiting to run
* ✨ feat(llm): 新增 Grok 适配器及 API 密钥重置指令 - 新增 Grok 适配器并支持原生推特检索工具 `x_search` - 优化 DeepSeek 适配器以迁移至 Responses 协议,增强多模态支持 - 在 LLM 管理插件中新增 `llm reset` 子命令以重置 Key 状态 - 增强 MCP 连接异常处理及流关闭容错能力 * 🚨 auto fix by pre-commit hooks --------- Co-authored-by: webjoin111 <455457521@qq.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
webjoin111
pre-commit-ci[bot]
parent
39ed1ade14
commit
33d6ea1335
@@ -9,6 +9,7 @@ from zhenxun.utils.pydantic_compat import model_copy
|
||||
|
||||
CTX_1_05M = 1_050_000
|
||||
CTX_1M = 1_000_000
|
||||
CTX_500K = 500_000
|
||||
CTX_400K = 400_000
|
||||
CTX_256K = 256_000
|
||||
CTX_200K = 204_800
|
||||
@@ -122,7 +123,16 @@ CAP_OPENAI_MULTIMODAL = ModelCapabilities(
|
||||
},
|
||||
reasoning_effort_map={"max": "xhigh", "minimal": "none"},
|
||||
)
|
||||
CAP_DEEPSEEK_V4 = ModelCapabilities(
|
||||
CAP_GROK = ModelCapabilities(
|
||||
input_modalities={ModelModality.TEXT, ModelModality.IMAGE},
|
||||
output_modalities={ModelModality.TEXT},
|
||||
supports_tool_calling=True,
|
||||
reasoning_mode=ReasoningMode.EFFORT,
|
||||
reasoning_visibility="visible",
|
||||
supported_native_tools={"web_search", "x_search", "code_execution", "file_search"},
|
||||
)
|
||||
|
||||
CAP_DEEPSEEK_PRO = ModelCapabilities(
|
||||
input_modalities={ModelModality.TEXT},
|
||||
output_modalities={ModelModality.TEXT},
|
||||
supports_tool_calling=True,
|
||||
@@ -130,6 +140,14 @@ CAP_DEEPSEEK_V4 = ModelCapabilities(
|
||||
reasoning_mode=ReasoningMode.EFFORT,
|
||||
reasoning_visibility="visible",
|
||||
reasoning_effort_map={"minimal": "low"},
|
||||
supported_native_tools={"web_search"},
|
||||
)
|
||||
|
||||
CAP_DEEPSEEK_FLASH = model_copy(
|
||||
CAP_DEEPSEEK_PRO,
|
||||
update={
|
||||
"input_modalities": {ModelModality.TEXT, ModelModality.IMAGE},
|
||||
},
|
||||
)
|
||||
CAP_MINIMAX_REASONING = ModelCapabilities(
|
||||
input_modalities={ModelModality.TEXT},
|
||||
@@ -279,7 +297,10 @@ _ROUTING_TABLE: list[tuple[list[str], ModelCapabilities, int]] = [
|
||||
(["*gemini*image*", "*nano-banana*"], CAP_GEMINI_IMAGE, CTX_128K),
|
||||
(["glm-4.6v*"], CAP_GLM_MULTIMODAL, CTX_128K),
|
||||
(["glm-4.7-flash*"], STANDARD_TEXT_TOOL_CAPABILITIES, CTX_128K),
|
||||
(["deepseek-v4-pro*", "deepseek-v4-flash*"], CAP_DEEPSEEK_V4, CTX_1M),
|
||||
(["*grok-4.3*", "*grok-4.20*"], CAP_GROK, CTX_1M),
|
||||
(["*grok*"], CAP_GROK, CTX_500K),
|
||||
(["*deepseek*pro*"], CAP_DEEPSEEK_PRO, CTX_1M),
|
||||
(["*deepseek*flash*"], CAP_DEEPSEEK_FLASH, CTX_1M),
|
||||
(["glm-4-long*"], STANDARD_TEXT_TOOL_CAPABILITIES, CTX_1M),
|
||||
(["*MiniMax-M3*"], CAP_MINIMAX_MULTIMODAL, CTX_1M),
|
||||
(["mimo-v2.5-pro*", "mimo-v2-pro*", "mimo-v2-flash*"], CAP_MIMO_TEXT, CTX_1M),
|
||||
|
||||
Reference in New Issue
Block a user