4 Commits

Author SHA1 Message Date
cgycorey
4b1f66a929 test(settings): pin the batcher-to-client image fallback seam
ImageCaptionBatcher passes allow_image_fallback itself and folds any
exception into [None, None], so a client that forwarded the flag twice
lost every caption in the batch with only a warning line. Every existing
batcher test stubs complete(), which is why the seam was invisible.

Wire the real batcher to the real client over a stubbed factory call:
RED returns [None, None] on the TypeError, GREEN returns both captions.
Image bytes derive from tmp_path because the caption cache is keyed on
the image digest, and a hit would skip the call under test.

Refs #2037

Signed-off-by: cgycorey <cgycorey@users.noreply.github.com>
2026-10-24 10:38:59 +01:00
cgycorey
4da7b28372 fix(settings): accept the caller's image fallback flag on the validated client
ImageCaptionBatcher already passes allow_image_fallback=False, and the
validated client now sets that argument itself, so the batch path raised
TypeError: got multiple values and returned no captions for the whole
batch. The caller's flag is dropped before forwarding; the validated
verdict is the authority either way.

Refs #2037

Signed-off-by: cgycorey <cgycorey@users.noreply.github.com>
2026-10-23 20:20:08 +01:00
cgycorey
731b5159a0 fix(settings): send images for a validated image-description model
The picker and the save-time gate now agree on vision support from the
declared provider, but the sender is a third consumer of that verdict: it
asked the provider detected from base_url and let the factory strip the
image parts, so a validated selection described no figures at all.

Refs #2037

Signed-off-by: cgycorey <cgycorey@users.noreply.github.com>
2026-10-23 20:13:59 +01:00
cgycorey
0a4dc9ad4d fix(settings): judge vision support from the declared provider
The image-description save gate derived the vision capability from the
provider the runtime detects from `base_url`, while the settings picker
used the provider the profile declares. A profile that binds `openai`
and points the base URL at a local gateway falls in between: the picker
offers the model, then PUT /document-parsing rejects it with 400.

Both sides now share one rule -- a model's own capability declaration
first, then the provider tables -- and the gate reads the picker's own
verdict, so the two cannot drift apart again.

Refs #2037

Signed-off-by: cgycorey <cgycorey@users.noreply.github.com>
2026-10-23 19:46:35 +01:00