fix(core): add multimodal support for qwen3.7-plus#4803
Conversation
qwen3.7-plus supports image+video input (Plus = multimodal), but defaultModalities() had no pattern for it, falling through to the /^qwen/ catch-all which returns text-only. Changes: - Add qwen3.7-plus pattern to MODALITY_PATTERNS (image + video) - Add qwen3.6-plus and qwen3.7-plus to DashScope VISION_MODEL_PREFIX_PATTERNS - Add tests for qwen3.7-plus (multimodal) and qwen3.7-max (text-only) Closes #4802
📋 Review SummaryThis PR adds multimodal support (image + video) for the 🔍 General Feedback
🎯 Specific Feedback🔵 Low
✅ Highlights
|
|
Thanks for the PR @pomelo-nwu! 👋 Template: The PR description has the key information (problem, changes, how to verify) but doesn't follow the PR template headings. Missing: Direction: Clear bug fix — Approach: The scope is minimal and correct — 3 files, +16/-1, following existing patterns exactly. Adding Moving on to code review. 🔍 中文说明感谢 PR @pomelo-nwu!👋 模板: PR 描述包含了关键信息(问题、变更、验证方法),但没有遵循 PR 模板 的标题格式。缺少: 方向: 明确的 bug 修复 — 方案: 范围最小且正确 — 3 个文件,+16/-1,完全遵循现有模式。在 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
wenshao
left a comment
There was a problem hiding this comment.
No review findings. Downgraded from Approve to Comment: CI failing (Test ×3, Lint, triage, Post Coverage Comment). — qwen3.7-max via Qwen Code /review
Local Verification ReportBranch: TypeScript Compilation (
|
| Package | PR Branch | main (latest) | Status |
|---|---|---|---|
packages/core |
1 error | 0 errors |
The single error is src/tools/skill.ts(465,30): error TS2322 — a file NOT touched by this PR. It originates from the PR's base commit being behind current main. Latest main compiles cleanly. A rebase will resolve this; CI should pass after rebase.
Unit Tests (vitest)
| Test File | PR Branch | main | Status |
|---|---|---|---|
modalityDefaults.test.ts |
34 passed | 32 passed | ✅ All pass (+2 new tests) |
dashscope.test.ts |
56 passed | — | ✅ All pass |
New tests cover:
qwen3.7-plusreturns{ image: true, video: true }fromdefaultModalities()qwen3.7-maxremains text-only (ensures pattern specificity)
Code Review
Changes are minimal and well-targeted:
modalityDefaults.ts— Added regex pattern/^qwen3\.7-plus/→{ image: true, video: true }(line 46)dashscope.ts— Added'qwen3.7-plus'toVISION_MODEL_PREFIX_PATTERNSforvl_high_resolution_imagessupport (line 364)modalityDefaults.test.ts— Added 2 test cases forqwen3.7-plusandqwen3.7-max
Pattern ordering is correct — specific qwen3.7-plus match comes before the catch-all qwen → {} pattern.
Verdict
✅ Ready to merge — No regressions. All tests pass. Recommend rebasing onto latest main to clear the stale skill.ts TSC error before merging.
|
@qwen-code /triage |
|
@/tmp/stage-2.md |
|
@/tmp/stage-3.md |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
|
Both |
Problem
qwen3.7-plussupports multimodal input (image + video), but the current modality detection logic treats it as text-only.In Model Studio naming convention, Plus models are multimodal and Max models are text-only. The
defaultModalities()function had no explicit pattern forqwen3.7-plus, so it fell through to the catch-all/^qwen/→{}(text-only).Closes #4802
Changes
1.
modalityDefaults.ts— modality patternAdded
[/^qwen3\.7-plus/, { image: true, video: true }]toMODALITY_PATTERNS, placed before the catch-all/^qwen/.2.
dashscope.ts— vision model detectionAdded
qwen3.6-plusandqwen3.7-plustoVISION_MODEL_PREFIX_PATTERNSso the DashScope provider correctly setsvl_high_resolution_images: truefor these models. (qwen3.6-pluswas also missing — added for consistency.)3. Tests
qwen3.7-plus→{ image: true, video: true }(multimodal)qwen3.7-max→{}(text-only, already correct)How to verify
qwen3.7-plusvia custom config or token planqwen3.7-maxand confirm it remains text-only