fix: sanitize oversized image payloads
This commit is contained in:
@@ -23,5 +23,10 @@ describe("isCloudCodeAssistFormatError", () => {
|
||||
});
|
||||
it("ignores unrelated errors", () => {
|
||||
expect(isCloudCodeAssistFormatError("rate limit exceeded")).toBe(false);
|
||||
expect(
|
||||
isCloudCodeAssistFormatError(
|
||||
"400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.84.content.1.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels\"}}",
|
||||
),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user