mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 15:32:11 +08:00
56be86ef04
Compaction writes the output budget into agent.options.maxOutputTokens. LLMRequestPrep.prepare merges agent.options into providerOptions, and the AI SDK serializes it verbatim into the request body; strict OpenAI-compatible upstreams reject it with 'Unsupported parameter(s): maxOutputTokens'. Strip the injection site. The cap is still enforced through two independent paths: the constrained model passed downstream and the llm.ts re-cap on prepared.params.maxOutputTokens.