Repository navigation
feat(compression): make Lite tool-result truncation length configurable - #13915
diegosouzapw merged 4 commits into
Conversation
Lite truncated tool results at a hardcoded 2000 characters. Coding-agent payloads (file reads, crash dumps) lost the middle of the content with no supported way to raise the cap. Honor lite.maxToolLength from settings, then OMNIROUTE_LITE_MAX_TOOL_LENGTH, then 2000. Existing installs keep the old length. Related to cheaper-inference#13178. Signed-off-by: Minxi Hou <houminxi@gmail.com> cheaper-inference#13178 stays open.
…complete An out-of-range step maxToolLength was still a number, so it hid a valid global cap and fell through to env. A toggle-only settings PUT replaced the whole lite row and dropped the stored cap. Save treated an out-of-range number like a cleared field. Reject the bad Save, merge omitted caps, and use null to clear. Related to cheaper-inference#13178. Signed-off-by: Minxi Hou <houminxi@gmail.com>
|
Inline review of
Copy that still said "over 2,000 characters" is updated. Lite Preview still posts a user message, so it cannot show tool truncation. That is existing preview scope, not this change. Tests: node 65/65, vitest 15/15. Injected the three defects at the call sites; each test failed, then passed after restore. |
The page overlays schema descriptions from i18n. Updating only LITE_SCHEMA left operators seeing "over 2,000 characters" after the cap became configurable. Also assert the Save error string, not the Save button. Related to cheaper-inference#13178. Signed-off-by: Minxi Hou <houminxi@gmail.com>
|
Follow-up on the last review of The three runtime issues stayed fixed. Two leftovers were still real:
Lite Preview still posts a user message and does not send |
|
Third look at The runtime cap, the settings merge, the dashboard copy, and the out-of-range Save error all still match the earlier follow-ups. No new defects. Lite Preview still posts a user message and does not send |
|
Fifth look at Same SHA as the third and fourth looks. Runtime cap, settings merge, dashboard copy, and out-of-range Save still hold. No new defects. Lite Preview still posts a user message and does not send |
ec780ef
into
cheaper-inference:release/v3.8.51
…le (cheaper-inference#13915) * feat(compression): make Lite tool-result truncation length configurable Lite truncated tool results at a hardcoded 2000 characters. Coding-agent payloads (file reads, crash dumps) lost the middle of the content with no supported way to raise the cap. Honor lite.maxToolLength from settings, then OMNIROUTE_LITE_MAX_TOOL_LENGTH, then 2000. Existing installs keep the old length. Related to cheaper-inference#13178. Signed-off-by: Minxi Hou <houminxi@gmail.com> cheaper-inference#13178 stays open. * compression/lite: keep a stored cap when a step or toggle write is incomplete An out-of-range step maxToolLength was still a number, so it hid a valid global cap and fell through to env. A toggle-only settings PUT replaced the whole lite row and dropped the stored cap. Save treated an out-of-range number like a cleared field. Reject the bad Save, merge omitted caps, and use null to clear. Related to cheaper-inference#13178. Signed-off-by: Minxi Hou <houminxi@gmail.com> * compression/lite: stop dashboard copy from hard-coding a 2000-char cap The page overlays schema descriptions from i18n. Updating only LITE_SCHEMA left operators seeing "over 2,000 characters" after the cap became configurable. Also assert the Save error string, not the Save button. Related to cheaper-inference#13178. Signed-off-by: Minxi Hou <houminxi@gmail.com> * chore(changelog): move cheaper-inference#13915 entry to a changelog.d fragment --------- Signed-off-by: Minxi Hou <houminxi@gmail.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Summary
Lite truncated tool results at a hardcoded 2000 characters. File reads and crash dumps arriving as tool payloads lost the middle of the content, and there was no supported way to raise the cap.
This adds
lite.maxToolLengthnext to the existingcompressToolResultstoggle. Resolution order:OMNIROUTE_LITE_MAX_TOOL_LENGTHDefault stays 2000, so existing installs do not change. The truncation-allowlist idea stays a follow-up.
Related to #13178.
#13178 stays open.
Test plan
compressToolResultshonors an explicit cap below 2000OMNIROUTE_LITE_MAX_TOOL_LENGTHis read when no option is passedmaxToolLengthmaxToolLength(default 2000, min 256){ compressToolResults, maxToolLength }when the operator set a capmaxToolLengthwhen settings never stored one, and when the number input is cleared