Commit cf29bf2
chaodu-agent
fix(gateway): add GIF size guard (5MB) in resize_and_compress
Prevents oversized GIFs from being base64-encoded and exceeding
downstream LLM API payload limits. Returns an error if the raw GIF
exceeds 5MB, consistent with the existing IMAGE_MAX_DOWNLOAD limit
for other formats.
Addresses review NIT from wangyuyan-agent.1 parent c4b0f27 commit cf29bf2
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
0 commit comments