Skip to content

fix: qwen3.7-plus should support multimodal (image/video) input #4802

@pomelo-nwu

Description

@pomelo-nwu

Problem

qwen3.7-plus supports multimodal input (image + video), but the current modality detection logic treats it as text-only.

The defaultModalities() function in modalityDefaults.ts uses ordered regex matching. Since there is no explicit pattern for qwen3.7-plus, it falls through to the catch-all /^qwen/ pattern which returns {} (text-only).

Meanwhile, qwen3.7-max is correctly text-only — it only supports text input.

Expected Behavior

  • qwen3.7-plus{ image: true, video: true } (multimodal)
  • qwen3.7-max{} (text-only, no change needed)

Root Cause

Two places need updating:

  1. packages/core/src/core/modalityDefaults.tsMODALITY_PATTERNS is missing an entry for qwen3.7-plus. It falls through to /^qwen/{}.
  2. packages/core/src/core/openaiContentGenerator/provider/dashscope.tsVISION_MODEL_PREFIX_PATTERNS doesn't include qwen3.7-plus, so the DashScope provider won't set vl_high_resolution_images: true for it.

Proposed Fix

  1. Add [/^qwen3\.7-plus/, { image: true, video: true }] to MODALITY_PATTERNS before the catch-all /^qwen/.
  2. Add 'qwen3.7-plus' to VISION_MODEL_PREFIX_PATTERNS in the DashScope provider.
  3. Add/update tests to verify the modality defaults for both qwen3.7-plus (multimodal) and qwen3.7-max (text-only).

Impact

Users selecting qwen3.7-plus through any provider (token plan, custom config) will correctly get multimodal support — images and videos will be sent as inline data instead of being downgraded to text placeholders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/coreCore engine and logicpriority/P2Medium - Moderately impactful, noticeable problemscope/model-switchingModel selection and switchingstatus/needs-triageIssue needs to be triaged and labeledtype/bugSomething isn't working as expectedwelcome-pr

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions