refactor llm task modes

This commit is contained in:
bridge
2025-12-29 22:09:25 +08:00
parent c2cb8098ee
commit 05c31491c3
2 changed files with 9 additions and 1 deletions

View File

@@ -158,5 +158,12 @@ async def call_llm_with_task_name(
dict: LLM 返回的 JSON 数据
"""
mode = get_task_mode(task_name)
# 全局强制模式检查
# 如果 llm.mode 被设置为 normal 或 fast则强制覆盖
global_mode = getattr(CONFIG.llm, "mode", "default")
if global_mode in ["normal", "fast"]:
mode = LLMMode(global_mode)
return await call_llm_with_template(template_path, infos, mode, max_retries)