fix(site-import): 终审两阻塞——移除诊断落盘(c0eae14 反向提交修正)+ 租户 AI 槽位接线(routes→task→make_provider 传配置快照)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -234,17 +234,6 @@ async def _chat_json(provider, system: str, user: str, what: str,
|
||||
parsed = _flatten_nested(parsed)
|
||||
if shape_ok(parsed):
|
||||
return parsed
|
||||
# 诊断落盘(Task 10 走查:解析/shape 失败时留原始输出供排查)
|
||||
try:
|
||||
from pathlib import Path as _P
|
||||
_dbg = _P(__file__).resolve().parents[3] / ".superpowers" / "gen2_fail.txt"
|
||||
_dbg.write_text(
|
||||
"len=%d parse=%s shape=%s\n---\n%s" % (
|
||||
len(raw), parsed is not None,
|
||||
parsed is not None and shape_ok(parsed), raw),
|
||||
encoding="utf-8")
|
||||
except OSError:
|
||||
pass
|
||||
raise GenerateError(f"{what}:输出无法解析为 JSON 或 schema 不符(已自动重试一次)")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user