hermes-agent/tests/plugins/image_gen
kshitijk4poor 019950560d refactor(image-gen): reuse shared image sniffer + raster allowlist in codex backend
Replace the plugin-local _IMAGE_MAGIC_MIME table + _sniff_image_mime
body with a delegation to agent.image_routing._sniff_mime_from_bytes,
the canonical magic-byte sniffer already used across the codebase, then
gate its result to the raster formats gpt-image-2's Responses
input_image actually accepts (png/jpeg/gif/webp).

The shared sniffer also recognizes SVG/TIFF/ICO; without the allowlist
those would pass local validation and be rejected server-side with an
opaque HTTP 400. Gating locally fails them cleanly as invalid_image_input.
Adds a regression test for SVG rejection.

Follow-up on top of @CrazyBoyM's #55828.
2026-07-02 17:12:24 +05:30
..
__init__.py
check_parity_vs_main.py refactor(image_gen): port FAL backend to plugins/image_gen/fal 2026-05-22 04:10:45 -07:00
test_fal_provider.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_krea_provider.py fix shape 2026-06-25 12:38:33 -07:00
test_openai_codex_provider.py refactor(image-gen): reuse shared image sniffer + raster allowlist in codex backend 2026-07-02 17:12:24 +05:30
test_openai_provider.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_openrouter_compat_provider.py test(image-gen): cover Nous/OpenRouter top-level model resolution 2026-06-30 19:11:49 +05:30
test_xai_provider.py feat(xai): Imagine public-URL storage, chaining & video edit/extend 2026-06-29 21:11:58 -07:00