Repository navigation
Feat: support new qwen model - #16385
Conversation
📝 WalkthroughWalkthroughThe Tongyi-Qianwen model catalog in ChangesTongyi-Qianwen model list refresh
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
Caution Review failedAn 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. Comment |
…flow into feat/support-new-qwen-model
There was a problem hiding this comment.
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 | 🟠 MajorRemove all references to the deleted Tongyi model IDs before merging.
The search confirms these models are still referenced in
conf/all_models.jsonand agent templates, meaning their removal fromconf/llm_factories.jsonwill break references or cause inconsistencies:
- Agent Templates:
agent/templates/stock_market_research_assistant.jsonexplicitly hardcodesqwen-turbo-latest@Tongyi-Qianwenin four locations.- Global Definitions:
conf/all_models.jsonstill definesqwen3-0.6b,qwen3-1.7b,qwen3-4b,qwen-turbo-2025-04-28,qwq-32b, andqwq-plus-latest.Required Actions:
- Update or remove the
llm_identries inagent/templates/stock_market_research_assistant.jsonif these models are no longer supported.- Verify if
conf/all_models.jsonshould also be updated to match the removals fromllm_factories.jsonor 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
📒 Files selected for processing (1)
conf/llm_factories.json
| "llm_name": "qwen3-vl-flash-2025-10-15", | ||
| "max_tokens": 32768, | ||
| "model_type": [ | ||
| "chat", | ||
| "image2text" | ||
| ], |
There was a problem hiding this comment.
🎯 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.
What problem does this PR solve?
As title, and remove some deprecated models.
Type of change