Skip to content

fix(llm_qwen): correct stale and invalid DashScope model profiles - #1712

Open
chinesepowered wants to merge 4 commits into
rocketride-org:developfrom
chinesepowered:fix/RR-1710-qwen-model-list
Open

fix(llm_qwen): correct stale and invalid DashScope model profiles#1712
chinesepowered wants to merge 4 commits into
rocketride-org:developfrom
chinesepowered:fix/RR-1710-qwen-model-list

Conversation

@chinesepowered

@chinesepowered chinesepowered commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes #1710

What

The llm_qwen model list is stale and partly invalid. This fixes the root cause in the sync config, retires the profiles DashScope rejects, restores two models that were falsely deprecated, and adds the current generation.

Why the list went stale

tools/sync_models/src/sync_models.config.json filtered discovery on include_prefixes: ["qwen-"]. Current DashScope models are qwen3-max, qwen3.6-plus, qwen3.7-max, qwen3.8-max-preview — all begin with qwen3, not qwen-, so every one was dropped before discovery. The weekly sync-models.yml run could only ever churn token counts on stale profiles.

Before:

$ python tools/sync_models/src/sync_models.py --provider llm_qwen --enable-discovery --allow-fallback-discovery
  ~ qwen-2-5-72b-instruct          modelTotalTokens: 131072 → 32768
  ~ qwen-2-5-7b-instruct           modelTotalTokens: 131072 → 32768
  ~ qwen-2-5-coder-32b-instruct    modelTotalTokens: 128000 → 32768

Nothing added. After widening the prefix, the tool sees the modern families and supplies authoritative token data, which is where the qwen3.x numbers in this PR come from:

$ python tools/sync_models/src/sync_models.py --provider llm_qwen --apply
  ~ qwen3-6-flash                  capabilities.reasoning: False → True
  ~ qwen3-6-flash                  modelOutputTokens: 32768 → 65536
  ~ qwen3-7-max                    modelOutputTokens: 32768 → 65536
  ~ qwen3-7-plus                   modelOutputTokens: 32768 → 65536

Changes

tools/sync_models/src/sync_models.config.json

  • include_prefixes["qwen"] so new generations need no further config change
  • exclude_patterns gains omni, ocr, asr, tts to keep non-chat families out of a text-generation node
  • All four stable aliases added to protected_profiles with a far-future expiry

nodes/src/nodes/llm_qwen/services.json

  • Added qwen3.8-max-preview, qwen3.7-max, qwen3.7-plus, qwen3.6-flash
  • Un-deprecated qwen-max and qwen-turbo
  • Deprecated the four invalid profiles with accurate migration messages
  • New optional base_url field

nodes/src/nodes/llm_qwen/qwen_client.py

  • base_url, when set, wins over the region map

nodes/src/nodes/llm_qwen/README.md

  • Profiles table rebuilt and split into stable aliases vs pinned releases, plus a deprecated table explaining why each ID fails

On the invalid profiles

These carried "modelSource": "openrouter" and are OpenRouter/HuggingFace IDs, not DashScope IDs — selecting one produced a runtime error rather than a config-time warning:

Profile model Problem
qwen-2-5-72b-instruct qwen-2.5-72b-instruct DashScope uses qwen2.5-72b-instruct
qwen-2-5-7b-instruct qwen-2.5-7b-instruct same
qwen-2-5-coder-32b-instruct qwen-2.5-coder-32b-instruct same
qwen-plus-2025-07-28-thinking qwen-plus-2025-07-28:thinking :thinking is OpenRouter variant syntax; DashScope uses enable_thinking

This is the Loose discovery risk called out in tools/sync_models/README.md. They are deprecated rather than deleted so saved pipelines keep loading — happy to switch to outright removal if you'd prefer.

qwen-max and qwen-turbo were flagged deprecated with "Model no longer listed in OpenRouter". Both are current DashScope stable aliases, deprecated only because a non-authoritative source stopped listing them.

Testing

  • pytest tools/sync_models/test/test_sync_logic.py — 41 passed
  • ruff check / ruff format --check on nodes/src/nodes/llm_qwen/ — clean
  • Both edited services*.json / config files parse as JSON5; profile keys, fields entries, and conditional values verified to cross-reference consistently, and preconfig.default resolves

Please verify before merge

I do not have a ROCKETRIDE_QWEN_KEY, so provider-source discovery and smoke tests could not run. Specifically worth a maintainer's eyes:

  1. qwen3.8-max-preview — added per request. Alibaba's primary docs did not confirm this ID, its token limits (983,616 / 131,072), or its endpoint; those come from secondary reporting of the 2026-07-19 WAIC preview announcement. Access appears to be limited-availability and it may be served from a host outside the three compatible-mode endpoints, which is what the new base_url field is there for. If you can't confirm it, dropping this one profile is fine — the rest of the PR stands without it.
  2. Stable-alias token limits (qwen-max, qwen-flash, qwen-turbo) are carried over from the existing file, not re-derived. They are conservative rather than wrong, but a real sync would tighten them.
  3. Running sync_models.py --provider llm_qwen --enable-discovery --apply with a key will confirm every ID against the native API and smoke-test the additions. I'll happily fold in whatever it reports.

Note on the generated docs block

nodes:docs-generate deliberately no-ops off main/stage/develop, so the ROCKETRIDE:GENERATED:PARAMS block in the README does not yet list the new qwen.base_url field. It regenerates on merge. Left untouched rather than hand-edited, per the co-located documentation rule.

Out of scope

The README's ## Profiles table is hand-written and nothing keeps it in step with services.json — the generated block emits only Schema, Dependencies and Source. That is why it had drifted (it disagreed with services.json on three context windows and omitted both deprecation flags). 15 llm_* nodes share this, so it wants its own change rather than riding along here. Filed as a note in #1710; happy to open a separate issue if useful.

Summary by CodeRabbit

  • New Features
    • Added a base_url option to override the Qwen OpenAI-compatible endpoint; it takes precedence over region.
    • Refreshed Qwen profiles with new “latest” aliases (Max/Plus/Flash/Turbo) and pinned qwen3-* releases.
  • Documentation
    • Updated Qwen documentation to reflect base_url vs region behavior, reorganized profile catalog, and clarified deprecated-profile availability and migration guidance.
    • Added instructions for keeping the Qwen model list current via the model sync tool.
  • Bug Fixes
    • Improved Qwen model discovery by widening vendor matching and filtering additional unsupported families, plus updated protected profile rules.

The model sync could never add a current Qwen model: the provider's
include_prefixes was ["qwen-"], but DashScope names the modern families
qwen3-max, qwen3.6-plus, qwen3.7-max and qwen3.8-max-preview, all of
which start with "qwen3". Every current model was filtered out before
discovery, so the weekly sync only ever churned token counts on stale
profiles.

Match on the bare vendor name so new generations are picked up without
another config change, and widen exclude_patterns to keep the non-chat
families (omni, ocr, asr, tts) out of a text-generation node.

Four profiles carried OpenRouter/HuggingFace model IDs that DashScope
rejects, introduced by OpenRouter fallback discovery: the three
qwen-2.5-* profiles (DashScope writes these without the hyphen) and
qwen-plus-2025-07-28:thinking (":thinking" is OpenRouter variant syntax;
DashScope uses the enable_thinking parameter). Deprecate them with an
accurate migration message rather than deleting, so saved pipelines keep
loading.

qwen-max and qwen-turbo were marked deprecated with the reason "Model no
longer listed in OpenRouter". Both are current DashScope stable aliases;
they were deprecated only because a non-authoritative source stopped
listing them. Un-deprecate both and add all four stable aliases to
protected_profiles so this cannot recur.

Add qwen3.8-max-preview, qwen3.7-max, qwen3.7-plus and qwen3.6-flash.
Token limits on the qwen3.x profiles come from the sync tool.

Add an optional base_url field that overrides the region map, so a
profile can reach an endpoint outside the three compatible-mode hosts
without a code change.
@github-actions github-actions Bot added docs Documentation module:nodes Python pipeline nodes labels Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6486fec7-debb-47ec-9052-52e188b7a357

📥 Commits

Reviewing files that changed from the base of the PR and between eaea690 and 9a9e6e3.

📒 Files selected for processing (1)
  • nodes/src/nodes/llm_qwen/README.md

📝 Walkthrough

Walkthrough

The Qwen node now supports explicit DashScope endpoint overrides, updated current and deprecated model profiles, expanded profile mappings, and broader model synchronization rules and documentation.

Changes

Qwen provider updates

Layer / File(s) Summary
Endpoint override resolution
nodes/src/nodes/llm_qwen/qwen_client.py, nodes/src/nodes/llm_qwen/README.md
Client initialization uses a trimmed base_url when provided and otherwise derives the endpoint from region; documentation describes this precedence.
Profile catalog and configuration wiring
nodes/src/nodes/llm_qwen/services.json, nodes/src/nodes/llm_qwen/README.md
Profiles include Qwen3 models, stable aliases, pinned releases, deprecated entries, base URL fields, token limits, capabilities, and corresponding conditional mappings.
Model discovery and maintenance rules
tools/sync_models/src/sync_models.config.json, nodes/src/nodes/llm_qwen/README.md
Model discovery matches the broader Qwen prefix, excludes additional unsupported families, protects more aliases, and documents model synchronization and upstream references.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: jmaionchi, rod-christensen, stepmikhaylov

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR meets most of #1710, but it removes qwen3.8-max-preview instead of adding the requested current-generation profile. Restore qwen3.8-max-preview if it is a valid DashScope model, or update #1710 to exclude it from the required set.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise, specific, and accurately describes the main Qwen profile cleanup in this PR.
Out of Scope Changes check ✅ Passed All code changes stay within the Qwen model profile, sync, and documentation updates described by the issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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)
nodes/src/nodes/llm_qwen/services.json (1)

301-356: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

base_url override is documented as universal but only wired for 2 of 9+ non-deprecated profiles.

The README (Fields table, and the Regions section at L92-93) describes base_url as a blanket override that works regardless of profile/region choice. In services.json, however, qwen.base_url is only added to the qwen.custom and qwen.qwen3-8-max-preview field-mapping objects — every other newly-added/changed profile (qwen3-7-max, qwen3-7-plus, qwen3-6-flash, qwen-max, qwen-plus, qwen-flash, qwen-turbo) still exposes qwen.region but not qwen.base_url, so users selecting those profiles have no UI path to override the endpoint despite what the docs promise.

  • nodes/src/nodes/llm_qwen/services.json#L301-L356: add "qwen.base_url" to the properties array of qwen.qwen3-7-max, qwen.qwen3-7-plus, qwen.qwen3-6-flash, qwen.qwen-max, qwen.qwen-plus, qwen.qwen-flash, and qwen.qwen-turbo (or explicitly scope the feature to custom/qwen3-8-max-preview only).
  • nodes/src/nodes/llm_qwen/README.md#L27-L35: if the override truly stays limited to custom/qwen3-8-max-preview, qualify the base_url row (and the Regions-section sentence at L92-93) accordingly instead of describing it as available on every profile.
🛠️ Proposed fix (wire base_url into remaining profiles)
 		"qwen.qwen3-7-max": {
 			"object": "qwen3-7-max",
 			"properties": [
 				"llm.cloud.apikey",
 				"qwen.region",
+				"qwen.base_url",
 				"llm.cloud.modelSource"
 			]
 		},

(repeat for qwen3-7-plus, qwen3-6-flash, qwen-max, qwen-plus, qwen-flash, qwen-turbo)

🤖 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 `@nodes/src/nodes/llm_qwen/services.json` around lines 301 - 356, Add
"qwen.base_url" to the properties arrays for qwen.qwen3-7-max,
qwen.qwen3-7-plus, qwen.qwen3-6-flash, qwen.qwen-max, qwen.qwen-plus,
qwen.qwen-flash, and qwen.qwen-turbo in nodes/src/nodes/llm_qwen/services.json
at lines 301-356. Update nodes/src/nodes/llm_qwen/README.md lines 27-35 only if
the override remains limited, qualifying the base_url documentation and
Regions-section statement accordingly; otherwise no README change is needed.
🤖 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 `@nodes/src/nodes/llm_qwen/README.md`:
- Around line 44-59: Update the profile titles documented in the README tables
to exactly match the dropdown labels configured in services.json: use “Qwen Max
(latest)”, “Qwen Plus (latest)”, “Qwen Flash (latest)”, and “Qwen Turbo
(latest)” for the corresponding profiles, preserving the existing model and
token values.

---

Outside diff comments:
In `@nodes/src/nodes/llm_qwen/services.json`:
- Around line 301-356: Add "qwen.base_url" to the properties arrays for
qwen.qwen3-7-max, qwen.qwen3-7-plus, qwen.qwen3-6-flash, qwen.qwen-max,
qwen.qwen-plus, qwen.qwen-flash, and qwen.qwen-turbo in
nodes/src/nodes/llm_qwen/services.json at lines 301-356. Update
nodes/src/nodes/llm_qwen/README.md lines 27-35 only if the override remains
limited, qualifying the base_url documentation and Regions-section statement
accordingly; otherwise no README change is needed.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 341f9743-e044-41d2-9bb6-b3f537313b5a

📥 Commits

Reviewing files that changed from the base of the PR and between 1483794 and 543003d.

📒 Files selected for processing (4)
  • nodes/src/nodes/llm_qwen/README.md
  • nodes/src/nodes/llm_qwen/qwen_client.py
  • nodes/src/nodes/llm_qwen/services.json
  • tools/sync_models/src/sync_models.config.json

Comment thread nodes/src/nodes/llm_qwen/README.md Outdated
Review feedback on rocketride-org#1712.

qwen3.8-max-preview is removed. It was added on request, but Alibaba's
primary documentation confirms neither the model ID, its token limits,
nor its endpoint — only secondary reporting of the 2026-07-19 preview
announcement did, and access appears to be limited-availability. Shipping
it would have reintroduced exactly the failure this PR fixes: a profile
whose model ID the DashScope API rejects at runtime.

base_url was documented as a blanket override but only wired into the
custom and qwen3.8 field maps, so seven profiles had no UI path to it.
Wire it into every live profile instead of narrowing the documentation:
Alibaba Cloud serves DashScope from more regions than the three in the
region enum, so the override is useful independently of any one model.
Deprecated profiles deliberately do not get it.

Align the README profile table with the dropdown labels in services.json,
which say "(latest)" on the four stable aliases.
@chinesepowered

Copy link
Copy Markdown
Contributor Author

Thanks — both findings were valid, fixed in 0d6d983.

base_url wired to only 2 of 9 profiles — agreed, this was a real docs/implementation mismatch I introduced. Resolved by wiring it into every live profile rather than narrowing the docs: Alibaba Cloud serves DashScope from more regions than the three in the region enum, so the override earns its place independently of any single model. The four deprecated profiles deliberately don't get it.

README titles vs dropdown labels — agreed, services.json says "Qwen Max (latest)" and the README said "Qwen Max". README now matches; kept the "(latest)" suffix since it usefully distinguishes a stable alias from a pinned release.

Separately, and not from this review: qwen3.8-max-preview is removed. Alibaba's primary docs confirm neither the model ID, its token limits, nor its endpoint — only secondary reporting of the 2026-07-19 preview announcement did. Keeping it would have reintroduced exactly what this PR fixes: a profile whose ID DashScope rejects at runtime.

Re-verified: 41 sync-logic tests pass, the sync dry run is now clean with no pending drift, and profile keys / fields entries / conditional values still cross-reference consistently.

@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

🤖 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 `@nodes/src/nodes/llm_qwen/README.md`:
- Line 89: Update the base_url documentation in the Qwen README to state that it
is available on every live profile, including custom, rather than every profile;
preserve the existing regional endpoint guidance and deprecated-profile
behavior.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e0e2a914-eaf0-45fd-9576-67787bd865f4

📥 Commits

Reviewing files that changed from the base of the PR and between 543003d and 0d6d983.

📒 Files selected for processing (2)
  • nodes/src/nodes/llm_qwen/README.md
  • nodes/src/nodes/llm_qwen/services.json

Comment thread nodes/src/nodes/llm_qwen/README.md Outdated
Review feedback on rocketride-org#1712. The previous commit said base_url is available
on "every profile", but the four deprecated profiles deliberately do not
expose it, so the claim overstated the surface.
@chinesepowered

Copy link
Copy Markdown
Contributor Author

Agreed and fixed in eaea690 — the claim overstated the surface. The four deprecated profiles deliberately omit qwen.base_url, so "every profile" was wrong in the very commit that fixed the previous mismatch.

Now reads "every live profile, including custom; the deprecated profiles above do not expose it" — "above" rather than "below", since the deprecated table sits at L62 and the Regions section at L77.

Verified against services.json: 8 live profiles all expose base_url, 4 deprecated profiles none do, custom included.

@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.

Caution

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

⚠️ Outside diff range comments (1)
nodes/src/nodes/llm_qwen/README.md (1)

119-122: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Correct the discovery fallback instructions.

Without ROCKETRIDE_QWEN_KEY, the documented command does not automatically fall back to OpenRouter: sync_models.py requires the explicit --allow-fallback-discovery flag. Either add that flag to the command or state that strict mode skips discovery.

Proposed fix
-Discovery requires `ROCKETRIDE_QWEN_KEY`. Without it the sync falls back to OpenRouter, which lists HuggingFace-style IDs that DashScope does not accept — the source of the deprecated profiles above.
+Discovery requires `ROCKETRIDE_QWEN_KEY`. Without it, strict mode skips discovery. To reproduce fallback discovery, add `--allow-fallback-discovery`; this may introduce OpenRouter/HuggingFace-style IDs that DashScope does not accept.
🤖 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 `@nodes/src/nodes/llm_qwen/README.md` around lines 119 - 122, Update the
documented sync_models.py discovery command to include the explicit
--allow-fallback-discovery flag when describing fallback to OpenRouter, or
revise the surrounding text to state that discovery is skipped in strict mode
without ROCKETRIDE_QWEN_KEY. Ensure the command and explanation consistently
describe the actual fallback behavior.
🤖 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.

Outside diff comments:
In `@nodes/src/nodes/llm_qwen/README.md`:
- Around line 119-122: Update the documented sync_models.py discovery command to
include the explicit --allow-fallback-discovery flag when describing fallback to
OpenRouter, or revise the surrounding text to state that discovery is skipped in
strict mode without ROCKETRIDE_QWEN_KEY. Ensure the command and explanation
consistently describe the actual fallback behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2b4dfa7e-e4eb-40c9-a1ec-8529e0c8af34

📥 Commits

Reviewing files that changed from the base of the PR and between 0d6d983 and eaea690.

📒 Files selected for processing (1)
  • nodes/src/nodes/llm_qwen/README.md

Without ROCKETRIDE_QWEN_KEY the sync does not automatically fall back to
OpenRouter for discovery. base.py gates non-provider sources behind
--allow-fallback-discovery, so a keyless run enriches existing profiles
but cannot add any.
@chinesepowered

Copy link
Copy Markdown
Contributor Author

Agreed — the fallback description was wrong. Fixed in 9a9e6e3.

_discovery_available() in tools/sync_models/src/providers/base.py:334-339 returns allow_fallback_discovery for any non-provider source, so without ROCKETRIDE_QWEN_KEY a run enriches existing profiles from OpenRouter/LiteLLM but cannot add one. My sentence claimed it falls back to OpenRouter discovery automatically, which would have sent a maintainer looking for a bug that isn't there.

Reworded to say discovery needs the key, a keyless run is enrichment-only, and --allow-fallback-discovery is the opt-in that lets OpenRouter contribute IDs DashScope rejects — with a note not to use it for this provider, since that is the mechanism behind the deprecated profiles.

On the Linked Issues pre-merge warning: correct catch, the PR does drop qwen3.8-max-preview where the issue proposed adding it. Documented the deviation in #1710 (comment) rather than restoring the profile — I could not verify the model against Alibaba Cloud's published model list and have no DashScope key, so shipping it would risk another profile that fails at runtime, which is the failure mode this PR exists to fix. The widened include_prefixes means the weekly sync picks it up automatically once it is live.

The Build / Windows Server 2022 failure is unrelated infrastructure: a 503 from download.pytorch.org while resolving astrapy for store_astra. Ubuntu and macOS builds pass.

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

Labels

docs Documentation module:nodes Python pipeline nodes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(llm_qwen): model list is stale and contains invalid DashScope model IDs

1 participant