Skip to content

Feat: support new qwen model - #16385

Merged
wangq8 merged 5 commits into
infiniflow:mainfrom
Lynn-Inf:feat/support-new-qwen-model
Jun 26, 2026
Merged

wangq8 merged 5 commits into
infiniflow:mainfrom
Lynn-Inf:feat/support-new-qwen-model

Conversation

@Lynn-Inf

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

As title, and remove some deprecated models.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Tongyi-Qianwen model catalog in conf/llm_factories.json is expanded with new chat, vision, ASR, TTS, and OCR entries, while several older QwQ, Qwen3, qwen-turbo, and deepresearch models are removed.

Changes

Tongyi-Qianwen model list refresh

Layer / File(s) Summary
Expanded model catalog
conf/llm_factories.json
The Tongyi-Qianwen llm block is replaced with new model variants and updated multimodal model_type and is_tools fields.
Removed obsolete entries
conf/llm_factories.json
Several older Tongyi-Qianwen model entries are removed from the catalog, including qwq, qwen3, qwen-turbo, and deepresearch variants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A bunny hops through model rows,
New names bloom where the old one goes.
Chat and vision, hop and sing,
OCR twinkles, ASR takes wing.
Thumpity-thump, the catalog glows.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding support for new Qwen models and pruning deprecated ones.
Description check ✅ Passed The description covers the problem and type of change, though it is brief and gives little background.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
conf/llm_factories.json (1)

1288-1289: 🗄️ Data Integrity & Integration | 🟠 Major

Remove all references to the deleted Tongyi model IDs before merging.

The search confirms these models are still referenced in conf/all_models.json and agent templates, meaning their removal from conf/llm_factories.json will break references or cause inconsistencies:

  • Agent Templates: agent/templates/stock_market_research_assistant.json explicitly hardcodes qwen-turbo-latest@Tongyi-Qianwen in four locations.
  • Global Definitions: conf/all_models.json still defines qwen3-0.6b, qwen3-1.7b, qwen3-4b, qwen-turbo-2025-04-28, qwq-32b, and qwq-plus-latest.

Required Actions:

  1. Update or remove the llm_id entries in agent/templates/stock_market_research_assistant.json if these models are no longer supported.
  2. Verify if conf/all_models.json should also be updated to match the removals from llm_factories.json or if these were intended to remain for other providers.

[qianwen-deepresearch-30b-a3b-131k] was not found elsewhere, so it can be safely removed if not present in all_models.json.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@conf/llm_factories.json` around lines 1288 - 1289, The removal of deleted
Tongyi model IDs is incomplete because they are still referenced elsewhere,
which will leave broken or inconsistent model mappings. Update the hardcoded
`llm_id` values in `agent/templates/stock_market_research_assistant.json` to
remove or replace `qwen-turbo-latest@Tongyi-Qianwen`, and reconcile
`conf/all_models.json` so its model definitions match what remains supported in
`conf/llm_factories.json`. Also remove `qianwen-deepresearch-30b-a3b-131k` from
any remaining references if it is no longer present in the global model list.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@conf/llm_factories.json`:
- Around line 453-458: The `model_type` arrays for the new Tongyi multimodal
entries are in the wrong order, causing `internal/service/model_service.go` to
infer them as plain chat models. Update the affected entries in
`llm_factories.json` so the primary multimodal capability comes first, keeping
`image2text` ahead of `chat` for these models and applying the same ordering
rule to the omni variants.

---

Outside diff comments:
In `@conf/llm_factories.json`:
- Around line 1288-1289: The removal of deleted Tongyi model IDs is incomplete
because they are still referenced elsewhere, which will leave broken or
inconsistent model mappings. Update the hardcoded `llm_id` values in
`agent/templates/stock_market_research_assistant.json` to remove or replace
`qwen-turbo-latest@Tongyi-Qianwen`, and reconcile `conf/all_models.json` so its
model definitions match what remains supported in `conf/llm_factories.json`.
Also remove `qianwen-deepresearch-30b-a3b-131k` from any remaining references if
it is no longer present in the global model list.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1274ce3-67be-4441-85a4-5ea24a71c1e9

📥 Commits

Reviewing files that changed from the base of the PR and between f80d4c7 and af774c5.

📒 Files selected for processing (1)
  • conf/llm_factories.json

Comment thread conf/llm_factories.json
Comment on lines +453 to +458
"llm_name": "qwen3-vl-flash-2025-10-15",
"max_tokens": 32768,
"model_type": [
"chat",
"image2text"
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Put the primary multimodal capability first in model_type.

These new Tongyi entries reverse the catalog’s existing multimodal ordering from ["image2text","chat"] to ["chat","image2text"] (and similar omni variants). internal/service/model_service.go returns the first factory type as the effective model type, so these models will now resolve as plain chat instead of their multimodal capability.

Suggested fix
-                    "model_type": [
-                        "chat",
-                        "image2text"
-                    ],
+                    "model_type": [
+                        "image2text",
+                        "chat"
+                    ],

Apply the same rule to the omni entries so the first element matches the capability downstream code should infer.

Also applies to: 535-541, 656-661, 772-788, 809-815, 896-902, 947-953, 1018-1024, 1079-1102, 1183-1214

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@conf/llm_factories.json` around lines 453 - 458, The `model_type` arrays for
the new Tongyi multimodal entries are in the wrong order, causing
`internal/service/model_service.go` to infer them as plain chat models. Update
the affected entries in `llm_factories.json` so the primary multimodal
capability comes first, keeping `image2text` ahead of `chat` for these models
and applying the same ordering rule to the omni variants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants