Skip to content

feat(core): add image+video support for Qwen3.6-35B-A3B quant variants - #4106

Merged
tanzhenxin merged 2 commits into
QwenLM:mainfrom
Dinsmoor:fix-qwen3.6-image-support
May 15, 2026
Merged

feat(core): add image+video support for Qwen3.6-35B-A3B quant variants#4106
tanzhenxin merged 2 commits into
QwenLM:mainfrom
Dinsmoor:fix-qwen3.6-image-support

Conversation

@Dinsmoor

Copy link
Copy Markdown
Contributor

feat(core): add image+video support for Qwen3.6-35B-A3B quant variants

Note: the following was ai generated, I just had the above mentioned model work through this specific issue when running the same model on my network but wasn't able to have it look at images/video, but the model card on hugginface says it supports it. Probably could expand to whatever other 3.6 models exist but I am just adding support for the one I use.

Summary

  • What changed: Added modality pattern /^qwen3\.6-35b/ in packages/core/src/core/modalityDefaults.ts with { image: true, video: true }, and a corresponding test in modalityDefaults.test.ts.
  • Why it changed: SGLang serves Qwen3.6-35B-A3B*. Model names matching qwen3.6-35b* previously fell through to the text-only catch-all qwen pattern, causing createMediaContentPart() to silently discard base64-encoded images before they reached the LLM API. The Qwen3.6-35B-A3B model natively supports multimodal input (image + video per HuggingFace).
  • Reviewer focus: Pattern placement — must appear after qwen3-coder- (text-only) but before the final qwen catch-all.

Validation

  • Commands run:
    cd packages/core && npx vitest run src/core/modalityDefaults.test.ts
    npm run build
  • Prompts / inputs used: defaultModalities('qwen3.6-35b-a3b-nvfp4') returns { image: true, video: true }
  • Expected result: image and video modalities are true; pdf and audio are undefined (not explicitly enabled).
  • Observed result: All 31 tests pass, build completes with no errors.
  • Quickest reviewer verification path: defaultModalities('Qwen3.6-35B-A3B-NVFP4')image is true.
  • Evidence: Test file added covers the exact SGLang default model name string.

Scope / Risk

  • Main risk or tradeoff: Minimal. Adds one regex pattern in an ordered array. The catch-all qwen still absorbs any unrecognized variants. No behavior changes for any existing model line.
  • Not covered / not validated: Real-world image ingestion with an actual SGLang deployment (tested in unit only).
  • Breaking changes / migration notes: None.

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker N/A N/A N/A
Podman N/A N/A N/A
Seatbelt N/A N/A N/A

Testing matrix notes:

  • Pattern is regex-only, platform-independent. All three platforms pass the unit test and build.

Dinsmoor and others added 2 commits May 13, 2026 00:19
Add modality pattern for qwen3.6-35b model names, enabling image and
video input for locally-hosted Qwen3.6-35B-A3B models (e.g. SGLang's
default model name: Qwen3.6-35B-A3B-NVFP4). Previously these fell
through to the text-only catch-all, blocking all image content.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
expect(m.audio).toBeUndefined();
});

it('returns image + video for qwen3.6-35b variants', () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] Test name says "variants" (plural) but only tests a single variant qwen3.6-35b-a3b-nvfp4. The regex /^qwen3\.6-35b/ is broad (matches all qwen3.6-35b-* models), so testing only one variant leaves a gap where future regex narrowing could silently regress other variants.

Consider either:

  • Renaming to 'returns image + video for qwen3.6-35b-a3b-nvfp4' to accurately reflect scope, or
  • Adding additional test cases for bare qwen3.6-35b and a quant-stripped variant like qwen3.6-35b-fp16

Nice to have: Add a normalization test with provider prefix (e.g., dashscope/qwen3.6-35b-a3b-nvfp4) in the normalization describe block.

— DeepSeek/deepseek-v4-pro via Qwen Code /review

@tanzhenxin tanzhenxin added the type/feature-request New feature or enhancement request label May 15, 2026

@tanzhenxin tanzhenxin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. This is a narrow modality-default update: the qwen3.6-35b rule is ordered before the general qwen fallback, normalization preserves the intended local/quantized model prefix, and the focused modality test passes locally. I also spot-checked the upstream model card and it documents image and video input support.

@tanzhenxin
tanzhenxin merged commit 4c18f13 into QwenLM:main May 15, 2026
TaimoorSiddiquiOfficial pushed a commit to TaimoorSiddiquiOfficial/HopCode that referenced this pull request May 15, 2026
QwenLM#4106)

Add modality pattern for qwen3.6-35b model names, enabling image and
video input for locally-hosted Qwen3.6-35B-A3B models (e.g. SGLang's
default model name: Qwen3.6-35B-A3B-NVFP4). Previously these fell
through to the text-only catch-all, blocking all image content.

Co-authored-by: Tyler <tyler@dinsmoor.us>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
(cherry picked from commit 4c18f13)
@Dinsmoor
Dinsmoor deleted the fix-qwen3.6-image-support branch May 16, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature-request New feature or enhancement request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants