Repository navigation
v1.27.4
✨ Features
Agent Studio — Webhook Endpoint APIs
Complete webhook lifecycle management for event-driven architectures:
- New resources:
client.webhook_endpoints(sync) andasync_client.webhook_endpoints(async) - Operations: create, list, get, update, delete webhook endpoints
- Event filtering: subscribe to specific event types (
WebhookEventTypeenum:AGENT_RUN_COMPLETED,SESSION_COMPLETED, etc.) - Status management: endpoints can be
ACTIVEorDISABLED(WebhookStatusenum) - Disabled reason tracking: understand why an endpoint was disabled via
WebhookDisabledReasonenum (MANUAL,CONSECUTIVE_DELIVERY_FAILURES,REDIRECT_RESPONSE,SSRF_VALIDATION_FAILED,TLS_VALIDATION_FAILED) - Delivery status: track webhook delivery outcomes via
WebhookDeliveryStatusenum (SUCCESS,FAILED,PENDING) - Type-safe params:
WebhookEndpointCreateParams,WebhookEndpointUpdateParams,WebhookEventListParamsfor structured request building - Removed wildcard subscription: explicit event type selection required (no more
*)
CLI — Async Task Management Commands
Full async task lifecycle support for image generation, speech synthesis, and transcription:
dashscope image-gen fetch <task_id>: query task status or retrieve resultsdashscope image-gen wait <task_id>: block until task completes (success/failure/cancellation)dashscope image-gen cancel <task_id>: cancel a pending task with success confirmationdashscope image-gen list: list tasks with filtering (--limit,--after,--before,--status)- Same commands available for
synthesisandtranscriptionsubcommands - Workspace support via
-w/--workspaceflag
SDK Core — Unified Client Identification Header
Consolidated SDK telemetry into a single structured header for backend analytics:
- Merged headers: replaced
x-dashscope-sdk-client+x-dashscope-sdk-versionwith singlex-dashscope-sdk-client: python-sdk/<version>[/<module>] - Module tagging:
get_sdk_headers(module="agentstudio")→python-sdk/1.27.4/agentstudio - Applied to all request paths: HTTP/HTTPS/WebSocket sync/async, Agent Studio transport, acli TongyiProvider
- Backward compatible: set
DASHSCOPE_DISABLE_SDK_HEADERS=1to opt out - Session tracking:
x-dashscope-sdk-session-idremains unchanged for correlation
SDK Core — SDK Client Identifier Override
sdk_clientparameter: override the SDK client identifier in API calls for custom integrations- Deployment plan parameters:
deployment_id,deployment_versionfor tracking deployment-specific usage
🐛 Bug Fixes
HTTP — TCP Keepalive on Shared Sync Session Pool (#187)
Problem: Pooled connections silently dropped by NAT gateways or load balancers (no FIN/RST) would stall until the 300-second read timeout expired, causing intermittent hangs in long-running applications.
Solution:
- Enabled TCP keepalive socket options on the shared sync session's connection pool:
SO_KEEPALIVE: enable keepalive at the socket levelTCP_KEEPIDLE(Linux) /TCP_KEEPALIVE(macOS): idle time before first probe (60s)TCP_KEEPINTVL: interval between probes (30s)TCP_KEEPCNT: max probes before declaring connection dead (3)
- Kernel now detects stale connections in ~150s (60 + 3×30) instead of 300s, failing fast with
ConnectionError(retried once) - New public API:
dashscope.close_shared_sync_session()— reset the SDK-managed connection pool for long-running apps - Auto-cleanup: pooled connections closed at interpreter exit via
atexit.register() - Preserved
TCP_NODELAY(urllib3 replaces default options when custom options are supplied)
acli — Windows TUI Fixes (#188)
Problem 1: run_command failed with AttributeError: 'Capture' object has no attribute 'encoding' inside the TUI.
- Root cause:
sys.stdout.encodingwas read at runtime, but the TUI replacessys.stdoutwith Textual's capture object (no.encodingattribute) - Fix: encoding resolved at import time, not runtime
Problem 2: Mouse wheel scroll translated to arrow keys or screen drag on Windows Terminal / conhost.
- Root cause: terminal never received mouse capture signal, so wheel events were interpreted as navigation
- Fix: enable mouse capture in the TUI on Windows
Additional improvements:
- PowerShell preference:
pwshpreferred overcmd.exe, commands passed as argv elements (no re-quoting),-NoProfileflag added - Markdown table rendering: tables now render correctly in the TUI output
- Input draft preservation: user input restored around confirmation prompts
- Confirm mode: new
confirm_modeconfig option —"dangerous"(default) auto-passes CONFIRM-level tools (run_command,write_file), only DANGEROUS tools (delete_file,delete_directory) prompt;"all"prompts for everything
acli — Agentic CLI Sync (v0.6.3 → v0.6.4)
Synced upstream agenticCLI improvements:
- Stagnation tracker: read-only hard cap for oneshot runs (prevents infinite loops)
- Auto-approve:
auto_approveconfig +ACLI_AUTO_APPROVEenv override for non-interactive runs - Budget-aware convergence nudge: nudge logic considers remaining budget in autonomous runs
- HardenedProvider: capped exponential backoff (3 retries, 4s base, 16s cap) to survive transient model-API failures
- Post-change verification rule: rule 18 — run tests covering the change, or add a focused test when nothing covers it, report command + pass/fail
- Plan wiring: multi-step work uses
create_plan/complete_step, echoed as "## Current plan" - Oneshot flag fix:
-cnow correctly applies--protocol/--max-turnsoverrides (previously returned before overrides were applied) - Default model:
qwen3.8-maxbecomes the factory default (wasqwen3.7-max)
Agent Studio — Webhook Model Merge Issue
- Problem: webhook update operations incorrectly merged the entire model object instead of updating specific fields
- Fix: explicit field-level updates in
WebhookEndpointUpdateParams
🧪 Testing
- Unit tests:
x-dashscope-sdk-clientheader format validation - Unit tests: TCP keepalive socket options and session lifecycle
- Unit tests: CLI async task commands (fetch, wait, cancel, list) for image generation, synthesis, transcription
- Unit tests: acli
reflection.py— 100+ test cases coveringis_readonly_tool_call(67 cases),ReflectionTracker(11 cases),StagnationTracker(10 cases),convergence_hint(12 cases)
👥 Contributors
- @lzsweb — acli Windows TUI fixes, agentic CLI sync, stagnation tracker, confirm mode, unit tests, pre-commit hooks, SDK client module tagging
- @luk384090-cloud — TCP keepalive, CLI async commands, SDK client header consolidation, deployment plan parameters
- @coolsky99 — Agent Studio webhook APIs, webhook model merge fix
Full Changelog: v1.27.3...v1.27.4
Upgrade: pip install --upgrade dashscope