From 2c7d6a24f69c896cd24b98850a294e7ecd1b7e98 Mon Sep 17 00:00:00 2001 From: deus Date: Sun, 9 Aug 2026 22:00:09 +0000 Subject: [PATCH] coder: extend max_tokens budget 1400 -> 65536 (model ctx now 64k) The [local] qwen3.6-coding context window is now 65536 (catalog/proxy). The coder still asked for max_tokens=1400, which a reasoning model burns entirely in reasoning_content, so content came back empty (job692/696/ 699/702, empty files). MAXBODY now defaults to 65536 and is overridable via BULLPEN_CODEGEN_MAXTOKENS. --- bin/bullpen-coder | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/bullpen-coder b/bin/bullpen-coder index 42c593c..810c8fa 100755 --- a/bin/bullpen-coder +++ b/bin/bullpen-coder @@ -26,7 +26,13 @@ SANDBOX = cfg.CODER_DIR CODEGEN_TIMEOUT = int(os.environ.get("BULLPEN_CODEGEN_TIMEOUT", "1800")) ENGINE = cfg.PROXY # gated proxy (gate+failover) MODEL = cfg.MODEL -MAXBODY = 1400 +# 2026-08-09: `[local] qwen3.6-coding` wurde von 32k auf 64k Kontext gestellt +# (Katalog ctx 65536). Die alte Grenze von 1400 max_tokens war der Kern des +# Leerdatei-Befunds (job692/696/699/702): ein Reasoning-Modell verbrennt sein +# ganzes Budget in `reasoning_content` und `content` kommt leer zurueck. 65536 +# geben dem Reasoning Raum UND lassen content noch Platz. Uebersteuerbar: +# BULLPEN_CODEGEN_MAXTOKENS. +MAXBODY = int(os.environ.get("BULLPEN_CODEGEN_MAXTOKENS", "65536")) SYS = ("You are a Lua coder. Given a task and any reference material, output ONLY valid Lua " "source that solves it AND includes a small self-test with sample data printed to stdout. " @@ -38,7 +44,7 @@ def gen_code(request): truth; report that, not the ask.""" payload = json.dumps({"model": MODEL, "messages": [{"role": "system", "content": SYS}, {"role": "user", "content": request}], - "temperature": 0.2, "max_tokens": 1400}).encode() + "temperature": 0.2, "max_tokens": MAXBODY}).encode() req = urllib.request.Request(ENGINE, payload, {"Content-Type": "application/json"}) with urllib.request.urlopen(req, timeout=CODEGEN_TIMEOUT) as r: d = json.load(r) -- 2.47.3