fix(core): honor the -1 sentinels for max_turns and max_tokens (#56)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-24 16:18:38 +08:00
committed by GitHub
parent 6bbdac132f
commit c7465625a4
10 changed files with 66 additions and 10 deletions
+1
View File
@@ -78,6 +78,7 @@ describe("metaMaxTokens (meta-request budget tightened by the per-model cap)", (
expect(metaMaxTokens(300, 8000)).toBe(300); // ample cap: the small budget stays
expect(metaMaxTokens(300, 128)).toBe(128); // pinned below the budget: the cap binds
expect(metaMaxTokens(2048, 1024)).toBe(1024); // vision-describer budget, same rule
expect(metaMaxTokens(300, -1)).toBe(300); // -1 = uncapped: never tightens to -1 (issue #55 sibling)
});
});