Fix memory consolidation truncation: set max_tokens=16384
Consolidation was failing because max_tokens defaulted to 4096, causing Haiku's response to be truncated mid-JSON (finish_reason=max_tokens). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -426,6 +426,7 @@ Respond with ONLY valid JSON, no markdown fences."""
|
|||||||
],
|
],
|
||||||
model="claude-haiku-4-5",
|
model="claude-haiku-4-5",
|
||||||
thinking_budget=0,
|
thinking_budget=0,
|
||||||
|
max_tokens=16384,
|
||||||
)
|
)
|
||||||
text = (response.content or "").strip()
|
text = (response.content or "").strip()
|
||||||
if text.startswith("```"):
|
if text.startswith("```"):
|
||||||
|
|||||||
Reference in New Issue
Block a user