refactor: complete runtime configuration migration

This commit is contained in:
jxxghp
2026-08-22 19:07:07 +08:00
parent d131f8d571
commit 1bb6e36e8c
80 changed files with 1432 additions and 581 deletions
+7
View File
@@ -1,3 +1,4 @@
from dataclasses import replace
from unittest.mock import AsyncMock, patch
import pytest
@@ -78,6 +79,12 @@ def test_handle_ai_message_routes_text_only_model_images_to_files(
):
"""纯文本模型收到图片消息时,应降级为文件附件而非 image_url 内容块。"""
chain = MessageChain()
chain.runtime_config = replace(
chain.runtime_config,
ai_agent_enable=True,
llm_provider="minimax",
llm_model="MiniMax-M2.7",
)
monkeypatch.setattr(settings, "AI_AGENT_ENABLE", True)
monkeypatch.setattr(settings, "LLM_SUPPORT_IMAGE_INPUT", True)
monkeypatch.setattr(settings, "LLM_PROVIDER", "minimax")