mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
refactor: complete runtime configuration migration
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user