Skip to content

fix(lib): include any-to-any models in image-text-to-text filter - #497

Merged
cswaney merged 2 commits into
mainfrom
fix/496-image-text-to-text-any-to-any
Aug 23, 2026
Merged

cswaney merged 2 commits into
mainfrom
fix/496-image-text-to-text-any-to-any

Conversation

@cswaney

@cswaney cswaney commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an image-text-to-text entry to COMPATIBLE_PIPELINES that widens to any-to-any, mirroring the existing text-generation entry (which already lists both).
  • The OCR batch launcher (and any other consumer of GET /api/models?image=image-text-to-text) now surfaces omni/multimodal models alongside VLMs.

Test plan

  • just lint — clean
  • just test — 960 passed, 7 skipped
  • New API test asserts any-to-any models come back when filtering by image-text-to-text
  • Verified against the running dev server: curl /api/models?image=image-text-to-text returned 3 any-to-any models alongside 57 image-text-to-text (before the fix, only the latter surfaced)

Closes #496

vLLM's VLM code path also serves any-to-any (omni/multimodal) models, so
filtering /api/models by image=image-text-to-text should surface both
tags — otherwise the OCR batch launcher (and any other caller of that
filter) hides valid models. Mirrors the existing text-generation entry.

Closes #496
@claude

claude Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review

Small, well-scoped fix — the change and its test coverage line up cleanly with the stated problem.

Code quality

  • The COMPATIBLE_PIPELINES["image-text-to-text"] addition is a direct, minimal fix and mirrors the existing text-generation pattern, as the PR description says.
  • Nit (non-blocking): COMPATIBLE_PIPELINES now requires manually keeping any-to-any in sync across every pipeline key that should widen to it (text-generation and now image-text-to-text). If another omni-serving pipeline type shows up later (e.g. audio-text-to-text, video-text-to-text), it'll need the same manual entry. Not worth blocking on, but a small helper (e.g. {k: v + ["any-to-any"] for k, v in ...}) could remove the duplication risk going forward.

Bugs/correctness

  • Logic looks correct: COMPATIBLE_PIPELINES.get(image, [image]) now returns ["image-text-to-text", "any-to-any"], so filtering by image-text-to-text surfaces the Qwen-Omni-style fixture model as intended. Verified by reading the query code at asgi.py:2125 / :2142.
  • The fix is intentionally one-directional (filtering by any-to-any still won't surface image-text-to-text models), consistent with how text-generation already behaves — seems like a deliberate, acceptable asymmetry rather than an oversight.

Test coverage

  • Good: the new test asserts against a concrete fixture model ID rather than just checking for presence of the tag, which guards against the widening including unintended models. Fixture addition looks consistent with neighboring entries.
  • The PR description also mentions manual verification against the dev server (curl), which is a nice touch beyond automated tests.

Coverage badge

  • lib/docs/assets/img/coverage.svg drops from 72% → 61%, which is a large swing for a 4-line functional change plus tests. Worth double-checking this reflects a real, pre-existing coverage baseline (e.g. badge was stale before this PR) rather than something going wrong in the regeneration step, since an 11-point drop could mask an unrelated coverage regression if it's real.

Security/performance

  • No concerns — this only widens a read-only filter on an already-authenticated endpoint (/api/models), and doesn't expose any models that weren't already queryable through other filters (e.g. no filter, or text-generation).

Overall: looks good to merge pending a sanity check on the coverage badge number.

@cswaney
cswaney merged commit c4bdc5a into main Aug 23, 2026
8 checks passed
@cswaney
cswaney deleted the fix/496-image-text-to-text-any-to-any branch August 23, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Widen image-text-to-text model filter to include any-to-any models

1 participant