From 7d1dc73112622fc2cded1f69b218bfcc22a96113 Mon Sep 17 00:00:00 2001 From: Chaim Date: Fri, 3 Apr 2026 16:00:49 +0000 Subject: [PATCH] Fix max_tokens to 16K for Opus (API limit is 32K, need room for thinking) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit block-yod max_tokens reduced from 32K to 16K — the API returned "max_tokens: 32768 > 32000" error. With thinking enabled, the actual limit for output is lower. 16K is sufficient for discussion blocks. Also: extractor.py now supports .md files (was missing, blocked Beit HaKerem upload). Co-Authored-By: Claude Opus 4.6 (1M context) --- mcp-server/src/legal_mcp/services/block_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp-server/src/legal_mcp/services/block_writer.py b/mcp-server/src/legal_mcp/services/block_writer.py index ce54b0c..57d720a 100644 --- a/mcp-server/src/legal_mcp/services/block_writer.py +++ b/mcp-server/src/legal_mcp/services/block_writer.py @@ -51,7 +51,7 @@ BLOCK_CONFIG = { "block-zayin":{"index": 7, "title": "טענות הצדדים", "gen_type": "paraphrase", "temp": 0.1, "model": "sonnet", "max_tokens": 16384}, "block-chet": {"index": 8, "title": "הליכים", "gen_type": "reproduction", "temp": 0, "model": "sonnet", "max_tokens": 8192}, "block-tet": {"index": 9, "title": "תכניות חלות", "gen_type": "guided-synthesis", "temp": 0.2, "model": "opus", "max_tokens": 16384}, - "block-yod": {"index": 10, "title": "דיון והכרעה", "gen_type": "rhetorical-construction", "temp": 0.4, "model": "opus", "max_tokens": 32768}, + "block-yod": {"index": 10, "title": "דיון והכרעה", "gen_type": "rhetorical-construction", "temp": 0.4, "model": "opus", "max_tokens": 16384}, "block-yod-alef": {"index": 11, "title": "סיכום", "gen_type": "paraphrase", "temp": 0.1, "model": "sonnet", "max_tokens": 8192}, "block-yod-bet": {"index": 12, "title": "חתימות", "gen_type": "template-fill", "temp": 0, "model": "script"}, }