Skip to content

fix(client): add Qwen35Renderer dispatch in _build_mm_features#43

Open
mvanhorn wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
mvanhorn:fix/39-add-qwen35renderer-dispatch-in-build-mm-features
Open

fix(client): add Qwen35Renderer dispatch in _build_mm_features#43
mvanhorn wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
mvanhorn:fix/39-add-qwen35renderer-dispatch-in-build-mm-features

Conversation

@mvanhorn
Copy link
Copy Markdown

Summary

renderers/client.py:_build_mm_features only dispatched to Qwen3-VL. Qwen3.5 emits the same Qwen2-VL-family multimodal payload (pixel_values + image_grid_thw, all seven current Qwen3.5 sizes use merge_size=2), so the same feature builder serves both. Added Qwen35Renderer to the dispatch.

Why this matters

Without this dispatch, vLLM batches that include Qwen3.5 image messages fall through to the NotImplementedError branch at the bottom of _build_mm_features. The hallerite issue thread confirmed the dispatch was missing because Qwen3.5 was added after the dispatch was written.

Changes

  • renderers/client.py - extend _build_mm_features so the renderer class check matches both Qwen3VLRenderer and Qwen35Renderer; factor a _build_qwen_vl_features helper with merge_size as a parameter so both renderers reuse the same payload shape.
  • Add fallback dataclasses (_FallbackPlaceholderRange, _FallbackMultiModalFieldElem, _FallbackMultiModalFeatureSpec) so the feature spec is usable on vLLM versions that haven't yet exposed the canonical types.

This is a wider change than the issue strictly asked for; the dispatch could land as a 3-line edit alone, but the underlying feature builder was Qwen3-VL-shaped in a way that read as "this is what Qwen3-VL does" rather than "this is what the Qwen2-VL family does," so I factored it out. Happy to trim to the minimum dispatch if you prefer.

Testing

pytest tests/test_client_mm.py -k qwen35.

Fixes #39

Qwen3.5 and Qwen3-VL share the Qwen2-VL multimodal payload shape (pixel_values +
image_grid_thw with merge_size=2 across all seven Qwen3.5 sizes), so the same
feature builder can serve both. Added a _build_qwen_vl_features helper and
factored the dispatch so the renderer-class check covers both renderer types.

Fixes PrimeIntellect-ai#39
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.

Qwen35Renderer: missing dispatch in renderers.client._build_mm_features for vLLM multimodal payload

1 participant