arfaram / connector-qwen
Qwen (Alibaba Cloud) AI connector for Ibexa DXP using openai-php/client SDK
Package info
github.com/arfaram/connector-qwen
Type:ibexa-bundle
pkg:composer/arfaram/connector-qwen
Requires
- php: >=8.3
- ibexa/connector-ai: ~5.0
- ibexa/core: ~5.0
- openai-php/client: ^0.10
- symfony/config: ^7.3
- symfony/dependency-injection: ^7.3
- symfony/http-kernel: ^7.3
- symfony/yaml: ^7.3
Requires (Dev)
- dama/doctrine-test-bundle: ^8.2
- ibexa/behat: ~5.0
- ibexa/code-style: ~2.0.0
- ibexa/phpstan: ~5.0
- ibexa/rector: ~5.0
- ibexa/test-core: ~5.0
- matthiasnoback/symfony-dependency-injection-test: ^5.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^9.5
- qossmic/deptrac-shim: ^0.24.0 || ^1.0.2
- symfony/phpunit-bridge: ^7.3
This package is auto-updated.
Last update: 2026-04-19 18:41:06 UTC
README
connector-qwen
Qwen (Alibaba Cloud) AI connector for Ibexa DXP.
This bundle integrates the Qwen AI models via Alibaba Cloud's DashScope API (OpenAI-compatible) with the Ibexa AI framework (ibexa/connector-ai). It uses the openai-php/client SDK with a custom base URL, so there is no need for a hand-rolled HTTP client.
Requirements
- PHP >= 8.3
- Ibexa DXP ~5.0
ibexa/connector-ai~5.0- Alibaba Cloud DashScope API key (get one at Model Studio Console)
Installation
Require the package:
composer require arfaram/connector-qwen
Register the bundle in config/bundles.php:
return [ // ... ConnectorQwenBundle\ConnectorQwenBundle::class => ['all' => true], ];
Environment Variable
Set your DashScope API key in .env:
QWEN_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
⚠️ This must be a DashScope API key (starts with
sk-), NOT an Alibaba Cloud AccessKey ID/Secret pair.To get your DashScope API key:
- International: Go to Model Studio Console, navigate to API Keys
- China region: Go to DashScope Console → API Keys
⚠️ You must also activate each model you want to use in the Model Studio console under Model Square / Model Plaza.
Region Configuration
The bundle defaults to the international DashScope endpoint. If you're using the China region, override per SiteAccess:
| Region | Base URI |
|---|---|
| International (default) | https://dashscope-intl.aliyuncs.com/compatible-mode/v1 |
| China | https://dashscope.aliyuncs.com/compatible-mode/v1 |
ibexa: system: default: connector_qwen: qwen: api_key: '%env(QWEN_API_KEY)%' # International (default): base_uri: 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1' # China region: # base_uri: 'https://dashscope.aliyuncs.com/compatible-mode/v1'
Configuration
Available Qwen Models
⚠️ Retired models (do not use):
qwen-max,qwen-plus,qwen-turbo,qwen2.5-*series are deprecated.
Text Models
| Model ID | Description
|---|---|---|
| qwen3.6-plus | Qwen 3.6 Plus, most capable (latest)
| qwen3.6-plus-2026-04-02 | Qwen 3.6 Plus pinned to 2026-04-02
| qwen3.6-flash | Qwen 3.6 Flash, fast & balanced (latest)
| qwen3.6-flash-2026-04-16 | Qwen 3.6 Flash pinned to 2026-04-16
| qwen3.5-plus | Qwen 3.5 Plus (latest)
| qwen3.5-flash | Qwen 3.5 Flash (latest)
| qwen3-max | Qwen 3 Max (latest)
| qwen3.6-35b-a3b | Qwen 3.6 Open Source (35B-A3B)
| qwen3.5-35b-a3b | Qwen 3.5 Open Source (35B-A3B)
| qwen-long | Qwen Long, long context
Vision Models (Image-to-Text)
| Model ID | Description
|---|---|---|
| qwen3-vl-plus | Qwen 3 VL Plus, dedicated vision
| qwen3-vl-plus-2025-09-23 | Qwen 3 VL Plus pinned to 2025-09-23
| qwen3.6-plus | Qwen 3.6 Plus, multimodal capable (latest)
| qwen3.6-flash | Qwen 3.6 Flash, multimodal capable (latest)
| qwen3.5-plus | Qwen 3.5 Plus, multimodal capable (latest)
| qwen3.5-flash | Qwen 3.5 Flash, multimodal capable (latest)
| qwen3.6-35b-a3b | Qwen 3.6 Open Source vision
| qwen3.5-35b-a3b | Qwen 3.5 Open Source vision
Basic Configuration
Create config/packages/ibexa_connector_qwen.yaml:
ibexa_connector_qwen: text_to_text: default_model: qwen3.6-flash default_temperature: 1.0 default_max_tokens: 4000 models: qwen3.6-plus: 'Qwen 3.6 Plus (latest)' qwen3.6-flash: 'Qwen 3.6 Flash (latest)' qwen3.5-plus: 'Qwen 3.5 Plus (latest)' qwen3-max: 'Qwen 3 Max (latest)' qwen3.6-35b-a3b: 'Qwen 3.6 Open Source' image_to_text: default_model: qwen3-vl-plus default_temperature: 1.0 default_max_tokens: 4000 models: qwen3-vl-plus: 'Qwen 3 VL Plus (latest)' qwen3-vl-plus-2025-09-23: 'Qwen 3 VL Plus (2025-09-23)' qwen3.6-plus: 'Qwen 3.6 Plus (latest)' qwen3.6-flash: 'Qwen 3.6 Flash (latest)' qwen3.6-35b-a3b: 'Qwen 3.6 Open Source'
SiteAccess-Aware API Key Configuration
ibexa: system: default: connector_qwen: qwen: api_key: '%env(QWEN_API_KEY)%' my_siteaccess: connector_qwen: qwen: api_key: '%env(QWEN_API_KEY_MY_SITEACCESS)%'
Minimal Configuration (uses defaults)
ibexa_connector_qwen: text_to_text: default_model: qwen3.6-plus
All other values will use their defaults:
default_temperature:1.0default_max_tokens:4000models: all current Qwen models as defined in the Configuration class
Production-Optimized Configuration
Use dated model versions in production for deterministic, reproducible results:
ibexa_connector_qwen: text_to_text: default_model: qwen3.6-flash-2026-04-16 default_temperature: 0.7 default_max_tokens: 4096 models: qwen3.6-plus-2026-04-02: 'Qwen 3.6 Plus (2026-04-02)' qwen3.6-flash-2026-04-16: 'Qwen 3.6 Flash (2026-04-16)' image_to_text: default_model: qwen3-vl-plus-2025-09-23 default_temperature: 0.5 default_max_tokens: 2048 models: qwen3-vl-plus-2025-09-23: 'Qwen 3 VL Plus (2025-09-23)'
License
MIT - See LICENSE for details.
Author
Ramzi Arfaoui - ramzi_arfa@hotmail.de