From 79a50a4d9a53e94170c63263c969fb23c3b9f6de Mon Sep 17 00:00:00 2001 From: cnndabbler Date: Tue, 9 Jun 2026 10:52:17 -0700 Subject: [PATCH] fix(compiler): don't cap concepts-plan output at max_tokens=2048 Reasoning/thinking models can exhaust a 2048-token budget before emitting the JSON plan, yielding empty output -> unparseable plan -> zero concept pages (silently). Remove the cap so concepts-plan matches the uncapped summary call. --- openkb/agent/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openkb/agent/compiler.py b/openkb/agent/compiler.py index 5623b21b..1d32b06b 100644 --- a/openkb/agent/compiler.py +++ b/openkb/agent/compiler.py @@ -1414,7 +1414,7 @@ async def _compile_concepts( concept_briefs=concept_briefs, entity_briefs=entity_briefs, ).replace("__ENTITY_TYPES__", types_str)}, - ], "concepts-plan", max_tokens=2048, response_format=_JSON_RESPONSE_FORMAT) + ], "concepts-plan", response_format=_JSON_RESPONSE_FORMAT) def _write_v1_summary_stripped() -> None: """Fallback writer for the v1 summary on early-return paths.