Skip to main content
View source

Qwen

View as Markdown

A RocketRide LLM node that connects Alibaba Cloud Qwen models to a pipeline via the DashScope API.

What it does

Provides Qwen chat completions to the pipeline. Used primarily as an llm invoke connection by agents and other nodes that need an LLM, and can also be used directly via lanes.

Uses LangChain's ChatOpenAI client pointed at DashScope's OpenAI-compatible endpoint. The endpoint is resolved at startup from the base_url field if set, otherwise from the region field. Temperature is fixed at 0, and max_tokens is taken from the profile's modelOutputTokens.

When the node configuration is validated, the node performs a live 1-token test request against the API to verify the key, model, and region actually work. Failures surface as configuration warnings with the provider's error message.

Lanes

Lane inLane outDescription
questionsanswersSend a question directly, receive a generated answer

Profiles

Default: Qwen Flash (latest) (qwen-flash).

The visible (latest) stable aliases always resolve to DashScope's current snapshot for their tier, so they do not go stale as new generations ship — prefer these unless you need to pin a specific release, which the first four collapsed profiles do.

ProfileModelContextOutput
qwen-flash (default)qwen-flash131,0724,096
qwen-plusqwen-plus1,000,00032,768
qwen-maxqwen-max32,7688,192
qwen-turboqwen-turbo131,0728,192
View 45 more models
ProfileModelContextOutput
qwen3-7-maxqwen3.7-max1,000,000131,072
qwen3-7-plusqwen3.7-plus1,000,000131,072
qwen3-6-flashqwen3.6-flash1,000,00065,536
qwen-plus-2025-07-28qwen-plus-2025-07-281,000,00032,768
qwen-2-5-72b-instructqwen-2.5-72b-instruct32,76816,384
qwen-2-5-7b-instructqwen-2.5-7b-instruct32,76829,491
qwen-2-5-coder-32b-instructqwen-2.5-coder-32b-instruct32,76829,491
qwen-plus-2025-07-28-thinkingqwen-plus-2025-07-28:thinking1,000,00032,768
qwen3-14bqwen3-14b131,07216,384
qwen3-235b-a22bqwen3-235b-a22b131,0728,192
qwen3-235b-a22b-2507qwen3-235b-a22b-2507262,14416,384
qwen3-235b-a22b-thinking-2507qwen3-235b-a22b-thinking-2507131,072117,964
qwen3-30b-a3bqwen3-30b-a3b131,07216,384
qwen3-30b-a3b-instruct-2507qwen3-30b-a3b-instruct-2507262,14432,000
qwen3-30b-a3b-thinking-2507qwen3-30b-a3b-thinking-250781,92032,768
qwen3-32bqwen3-32b131,07216,384
qwen3-5-122b-a10bqwen3.5-122b-a10b262,14481,920
qwen3-5-27bqwen3.5-27b262,14465,536
qwen3-5-35b-a3bqwen3.5-35b-a3b262,14416,384
qwen3-5-397b-a17bqwen3.5-397b-a17b262,14465,536
qwen3-5-9bqwen3.5-9b262,144235,929
qwen3-5-9b-batchqwen3.5-9b:batch262,144235,929
qwen3-5-flash-02-23qwen3.5-flash-02-231,000,00065,536
qwen3-5-plus-02-15qwen3.5-plus-02-151,000,00065,536
qwen3-5-plus-20260420qwen3.5-plus-202604201,000,00065,536
qwen3-6-27bqwen3.6-27b262,14465,536
qwen3-6-35b-a3bqwen3.6-35b-a3b262,144235,929
qwen3-6-max-previewqwen3.6-max-preview262,14465,536
qwen3-6-plusqwen3.6-plus1,000,00065,536
qwen3-7-flashqwen3.7-flash1,000,00065,536
qwen3-8-2-4t-a95bqwen3.8-2.4t-a95b1,048,576262,144
qwen3-8-2-4t-a95b-batchqwen3.8-2.4t-a95b:batch1,010,000909,000
qwen3-8-27bqwen3.8-27b1,000,000131,072
qwen3-8-flashqwen3.8-flash1,000,000131,072
qwen3-8-max-0902qwen3.8-max-09021,000,000131,072
qwen3-8bqwen3-8b131,0728,192
qwen3-coderqwen3-coder262,14465,536
qwen3-coder-30b-a3b-instructqwen3-coder-30b-a3b-instruct262,144235,929
qwen3-coder-flashqwen3-coder-flash1,000,00065,536
qwen3-coder-nextqwen3-coder-next262,144235,929
qwen3-coder-plusqwen3-coder-plus1,000,00065,536
qwen3-maxqwen3-max262,14465,536
qwen3-max-thinkingqwen3-max-thinking262,14465,536
qwen3-next-80b-a3b-instructqwen3-next-80b-a3b-instruct262,144235,929
qwen3-next-80b-a3b-thinkingqwen3-next-80b-a3b-thinking262,144235,929

The last four collapsed profiles are deprecated: they remain selectable so saved pipelines keep loading, but DashScope rejects their model IDs. They were introduced by OpenRouter fallback discovery in the model sync and carry OpenRouter/HuggingFace IDs rather than DashScope ones (e.g. DashScope uses qwen2.5-72b-instruct, not qwen-2.5-72b-instruct, and has no :thinking model variants — reasoning is controlled with the enable_thinking request parameter instead). Migrate to a live profile above.

Configuration

Choose a profile to set the Qwen model and token limits, then select the DashScope region that issued your API key. Profiles keep the model and token values fixed while exposing the API key, region, and model-source settings.

Authentication

Provide a DashScope API key in apikey. The key must start with sk-; anything else is rejected before any request is made. Make sure the key was issued for the region you select.

Notes

Regions

region selects the DashScope regional endpoint used for all API calls:

ValueRegionEndpoint
usUS (Virginia)https://dashscope-us.aliyuncs.com/compatible-mode/v1
intlSingaporehttps://dashscope-intl.aliyuncs.com/compatible-mode/v1
cnChina (Beijing)https://dashscope.aliyuncs.com/compatible-mode/v1

The default is us. An unrecognised value falls back to the US endpoint. DashScope API keys are region-specific, so a key issued for one endpoint will fail against another.

Setting base_url overrides this table entirely, which is how you reach a DashScope host Alibaba Cloud serves outside the three above — another Alibaba Cloud region, for instance. It is available on every live profile, including custom; the deprecated profiles above do not expose it. Leave it empty to use the regional endpoint.

Error handling

Provider exceptions are mapped to friendly messages instead of raw stack traces:

  • Authentication failures surface as "Invalid DashScope API key."
  • Rate-limit errors surface as "Rate limit exceeded. Please try again later."
  • Connection failures surface as "Failed to connect to the DashScope API."
  • Other DashScope API errors surface as "An error occurred with the DashScope API."

Rate-limit and connection errors are classified as retryable by the shared chat base; authentication and generic API errors are not retried.

Keeping the model list current

Profiles are maintained by the model sync tool, see tools/sync_models:

python tools/sync_models/src/sync_models.py --provider llm_qwen --enable-discovery --apply

Discovery — adding profiles — requires ROCKETRIDE_QWEN_KEY. Without it the command above still runs, but only enriches profiles that already exist: OpenRouter and LiteLLM can supply token counts, and neither may add a profile unless you also pass --allow-fallback-discovery. Avoid that flag here — it lets OpenRouter contribute the HuggingFace-style IDs DashScope does not accept, which is what the deprecated profiles above are. The stable aliases are listed in protected_profiles so a non-authoritative source cannot deprecate them.


Upstream docs


Schema

FieldTypeDescriptionDefault
modelstringModel
Qwen model
modelTotalTokensnumberTokens
Maximum context length in tokens
qwen.base_urlstringBase URL override
Optional. Overrides the endpoint selected by Region. Leave empty to use the regional endpoint. Set this to reach a DashScope host other than the three listed above, for example another Alibaba Cloud region.
""
qwen.profilestringModel
Qwen AI model selection
"qwen-flash"
qwen.regionstringRegion
DashScope regional endpoint. API keys are not interchangeable between regions.
"us"

Dependencies

  • openai
  • langchain-openai
  • langchain-core
  • langchain