test(voyage-multimodal): switch fixture from AVIF to PNG

Voyage's /multimodalembeddings endpoint rejects AVIF as of 2026-05
with 'Please provide a valid base64-encoded image'. The prior comment
('AVIF is fine for an embed call') held at v0.27.x and regressed
silently on the provider side.

Add test/fixtures/images/tiny.png (16x16 RGB PNG, 1307 bytes generated
via sips from the macOS default wallpaper). PNG is universally
accepted by Voyage and other multimodal providers.

Surfaced during fix-wave: warm-narwhal E2E gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-05-24 12:02:51 -07:00
co-authored by Claude Opus 4.7
parent d4fb84b681
commit 97769b4950
2 changed files with 5 additions and 4 deletions
+5 -4
View File
@@ -26,11 +26,12 @@ describe.if(HAS_KEY)('voyage-multimodal-3 (real API, gated VOYAGE_API_KEY)', ()
});
test('embeds the tiny PNG fixture into a 1024-dim vector', async () => {
// Reuse the Phase 1 fixture (the AVIF is fine for an embed call; Voyage
// accepts data URLs of common image types).
const buf = readFileSync('test/fixtures/images/tiny.avif');
// Use PNG fixture. Voyage's multimodal endpoint rejects AVIF as of
// 2026-05; the prior comment ("AVIF is fine") was true at v0.27.x and
// regressed silently on the provider side. PNG is universally accepted.
const buf = readFileSync('test/fixtures/images/tiny.png');
const data = buf.toString('base64');
const out = await embedMultimodal([{ kind: 'image_base64', data, mime: 'image/avif' }]);
const out = await embedMultimodal([{ kind: 'image_base64', data, mime: 'image/png' }]);
expect(out.length).toBe(1);
expect(out[0]).toBeInstanceOf(Float32Array);
expect(out[0].length).toBe(1024);
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB