Commit 0509d8a
fix(multimodal): reject any malformed CustomEncoder image item
image_urls is image_items filtered to dicts with a 'Url' key, so the old
`image_items and not image_urls` check only fired when ALL items were
malformed — a mixed list (some 'Url', some 'Decoded'/malformed) slipped
through and was encoded with the bad items silently dropped. Compare
lengths instead: reject the request if any item lacks a usable 'Url'.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 76a7e4a commit 0509d8a
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3400 | 3400 | | |
3401 | 3401 | | |
3402 | 3402 | | |
3403 | | - | |
3404 | | - | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| 3406 | + | |
3405 | 3407 | | |
3406 | | - | |
3407 | | - | |
3408 | | - | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
3409 | 3411 | | |
3410 | 3412 | | |
3411 | 3413 | | |
3412 | 3414 | | |
3413 | 3415 | | |
3414 | | - | |
3415 | | - | |
3416 | | - | |
| 3416 | + | |
| 3417 | + | |
3417 | 3418 | | |
3418 | 3419 | | |
3419 | 3420 | | |
| |||
0 commit comments