Repository navigation
Releases
v2.1.4
v2.1.4 Release Notes
🚀 Highlights
- Conversation trajectories in reward input — the agentic RL (reinforcement fine-tuning)
RewardInputmodel now accepts an optionaltrajectoriesfield, so reward requests can carry the full conversation history of a session alongside the agent output. This is a fully backward-compatible, additive change: existing reward payloads are unaffected. (#254)
✨ Features
- reinforcement: add trajectories to reward input (#254,
cc4e24b)- New
TrajectoryPydantic model indashscope/applications/finetune/reinforcement/component/data/reward_input.py, describing the conversation history of one trajectory in a session:trajectory_id: Optional[int]— identifier of the trajectory (defaults toNone)prompt: Optional[List[Dict[str, Any]]]— the prompt messages (defaults toNone)completions: List[Dict[str, Any]]— the completion messages (required)
- New optional field
RewardInput.trajectories: Optional[List[Trajectory]](defaults toNone) for trajectories captured during a session. - Serialization goes through the existing
model_dump(exclude_none=True)path, so unset trajectory fields are omitted from the wire payload;extra="allow"continues to preserve unknown keys.
- New
🐛 Bug Fixes
- reinforcement: address trajectory review feedback (
809f86a)- Gave
trajectory_idandpromptexplicit= Nonedefaults so a minimal trajectory containing onlycompletionsparses correctly. - Removed the
exclude_iffield option (only available in newer Pydantic releases), keeping the implementation compatible with the declaredpydantic>=2.0dependency;Noneexclusion is already handled bymodel_dump(exclude_none=True). - Added regression tests in
tests/legacy_1x/unit/test_agentic_rl_components.pycovering minimal trajectory parsing, optional-field defaults,Noneexclusion withexclude_none=True, and extra-key preservation.
- Gave
♻️ Refactoring
None
📚 Documentation
None
🔧 CI & Chore
- version: bump version to 2.1.4 (
64da577) - tests: apply pre-commit formatting (
cc15d12) and format the trajectory regression test (a26c2ce)
⚠️ Breaking Changes
None
📦 Installation
pip install --upgrade dashscope==2.1.4
Standalone CLI binaries for Linux (x86_64), macOS (arm64 / x86_64) and Windows (x86_64), plus SHA256 checksums, are attached as release assets.
👥 Contributors
Thanks to all the contributors who made this release possible:
📝 Full Changelog
v2.1.3
v2.1.3 Release Notes
🚀 Highlights
- AgentStudio Dynamic Workflows — a brand-new
dynamic_workflowsresource (sync and async) for managing dynamic workflows and their versions, plus extended agent configuration support. - Slimmer core install — RL server/observability dependencies (
fastapi,uvicorn,opentelemetry-sdk) moved out of the core package into the newagentic-rlextra. - CLI works without
click— the CLI no longer fails to import or produce output whenclickis not installed.
✨ Features
- agentstudio: dynamic workflow APIs and agent configuration (#251)
- New
client.dynamic_workflowsresource with full lifecycle management:create,retrieve,update,archive, andlistwith cursor-based pagination. - Version management APIs:
list_versions(paginated) andretrieve_versionfor inspecting workflow history. - Fully typed request params and response models (
DynamicWorkflowand related types) exported fromdashscope.applications.agentstudio. - Async parity via
AsyncDynamicWorkflows, including async cursor pages. - Extended agent configuration options in the AgentStudio models.
- English and Chinese reference documentation updated with usage examples.
- New
♻️ Refactoring
- deps: move RL server/observability deps to the
agentic-rlextra (#250)fastapi,uvicornandopentelemetry-sdkare only used by the Agentic RL function server and observability; they are no longer installed with the core package.- Inference-only users get a smaller dependency tree with fewer resolution conflicts in locked environments.
- Install the server dependencies explicitly when needed:
pip install dashscope[agentic-rl]. - The RL function server raises a clear
ImportErrorwith install guidance when the extra is missing; OpenTelemetry tracing degrades gracefully without it. - README (EN/ZH), docs index and Agentic RL reference pages updated to document the extra.
🐛 Bug Fixes
- cli: enable CLI import and output without real
clickinstalled (#252)dashscope/cli/errors.pynow importsclickconditionally and defines exception classes gracefully when it is absent, preventingModuleNotFoundErroron CLI import.dashscope/cli/output.pyswitched fromclick.echototyper.echo, so JSON, NDJSON and YAML outputs are emitted consistently without wrapping issues.- Added regression tests that simulate a click-less environment by blocking
clickimports in subprocesses, verifying CLI modules load and operate correctly.
📚 Documentation
- AgentStudio reference (EN/ZH): dynamic workflow usage and agent configuration examples.
- Agentic RL reference and docs index (EN/ZH):
agentic-rlextra installation instructions. - README / README_zh: updated install guidance for the slimmer core package.
🔧 CI & Chore
- version: bump version to 2.1.3.
- agentstudio: test coverage for dynamic workflows.
- style: satisfy black formatting for the RL server import guard.
- cli: trailing newline fix in
test_clickless_import.py.
⚠️ Breaking Changes
None.
Note: users running the Agentic RL function server must now install the extra explicitly (
pip install dashscope[agentic-rl]); a clearImportErrorwith guidance is raised if it is missing.
📦 Installation
pip install --upgrade dashscope==2.1.3
# Optional: Agentic RL function server & observability dependencies
pip install --upgrade "dashscope[agentic-rl]==2.1.3"👥 Contributors
Thanks to all the contributors who made this release possible:
📝 Full Changelog
v2.1.2
v2.1.2 Release Notes
🚀 Highlights
- SSE streams now stop at the
[DONE]marker — sync and async iterators no longer read past the terminal event, eliminating hangs and late transport errors when the server keeps the connection open. Contributed by our first-time community contributor @thzon! (#244) timeoutis now a proper client option — it is aliased torequest_timeoutinstead of being silently forwarded to the service as a model parameter (which could cause misleading errors such as fake 404s). Bare gateway error responses also produce clearer, actionable messages withx-request-idfor diagnostics. (#247)- TTS final responses are no longer lost —
SpeechSynthesizernow preserves usage-only and non-sentence final messages, so token usage and final response details are reliably captured. (#248) - Smaller wheel — the ~1.2 MB of bundled
dashscope/examplesfiles has been dropped from the wheel (813 KB now); examples remain available in the sdist. (#245)
✨ Features
- docs: synchronize API reference and release notes rendering (#246)
- The docs site now renders published GitHub Releases directly into the Release Notes pages (EN/ZH) at build time — GitHub Releases is the single source of truth, no manual table edits needed.
- API reference pages are synchronized automatically via the reworked
gen_referencetooling, and the version badge is read fromdashscope/version.py.
♻️ Refactoring
- tts: simplify
SpeechSynthesisResponseconstruction (#248) — leaner response assembly with the same public behavior, covered by new payload-scenario unit tests. - gen_reference: restructure and improve reference page synchronization (#246) — more robust generation and diffing of API reference pages for the docs site.
🐛 Bug Fixes
- sse: stop reading at the
[DONE]marker (#244)- Previously the shared sync and async SSE streams skipped
[DONE]but kept reading the HTTP response until EOF. If the server left the connection open after the terminal event, consuming an otherwise completed stream could block waiting for more data or raise a later transport error. - Both iterators now terminate immediately at
[DONE]and their existingfinallyblocks close the response. Sync and async regression tests exercise the public chat completions API with a mock body that raises on any read after the terminal event.
- Previously the shared sync and async SSE streams skipped
- api: alias
timeouttorequest_timeoutand handle bare gateway errors (#247)- The
timeoutkeyword is treated as an alias forrequest_timeoutin the client, with a warning when both are provided; it is never forwarded as a model parameter. - Bare gateway responses (empty body, no content-type) now yield improved error messages instead of opaque failures, and the
x-request-idheader is extracted and exposed in error responses for easier diagnostics. - Regression tests cover timeout aliasing and bare gateway error handling in both sync and async paths, plus end-to-end tests verifying timeout enforcement and diagnostic error surfacing.
- The
- tts: preserve final response for non-sentence and usage-only messages (#248)
SpeechSynthesisOutputcan now initialize with aNonesentence, so usage-only and non-timestamp messages are kept as final response candidates instead of being dropped.- A final message with
output=Nonecorrectly overwrites earlier extra messages, ensuring the last event wins. - New unit tests verify capturing of usage and final response details across a range of response payload scenarios.
- docs: dispatch release deployments on
mainand serialize Pages jobs (#246) — prevents overlapping GitHub Pages deployments from racing each other. - docs: add missing comma in release notes table formatting (#246).
📚 Documentation
None
🔧 CI & Chore
- packaging: drop examples from the wheel, keep them in the sdist (#245)
- The wheel no longer bundles
dashscope/examples(~1.2 MB / 126 files). The bundling dated from when the acli runtime was vendored in-repo; since #230 the agent runtime lives in the publisheddashscope-agenticxpackage and nothing consumes the installed copy. examples/stays in the sdist via the unchangedMANIFEST.infor source users; the stale-module cleanup inbuild_pyis preserved.
- The wheel no longer bundles
- docs: add automated docs build and release notes integration (#246) — publishing a GitHub Release now triggers the Docs workflow to rebuild and deploy GitHub Pages automatically.
- legacy: preserve sync non-JSON body content in response handling (test coverage) (#247).
- cli: add test to verify silence on dumb terminal (#246).
- tests: satisfy pre-commit trailing comma formatting (#246).
⚠️ Breaking Changes
None
📦 Installation
pip install --upgrade dashscope==2.1.2👥 Contributors
Thanks to all the contributors who made this release possible:
- @thzon — 🎉 New contributor! First contribution in #244 (SSE
[DONE]marker fix) - @luk384090-cloud
- @lzsweb
📝 Full Changelog
v2.1.1
v2.1.1 Release Notes
🚀 Highlights
- AgentStudio usage APIs — query application usage statistics through the shared SDK transport (#238).
- Standalone CLI binaries — prebuilt
dashscopeexecutables for macOS (arm64 / x86_64), Linux (x86_64) and Windows (x86_64) are attached to this release; no Python environment required. - Smaller install package — the Qwen tokenizer vocabulary (
qwen.tiktoken) is no longer bundled in the wheel; it is downloaded on first use. - New documentation site — MkDocs-based bilingual (EN/ZH) docs with full API reference, CLI 2.0 guide and SDK Expert (AgenticX) assistant docs.
✨ Features
- agentstudio: add usage APIs and reuse SDK transport (#238)
- cli: rename
acliextra toexpert, keepacli*as compatible aliases
♻️ Refactoring
- tokenizer: remove bundled vocab and enable download on first use
- tokenizers: exclude
qwen.tiktokenfrom the wheel, download on demand
🐛 Bug Fixes
- audio: detach the socket inside the error-processing lock hold in
live/realtimesessions, closing a race where a concurrentsend_eventcould write to a socket about to be closed; adds deterministic regression tests
📚 Documentation
- Add MkDocs documentation site configuration and integration; improve theme, 404 handling, navigation, sidebar and TOC behavior for multi-language support
- Add Command Line Interface 2.0 section in English and Chinese
- Add SDK Expert (AgenticX) interactive AI assistant docs
- Update English documentation with new features and clarifications; remove stale "2.0" version references
- Clarify mock billing and sync-only audio APIs; replace SVG logo with PNG format
- Pin mkdocstrings, translate AgentStudio nav, note recipe image asset
🔧 CI & Chore
- Add multi-platform CLI binary build workflow (macOS arm64 / x86_64, Linux, Windows)
- Exclude docs folder from the stylelint pre-commit hook
- Update release template with cleaned-up sections
⚠️ Breaking Changes
None — the acli → expert rename keeps acli* entry points as compatible aliases.
📦 Installation
pip install --upgrade dashscope==2.1.1Or grab a standalone CLI binary for your platform from the assets below.
👥 Contributors
Thanks to all the contributors who made this release possible:
📝 Full Changelog
v2.1.0
v2.1.0 Release Notes
🚀 Highlights
- Qwen Live realtime audio sessions built on a shared realtime transport.
- New
dashscope.devkit: offline self-diagnosis for failed calls plus static/record/replay HTTP mocking. - Automated release pipeline — pushing a
v*tag now builds, publishes to PyPI, and drafts the GitHub Release.
✨ Features
- audio: add Qwen Live sessions on the shared realtime transport (#231).
- audio: accept audio sources for voice enrollment.
- agentstudio: session mount fields for Bailian memory and OSS.
- devkit: add offline self-diagnosis for failed calls.
- devkit: add static/record/replay dev mock at the HTTP transport.
- transport: introduce
APIResponseand arawparameter for raw responses. - transport: support per-request options across all resources.
- pagination: introduce a generic pagination base class and refactor resource list interfaces.
- parse: add fault-tolerant response model parsing and strict validation config.
- core: add client request ID and response validation exception.
- v2: extend typed parsing, per-request options, and pagination fixes to all resources.
- Enhance API response handling and resource methods.
♻️ Refactoring
- cli: migrate the agent runtime to
dashscope-agenticx(#230). - server: extract client disconnect response logic.
🐛 Bug Fixes
- tts: prevent
KeyErrorfor non-timestamp messages in speech parts. - audio: preserve graceful Live and Realtime shutdown.
- reinforcement: preserve FaaS business errors and request context.
- reinforcement: address agentic RL review findings.
- reinforcement: allow local wheel paths in pip requirement tokens.
- core: unify API key resolution and improve error handling.
- v2: support more image models and input forms, including wan2.7 image responses.
- logging: correlate SDK 2.0 response errors with request IDs.
📚 Documentation
- None
🔧 CI & Chore
- release: add tag-triggered PyPI publishing workflow (#234).
- version: bump to 2.1.0.
- ci: pin Python 3.9 / unit-test runners to ubuntu-24.04.
- ci: run legacy unit tests on pushes and pull requests again.
- test: stabilize RL CLI help checks, align job list output, and move layer decoupling checks to the current suite.
⚠️ Breaking Changes
None
📦 Installation
pip install --upgrade dashscope==2.1.0👥 Contributors
Thanks to all the contributors who made this release possible:
📝 Full Changelog
v2.0.4
v2.0.4 Release Notes
🚀 Highlights
CLI 2.0 — Brand New Command-Line Architecture
This release introduces a major architectural overhaul of the dashscope CLI, bringing a modern, extensible command-line experience:
- Unified Entry Point: The
dashscopecommand now serves as the primary entry point for both the new 2.0 CLI and the legacy 1.x functionality (accessible viadashscope1for backward compatibility). This eliminates confusion and simplifies the user experience. - Full Command Coverage: The v2 CLI now includes a comprehensive set of commands including
chat,models, and more, providing a rich interactive experience directly from the terminal. - Architectural Foundation: Built on a clean, modular architecture designed for extensibility and maintainability.
⚠️ Note: CLI 2.0 is actively under development. While it is already feature-rich, we are continuing to iterate on the design and add more capabilities. Feedback and contributions are welcome!
🐛 Bug Fixes
- Top-level auth shortcuts: Fixed authentication shortcuts to work correctly from the top-level CLI.
- Typer compatibility: Resolved an issue where exceptions from the typer compatibility layer were being misclassified, improving error handling and debugging.
- Click 8.2 compatibility: Added compatibility with click 8.2
CliRunnerparameter changes, ensuring smooth operation with the latest click versions. - ANSI code stripping: Fixed an issue in
test_package_layoutwhere ANSI escape codes were not being stripped before assertions, improving test reliability.
🔧 Improvements
- User-Agent token: Renamed the default User-Agent product token for better clarity and consistency.
- Code style: Unified code formatting with consistent trailing commas across the codebase.
🏗️ CI/CD
- Python 3.9 CI: Pinned the Python 3.9 test leg to
ubuntu-24.04for stability and reproducibility.
📦 Installation
pip install --upgrade dashscope👥 Contributors
Thanks to all the contributors who made this release possible:
📝 Full Changelog
v2.0.3
What's Changed
✨ Features
- common: add user-agent header support for better request identification
- anthropic: support Anthropic streaming thinking blocks and redacted thinking block parsing
- audio: add async HTTP audio resources
- acli: sync agenticCLI runtime and tool updates
- finetune: optimize function dependency layer creation and status check mechanism
- v2 error registry: sync error catalog with
sdk.ws.*entries and back transport/file I/O errors withsdk.*entries
♻️ Refactoring
- v2 package structure: promote SDK implementation to package root, group applications, and promote reinforcement public import path
- audio: remove preview warnings and refactor voice customization; refactor async client bridging
- errors: unify error handling base classes, adjust Agentic RL exception hierarchy, and add deprecation markers to 1.x error classes
- compat: preserve 1.x application interfaces and lazy module imports
- shared: update shared module docs and migrate subpackage implementations
- agentic-rl: use relative internal imports
🐛 Bug Fixes
- errors: keep layer guidance at raise sites; normalize response and websocket failures; classify response failures as internal errors
- packaging: clean stale modules before wheel build to prevent shadowed imports
- async: harden blocking upload bridge
- protocols: preserve Anthropic thinking blocks in responses
- ws: bound task buffers and normalize timeouts
- transport: harden HTTP client configuration and retries
- legacy: fix 1.x legacy alias module import issues
- compat: preserve lazy modules and refresh quickstart
- add missing
dashscope._sharedmodule
📚 Documentation
- readme: update documentation with new feature groups and configuration options
- acli: update expert guidance for SDK 2.0
- add internal SDK documentation
🔧 CI & Chore
- limit unit tests to Python 3.11–3.13
- align legacy aliases and formatting
- fix string formatting issues in tests
- wrap comment and docstring lines flagged by flake8 E501
Contributors
Full Changelog: v2.0.2...v2.0.3
v2.0.2
What's Changed
✨ Features
agentstudio: inference parameters in agent model config (#217)
ModelConfig now carries the four optional inference parameters of the Managed Agent API — temperature, max_tokens, enable_thinking, and thinking_budget — and is exported from dashscope.agentstudio. agents.create / agents.update accept either a ModelConfig or a bare model id, while Agent.model coerces the server object and Agent.model_id reads the id alone. Unset parameters are omitted so the server default applies; on update a sent config replaces the whole object, so use agent.model.copy_with(...) to change one knob without clearing the rest. copy_with also tolerates forward-compat fields already present on the config, while typos and invented fields still raise.
🐛 Bug Fixes
observability: emit reasoning content in LLM output message spans (#218)
The OpenAI and DashScope output-message converters were silently dropping reasoning_content, so chat spans never echoed model thinking even though the Reasoning part was supported in the schema. Reasoning is now exported from the _core facade and inserted as the first part when present.
observability: fix tool span arguments recording (#218)
typing.Dict was used where dict (the builtin) was required for instantiation, causing a TypeError that the broad except swallowed — every @observe_tool span recorded {"_error": "could_not_bind_arguments"} instead of the real arguments. Switched to the builtin dict so binding succeeds.
observability: graceful degradation without Reasoning facade (#218)
Reasoning is now imported in a nested try so environments with loongsuite-util-genai < 0.4.0 degrade to missing reasoning parts instead of setting GENAI_AVAILABLE=False and disabling the entire tracing layer.
agentstudio: prevent double-read on response streams (#217)
The agent response stream wraps a single-use EventSource, so iterating it a second time silently produced nothing (or StreamClosedError after close), making it look like an empty turn. A second pass now raises a clear error directing callers to open another stream.
👥 Contributors
Full Changelog: v2.0.1...v2.0.2
v2.0.1
🎉 DashScope SDK v2.0.1
This release introduces the DashScope 2.0 SDK stack alongside the existing 1.x API, bringing modern audio capabilities, improved CLI tooling, and enhanced documentation.
✨ What's New
🚀 Features
DashScope 2.0 SDK Stack
- Complete 2.0 SDK architecture landed alongside the legacy 1.x API
- New modular design with improved type safety and better developer experience
- Full compatibility maintained with existing 1.x code
- See the README for migration guidance
Audio API Preview
- 2.0 Audio API marked as preview with current speech models and protocols
- Text-to-Speech (TTS) with multiple voice options
- Speech-to-Text (ASR) with real-time streaming support
- Aligned with latest Alibaba Cloud speech service protocols
- Ready for testing and early adoption
🔄 Improvements
CLI & Dependency Management
- Unified dependency installation prompts across all modules
- Simplified to single command:
pip install -U dashscope - Removed confusing
tokenizerandrlextra dependency groups - Cleaner
setup.pyconfiguration - Removed RL test options from
requirements-test.txt
- Simplified to single command:
Documentation
-
Comprehensive README updates for version 2.0
- Added feature comparison table between 1.x and 2.0
- Updated installation and usage examples
- New sections for audio, multimodal, and agent capabilities
-
Error handling documentation enhanced
- Marked error handling as work-in-progress in comparison table
- Added warning that 2.0 typed error system is under active development
- Provided forward-compatible exception handling recommendations
- Noted that new exception classes may be added and error code mappings adjusted
Examples & Samples
-
Reorganized examples directory with clear structure:
01_atomic_capabilities/- Core API demonstrations02_advanced_engineering/- Production patterns03_agent_recipes/- Agent development examples04_real_world_scenarios/- End-to-end use caseslegacy_1x/- 1.x API examples for reference
-
AgentStudio examples moved to 2.0 tier with agentic RL quickref
-
Legacy samples cleaned up and superseded
🐛 Bug Fixes
- Fixed
agentstudiomemory update to send documented precondition object - Silenced
no-name-in-modulepylint warnings on Assistants imports - Improved code style compliance across examples
📦 Package Information
- Version: 2.0.1
- Python: 3.9+
- License: Apache 2.0
- Platforms: POSIX, macOS, Windows
Installation
pip install -U dashscopeOptional Features
# Interactive AI assistant
pip install -U dashscope[acli]
# With Anthropic/OpenAI provider support
pip install -U dashscope[acli-anthropic]
pip install -U dashscope[acli-openai]
# Voice capabilities
pip install -U dashscope[acli-voice]
# Camera support
pip install -U dashscope[acli-camera]
# All optional features
pip install -U dashscope[acli-all]📝 Full Changelog
Commits: 14 commits since v1.27.8
feat(v2): land the dashscope 2.0 SDK stack alongside the 1.x API
feat(v2): mark the 2.0 audio API as preview
feat(v2.0.1): align audio with current speech models and protocols
refactor(cli): unify dependency installation prompts
docs(readme): update documentation to reflect new features and usage for version 2.0
docs(readme): update error handling documentation
docs(examples): move agentstudio to the 2.0 tiers, add agentic RL quickref
docs(examples): add the examples tree (legacy 1.x samples, agent recipes, real-world scenarios)
docs(samples): drop the last legacy sample
fix(agentstudio): send the documented precondition object on memory update
style(examples): silence no-name-in-module on Assistants imports
🔗 Links
- PyPI: https://pypi.org/project/dashscope/2.0.1/
- Documentation: See README.md
- Issues: https://github.com/dashscope/dashscope-sdk-python/issues
👥 Contributors
Thanks to all contributors who made this release possible:
v1.27.8
🚀 What's New in v1.27.8
✨ New Features
- agentstudio: Added memory management APIs — supports memory stores, memories, and memory versions for AgentStudio integration (6df8379)
🔧 Improvements
- acli: Synced with acli v0.7.1, including compression hints, prefix_chars trace, and directory-based checkpoints (69464b3, 2aa724a)
- dashscope: Refactored Assistant API import mechanism to support lazy loading, reducing startup overhead (b0bda1e)
🐛 Bug Fixes
- encryption: Fixed per-call base_url and api_key not being passed to Encryption module (11a2566)
- tests: Added pylint disable for lazy-loaded names in assistants/threads tests (a193ee1, 3d30400)
👥 Contributors
Thanks to everyone who contributed to this release!
@foleydang
@lzsweb]
@luk384090-cloud
Full Changelog: v1.27.7...v1.27.8