fix(writer): נטרול כלים ב-block_writer + style_analyzer — השלמת #182 #183
@@ -410,7 +410,7 @@ async def write_block(
|
||||
# Call Claude via Claude Code session (no API)
|
||||
model_key = block_cfg["model"]
|
||||
timeout = claude_session.LONG_TIMEOUT if model_key == "opus" else claude_session.DEFAULT_TIMEOUT
|
||||
content = await claude_session.query(prompt, timeout=timeout)
|
||||
content = await claude_session.query(prompt, timeout=timeout, tools="") # prose gen — no tool_use → no error_max_turns
|
||||
|
||||
sources = await _collect_block_sources(case_id, block_id)
|
||||
sources["case_law_ids"] = _precedent_case_law_ids
|
||||
|
||||
@@ -166,6 +166,7 @@ async def _analyze_single_pass(rows, appeal_subtype: str = "") -> dict:
|
||||
raw = await claude_session.query(
|
||||
ANALYSIS_PROMPT.format(decisions=decisions_text),
|
||||
timeout=claude_session.LONG_TIMEOUT,
|
||||
tools="", # text→JSON style analysis — no tool_use → no error_max_turns
|
||||
)
|
||||
|
||||
return await _parse_and_store_patterns(raw, len(rows), appeal_subtype)
|
||||
@@ -183,6 +184,7 @@ async def _analyze_multi_pass(rows, appeal_subtype: str = "") -> dict:
|
||||
raw = await claude_session.query(
|
||||
SINGLE_DECISION_PROMPT.format(decision=decision_text),
|
||||
timeout=claude_session.LONG_TIMEOUT,
|
||||
tools="", # text→JSON style analysis — no tool_use → no error_max_turns
|
||||
)
|
||||
|
||||
patterns = _extract_json(raw)
|
||||
@@ -199,6 +201,7 @@ async def _analyze_multi_pass(rows, appeal_subtype: str = "") -> dict:
|
||||
patterns=json.dumps(all_patterns, ensure_ascii=False, indent=2),
|
||||
),
|
||||
timeout=claude_session.LONG_TIMEOUT,
|
||||
tools="", # text→JSON style analysis — no tool_use → no error_max_turns
|
||||
)
|
||||
|
||||
return await _parse_and_store_patterns(raw, len(rows), appeal_subtype)
|
||||
|
||||
Reference in New Issue
Block a user