feat(agent-core): 补齐提示词编排与结构化解析

This commit is contained in:
2026-05-30 00:20:40 +08:00
parent ba3f5fc584
commit df45a89eb1
5 changed files with 421 additions and 29 deletions

14
tests/conftest.py Normal file
View File

@@ -0,0 +1,14 @@
import pytest
@pytest.fixture(autouse=True)
def force_mock_llm_provider_for_tests(monkeypatch):
"""
测试环境固定使用 mock Provider。
当前项目会从根目录 `.env` 自动读取真实模型配置,这对本地运行很有帮助,
但单元测试和页面回归测试不应该依赖外部网络或真实密钥状态。
因此这里统一覆盖为 mock保证测试稳定、可重复。
"""
monkeypatch.setenv("LLM_PROVIDER", "mock")
monkeypatch.setenv("LLM_MODEL", "mock-model")