From a3753d0929fa599b826ddd374ac9c42131bc531d Mon Sep 17 00:00:00 2001 From: Piotr Oleszczyk Date: Sat, 28 Feb 2026 22:26:41 +0100 Subject: [PATCH] fix(backend): restore response_mime_type=json, raise max_output_tokens to 16384 Regular generation was hitting MAX_TOKENS at 8192. Constrained decoding with 16384 should be a viable middle ground between the truncation at 8192 and the timeout at 65536. Co-Authored-By: Claude Sonnet 4.6 --- backend/innercontext/api/products.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/innercontext/api/products.py b/backend/innercontext/api/products.py index dd3eeeb..c5fb1af 100644 --- a/backend/innercontext/api/products.py +++ b/backend/innercontext/api/products.py @@ -359,7 +359,8 @@ def parse_product_text(data: ProductParseRequest) -> ProductParseResponse: contents=f"Extract product data from this text:\n\n{data.text}", config=genai_types.GenerateContentConfig( system_instruction=_product_parse_system_prompt(), - max_output_tokens=8192, + response_mime_type="application/json", + max_output_tokens=16384, temperature=0.0, ), )