mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 04:07:39 +00:00
feat(image-tool): support multiple images in a single tool call (#17512)
* feat(image-tool): support multiple images in a single tool call - Change 'image' parameter to accept string | string[] (Type.Union) - Add 'maxImages' parameter (default 5) to cap abuse/token explosion - Update buildImageContext to create multiple image content parts - Normalize single string input to array for unified processing - Keep full backward compatibility: single string works as before - Update tool descriptions for both vision and non-vision models - MiniMax VLM falls back to first image (single-image API) - Details output adapts: 'image' key for single, 'images' for multi * bump default max images from 5 to 20
This commit is contained in:
@@ -192,9 +192,7 @@ describe("image tool implicit imageModel config", () => {
|
||||
});
|
||||
const tool = createImageTool({ config: cfg, agentDir, modelHasVision: true });
|
||||
expect(tool).not.toBeNull();
|
||||
expect(tool?.description).toContain(
|
||||
"Only use this tool when the image was NOT already provided",
|
||||
);
|
||||
expect(tool?.description).toContain("Only use this tool when images were NOT already provided");
|
||||
});
|
||||
|
||||
it("allows workspace images outside default local media roots", async () => {
|
||||
|
||||
Reference in New Issue
Block a user