mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:21:24 +00:00
fix: increase image tool maxTokens from 512 to 4096 (#11770)
* increase image tool maxTokens from 512 to 4096 * fix: cap image tool tokens by model capability (#11770) (thanks @detecti1) * docs: fix changelog attribution for #11770 --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -346,6 +346,18 @@ describe("image tool MiniMax VLM routing", () => {
|
||||
});
|
||||
|
||||
describe("image tool response validation", () => {
|
||||
it("caps image-tool max tokens by model capability", () => {
|
||||
expect(__testing.resolveImageToolMaxTokens(4000)).toBe(4000);
|
||||
});
|
||||
|
||||
it("keeps requested image-tool max tokens when model capability is higher", () => {
|
||||
expect(__testing.resolveImageToolMaxTokens(8192)).toBe(4096);
|
||||
});
|
||||
|
||||
it("falls back to requested image-tool max tokens when model capability is missing", () => {
|
||||
expect(__testing.resolveImageToolMaxTokens(undefined)).toBe(4096);
|
||||
});
|
||||
|
||||
it("rejects image-model responses with no final text", () => {
|
||||
expect(() =>
|
||||
__testing.coerceImageAssistantText({
|
||||
|
||||
Reference in New Issue
Block a user