GitNexus/gitnexus/test
enih 1e5a1ad01e
fix(wiki): configure limits and retry truncated pages (#3775)
* feat(wiki): let callers set the completion token limit

Reasoning models can spend the hardcoded 16384 cap before a page is finished. Keep that default, and honor a flag, GITNEXUS_MAX_COMPLETION_TOKENS, or maxCompletionTokens in the CLI config.

Fixes #3774

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(wiki): reject LLM responses cut off at the completion token limit

callLLM accepted a response whose finish_reason was "length" as a
finished one, streamed or not, so a page cut off mid-sentence or
mid-table was written and the run reported success. With a reasoning
model the limit can be spent before the answer starts.

Both paths now throw when the provider reports finish_reason "length",
naming the limit. The generator already treats a thrown error as a
failed module: the page is not written, the module is listed under
"Failed modules", and the next run regenerates it.

---------

Co-authored-by: nullptr <null@null.ptr>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Samuel Mbabhazi <samuelmbabhazi@gmail.com>
Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
2026-10-31 13:24:37 +00:00
..
fixtures test: remove duplicate nullable helper cases (#3782) 2026-10-31 04:40:03 +00:00
helpers feat(ci): rebalance test shards from recorded timings (#3748) 2026-10-28 11:58:29 +00:00
integration test: consolidate assignment-chain integration cases (#3790) 2026-10-31 11:21:28 +00:00
unit fix(wiki): configure limits and retry truncated pages (#3775) 2026-10-31 13:24:37 +00:00
utils feat(storage): add configurable index storage and content retention tiers (#3060) 2026-09-12 20:31:55 +00:00