feat(inference): chat_structured 接入 jsonschema 真校验(T1 架构审查整改)

- pyproject.toml 新增 jsonschema>=4.23 依赖
- engine.py: json.loads 后 jsonschema.validate,校验失败按解析失败重试(带错误信息)
- 新增 3 用例:违规重试成功/耗尽 parse_error 含详情/合法一次通过
- 全量 163 passed / 100.00% 覆盖(936 stmts/238 br),fail_under=99 达标
This commit is contained in:
lhl
2026-08-12 09:32:02 +08:00
parent 0a79b07356
commit 25fc472d9b
5 changed files with 241 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ dependencies = [
"python-docx>=1.0",
"httpx>=0.28",
"jinja2>=3.1",
"jsonschema>=4.23",
]
[project.optional-dependencies]