fix: sanitize oversized image payloads
This commit is contained in:
1 parent
891a2cc64a
commit
9c06689569
10 files changed
+208
-17
No files matched your search
@@ -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