dashscope 2.0.3__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (662) hide show
  1. {dashscope-2.0.3 → dashscope-2.1.0}/MANIFEST.in +0 -1
  2. {dashscope-2.0.3 → dashscope-2.1.0}/PKG-INFO +114 -14
  3. {dashscope-2.0.3 → dashscope-2.1.0}/README.md +111 -5
  4. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/__init__.py +33 -1
  5. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_config.py +75 -0
  6. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_logging.py +23 -0
  7. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_shared/_sdk_ident.py +1 -1
  8. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/sessions.py +45 -3
  9. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/types/__init__.py +1 -0
  10. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/types/models.py +47 -15
  11. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/types/params.py +9 -3
  12. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/agentic_rl.py +11 -2
  13. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/__init__.py +4 -0
  14. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/constants.py +36 -0
  15. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/model.py +188 -45
  16. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/model_types.py +10 -1
  17. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/utils.py +126 -51
  18. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/func_manager.py +11 -4
  19. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_reward_processor.py +14 -2
  20. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/server/server.py +106 -34
  21. dashscope-2.1.0/dashscope/cli/__init__.py +13 -0
  22. dashscope-2.1.0/dashscope/cli/__main__.py +8 -0
  23. dashscope-2.1.0/dashscope/cli/app.py +213 -0
  24. dashscope-2.1.0/dashscope/cli/commands/__init__.py +15 -0
  25. dashscope-2.1.0/dashscope/cli/commands/agentstudio.py +646 -0
  26. dashscope-2.1.0/dashscope/cli/commands/apps.py +226 -0
  27. dashscope-2.1.0/dashscope/cli/commands/audio.py +718 -0
  28. dashscope-2.1.0/dashscope/cli/commands/audio_customization.py +567 -0
  29. dashscope-2.1.0/dashscope/cli/commands/auth.py +127 -0
  30. dashscope-2.1.0/dashscope/cli/commands/chat.py +158 -0
  31. dashscope-2.1.0/dashscope/cli/commands/config.py +84 -0
  32. dashscope-2.1.0/dashscope/cli/commands/decision.py +141 -0
  33. dashscope-2.1.0/dashscope/cli/commands/deployments.py +283 -0
  34. dashscope-2.1.0/dashscope/cli/commands/embeddings.py +303 -0
  35. dashscope-2.1.0/dashscope/cli/commands/files.py +123 -0
  36. dashscope-2.1.0/dashscope/cli/commands/ft.py +306 -0
  37. dashscope-2.1.0/dashscope/cli/commands/images.py +379 -0
  38. dashscope-2.1.0/dashscope/cli/commands/models.py +78 -0
  39. dashscope-2.1.0/dashscope/cli/commands/multimodal.py +321 -0
  40. dashscope-2.1.0/dashscope/cli/commands/oss.py +55 -0
  41. dashscope-2.1.0/dashscope/cli/commands/rerank.py +139 -0
  42. dashscope-2.1.0/dashscope/cli/commands/rl.py +462 -0
  43. dashscope-2.1.0/dashscope/cli/commands/tingwu.py +109 -0
  44. dashscope-2.1.0/dashscope/cli/commands/tokenization.py +91 -0
  45. dashscope-2.1.0/dashscope/cli/commands/videos.py +405 -0
  46. dashscope-2.1.0/dashscope/cli/config_store.py +601 -0
  47. dashscope-2.1.0/dashscope/cli/confirm.py +47 -0
  48. dashscope-2.1.0/dashscope/cli/context.py +224 -0
  49. dashscope-2.1.0/dashscope/cli/errors.py +520 -0
  50. dashscope-2.1.0/dashscope/cli/input.py +256 -0
  51. dashscope-2.1.0/dashscope/cli/main.py +338 -0
  52. dashscope-2.1.0/dashscope/cli/output.py +336 -0
  53. dashscope-2.1.0/dashscope/cli/progress.py +134 -0
  54. dashscope-2.1.0/dashscope/cli/sdk.py +78 -0
  55. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/client.py +56 -4
  56. dashscope-2.1.0/dashscope/devkit/__init__.py +75 -0
  57. dashscope-2.1.0/dashscope/devkit/diagnosis.py +536 -0
  58. dashscope-2.1.0/dashscope/devkit/mock.py +910 -0
  59. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/errors.py +128 -6
  60. dashscope-2.1.0/dashscope/expert.py +151 -0
  61. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/_shim.py +0 -1
  62. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts/speech_synthesizer.py +8 -0
  63. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/__init__.py +25 -145
  64. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/protocols/anthropic.py +131 -44
  65. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/protocols/base.py +32 -2
  66. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/protocols/native.py +20 -3
  67. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/protocols/openai.py +79 -27
  68. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/_jobs.py +429 -78
  69. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/_oss_upload.py +11 -4
  70. dashscope-2.1.0/dashscope/resources/_sse.py +124 -0
  71. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/apps.py +356 -26
  72. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/audio/__init__.py +69 -2
  73. dashscope-2.1.0/dashscope/resources/audio/_ws_session.py +292 -0
  74. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/audio/asr.py +296 -9
  75. dashscope-2.1.0/dashscope/resources/audio/customization.py +1470 -0
  76. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/audio/http_tts.py +314 -56
  77. dashscope-2.1.0/dashscope/resources/audio/live.py +724 -0
  78. dashscope-2.1.0/dashscope/resources/audio/phrases.py +580 -0
  79. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/audio/realtime.py +169 -141
  80. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/audio/tts.py +6 -2
  81. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/chat/completions.py +350 -35
  82. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/decision.py +151 -8
  83. dashscope-2.1.0/dashscope/resources/deployments.py +1189 -0
  84. dashscope-2.1.0/dashscope/resources/embeddings.py +1022 -0
  85. dashscope-2.1.0/dashscope/resources/files.py +1011 -0
  86. dashscope-2.1.0/dashscope/resources/fine_tunes.py +1589 -0
  87. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/images.py +577 -21
  88. dashscope-2.1.0/dashscope/resources/models.py +558 -0
  89. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/multimodal/chat.py +172 -9
  90. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/multimodal/embeddings.py +32 -3
  91. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/reinforcement_learning.py +242 -18
  92. dashscope-2.1.0/dashscope/resources/rerank.py +340 -0
  93. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/tingwu.py +180 -26
  94. dashscope-2.1.0/dashscope/resources/tokenization.py +302 -0
  95. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/videos.py +513 -5
  96. dashscope-2.1.0/dashscope/transport/__init__.py +19 -0
  97. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/transport/_ident.py +42 -7
  98. dashscope-2.1.0/dashscope/transport/_options.py +160 -0
  99. dashscope-2.1.0/dashscope/transport/_response.py +209 -0
  100. dashscope-2.1.0/dashscope/transport/http.py +1190 -0
  101. dashscope-2.1.0/dashscope/transport/sse.py +289 -0
  102. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/transport/ws.py +86 -11
  103. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/transport/ws_connection.py +62 -12
  104. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/types/__init__.py +2 -0
  105. dashscope-2.1.0/dashscope/types/_parse.py +513 -0
  106. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/types/common.py +47 -3
  107. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/types/completions.py +97 -24
  108. dashscope-2.1.0/dashscope/types/pagination.py +225 -0
  109. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/version.py +1 -1
  110. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope.egg-info/PKG-INFO +114 -14
  111. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope.egg-info/SOURCES.txt +64 -144
  112. dashscope-2.1.0/dashscope.egg-info/entry_points.txt +3 -0
  113. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope.egg-info/requires.txt +2 -12
  114. dashscope-2.1.0/examples/01_atomic_capabilities/audio/realtime_live.py +119 -0
  115. {dashscope-2.0.3 → dashscope-2.1.0}/examples/03_agent_recipes/mcp_server_demo/README.md +4 -5
  116. {dashscope-2.0.3 → dashscope-2.1.0}/examples/03_agent_recipes/mcp_server_demo/client_demo.py +1 -1
  117. {dashscope-2.0.3 → dashscope-2.1.0}/examples/03_agent_recipes/mcp_server_demo/server.py +2 -3
  118. {dashscope-2.0.3 → dashscope-2.1.0}/examples/04_real_world_scenarios/README.md +7 -7
  119. {dashscope-2.0.3 → dashscope-2.1.0}/examples/04_real_world_scenarios/README_zh.md +7 -7
  120. dashscope-2.1.0/examples/05_cli/cli_ci_harness.py +777 -0
  121. dashscope-2.1.0/examples/05_cli/cli_output_and_errors.py +607 -0
  122. dashscope-2.1.0/examples/README.md +666 -0
  123. dashscope-2.1.0/examples/README_zh.md +666 -0
  124. {dashscope-2.0.3 → dashscope-2.1.0}/setup.py +7 -12
  125. dashscope-2.1.0/tests/test_agentic_rl_datasets_upload.py +168 -0
  126. dashscope-2.1.0/tests/test_agentic_rl_fc_errors.py +264 -0
  127. dashscope-2.1.0/tests/test_agentic_rl_review_regressions.py +336 -0
  128. dashscope-2.1.0/tests/test_agentic_rl_script.py +107 -0
  129. dashscope-2.1.0/tests/test_agentic_rl_server_hardening.py +460 -0
  130. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_agentstudio_models.py +101 -0
  131. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio.py +7 -4
  132. dashscope-2.1.0/tests/test_audio_live_session.py +1880 -0
  133. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_management.py +143 -0
  134. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_samples_direct_call.py +3 -2
  135. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_tts_http.py +476 -0
  136. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_tts_realtime.py +426 -0
  137. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_ws_integration.py +62 -0
  138. dashscope-2.1.0/tests/test_audio_ws_session.py +814 -0
  139. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_chat.py +24 -0
  140. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_config.py +156 -0
  141. dashscope-2.1.0/tests/test_devkit_diagnosis.py +227 -0
  142. dashscope-2.1.0/tests/test_devkit_mock.py +552 -0
  143. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_errors.py +114 -0
  144. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_files_models.py +95 -0
  145. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_images_videos.py +90 -0
  146. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_jobs.py +67 -1
  147. dashscope-2.1.0/tests/test_layer_decoupling.py +277 -0
  148. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_legacy_import_aliases.py +2 -2
  149. dashscope-2.1.0/tests/test_logging.py +734 -0
  150. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_multimodal.py +200 -0
  151. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_oss_upload.py +30 -2
  152. dashscope-2.1.0/tests/test_pagination.py +471 -0
  153. dashscope-2.1.0/tests/test_parse_model.py +457 -0
  154. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_protocols.py +176 -1
  155. dashscope-2.1.0/tests/test_request_options.py +503 -0
  156. dashscope-2.1.0/tests/test_resource_request_options.py +1029 -0
  157. dashscope-2.1.0/tests/test_response.py +354 -0
  158. dashscope-2.1.0/tests/test_response_drift.py +1192 -0
  159. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_settings.py +39 -0
  160. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_tools_resources.py +119 -0
  161. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_transport.py +158 -1
  162. dashscope-2.1.0/tests/test_user_agent_suffix.py +358 -0
  163. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_ws_connection.py +538 -5
  164. dashscope-2.0.3/dashscope/acli/__init__.py +0 -24
  165. dashscope-2.0.3/dashscope/acli/__main__.py +0 -7
  166. dashscope-2.0.3/dashscope/acli/acceptance.py +0 -355
  167. dashscope-2.0.3/dashscope/acli/agent.py +0 -1931
  168. dashscope-2.0.3/dashscope/acli/agents/__init__.py +0 -2
  169. dashscope-2.0.3/dashscope/acli/agents/delegate.py +0 -379
  170. dashscope-2.0.3/dashscope/acli/agents/subagent.py +0 -317
  171. dashscope-2.0.3/dashscope/acli/agents/subagents.py +0 -357
  172. dashscope-2.0.3/dashscope/acli/audit.py +0 -252
  173. dashscope-2.0.3/dashscope/acli/capabilities/__init__.py +0 -102
  174. dashscope-2.0.3/dashscope/acli/capabilities/local_memory.py +0 -92
  175. dashscope-2.0.3/dashscope/acli/cli/__init__.py +0 -250
  176. dashscope-2.0.3/dashscope/acli/cli/completer.py +0 -316
  177. dashscope-2.0.3/dashscope/acli/cli/constants.py +0 -320
  178. dashscope-2.0.3/dashscope/acli/cli/dispatch.py +0 -560
  179. dashscope-2.0.3/dashscope/acli/cli/examples.py +0 -510
  180. dashscope-2.0.3/dashscope/acli/cli/handlers_capability.py +0 -306
  181. dashscope-2.0.3/dashscope/acli/cli/handlers_config.py +0 -850
  182. dashscope-2.0.3/dashscope/acli/cli/handlers_device.py +0 -432
  183. dashscope-2.0.3/dashscope/acli/cli/handlers_key.py +0 -318
  184. dashscope-2.0.3/dashscope/acli/cli/handlers_misc.py +0 -328
  185. dashscope-2.0.3/dashscope/acli/cli/handlers_profile.py +0 -272
  186. dashscope-2.0.3/dashscope/acli/cli/handlers_provider.py +0 -357
  187. dashscope-2.0.3/dashscope/acli/cli/handlers_session.py +0 -213
  188. dashscope-2.0.3/dashscope/acli/cli/handlers_setup.py +0 -311
  189. dashscope-2.0.3/dashscope/acli/cli/handlers_skill.py +0 -373
  190. dashscope-2.0.3/dashscope/acli/cli/mcp.py +0 -179
  191. dashscope-2.0.3/dashscope/acli/cli/multimodal.py +0 -279
  192. dashscope-2.0.3/dashscope/acli/cli/repl.py +0 -617
  193. dashscope-2.0.3/dashscope/acli/cli/runners.py +0 -567
  194. dashscope-2.0.3/dashscope/acli/cli/startup.py +0 -197
  195. dashscope-2.0.3/dashscope/acli/cli/streaming.py +0 -360
  196. dashscope-2.0.3/dashscope/acli/commands.py +0 -237
  197. dashscope-2.0.3/dashscope/acli/compression.py +0 -364
  198. dashscope-2.0.3/dashscope/acli/config.py +0 -906
  199. dashscope-2.0.3/dashscope/acli/debuglog.py +0 -29
  200. dashscope-2.0.3/dashscope/acli/deliverable.py +0 -171
  201. dashscope-2.0.3/dashscope/acli/dev.py +0 -1294
  202. dashscope-2.0.3/dashscope/acli/eval/__init__.py +0 -248
  203. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -4
  204. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -201
  205. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -101
  206. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -17
  207. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -19
  208. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -15
  209. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -11
  210. dashscope-2.0.3/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -26
  211. dashscope-2.0.3/dashscope/acli/examples/basic-chat/README.md +0 -112
  212. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -5
  213. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -23
  214. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -25
  215. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +0 -161
  216. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -19
  217. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +0 -102
  218. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -15
  219. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -77
  220. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -9
  221. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -166
  222. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -223
  223. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -243
  224. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -20
  225. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -201
  226. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -209
  227. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -9
  228. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +0 -116
  229. dashscope-2.0.3/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -117
  230. dashscope-2.0.3/dashscope/acli/executor.py +0 -674
  231. dashscope-2.0.3/dashscope/acli/extensions.py +0 -1304
  232. dashscope-2.0.3/dashscope/acli/hooks.py +0 -426
  233. dashscope-2.0.3/dashscope/acli/mcp_server.py +0 -169
  234. dashscope-2.0.3/dashscope/acli/mcp_stdio.py +0 -313
  235. dashscope-2.0.3/dashscope/acli/memory/__init__.py +0 -2
  236. dashscope-2.0.3/dashscope/acli/memory/directives_learning.py +0 -268
  237. dashscope-2.0.3/dashscope/acli/memory/experience.py +0 -175
  238. dashscope-2.0.3/dashscope/acli/memory/manager.py +0 -172
  239. dashscope-2.0.3/dashscope/acli/memory/plan.py +0 -111
  240. dashscope-2.0.3/dashscope/acli/memory/reflection.py +0 -839
  241. dashscope-2.0.3/dashscope/acli/memory/skill_evolution.py +0 -250
  242. dashscope-2.0.3/dashscope/acli/memory/tool_chains.py +0 -198
  243. dashscope-2.0.3/dashscope/acli/memory/trace.py +0 -208
  244. dashscope-2.0.3/dashscope/acli/permission.py +0 -141
  245. dashscope-2.0.3/dashscope/acli/platforms/__init__.py +0 -74
  246. dashscope-2.0.3/dashscope/acli/platforms/bailian/__init__.py +0 -15
  247. dashscope-2.0.3/dashscope/acli/platforms/bailian/cli.py +0 -178
  248. dashscope-2.0.3/dashscope/acli/platforms/bailian/mcp.py +0 -303
  249. dashscope-2.0.3/dashscope/acli/platforms/base.py +0 -309
  250. dashscope-2.0.3/dashscope/acli/platforms/local/__init__.py +0 -6
  251. dashscope-2.0.3/dashscope/acli/platforms/local/history.py +0 -319
  252. dashscope-2.0.3/dashscope/acli/platforms/local/memory.py +0 -235
  253. dashscope-2.0.3/dashscope/acli/prompt.py +0 -202
  254. dashscope-2.0.3/dashscope/acli/prompt_pipeline.py +0 -316
  255. dashscope-2.0.3/dashscope/acli/providers/__init__.py +0 -156
  256. dashscope-2.0.3/dashscope/acli/providers/adapter.py +0 -331
  257. dashscope-2.0.3/dashscope/acli/providers/anthropic.py +0 -397
  258. dashscope-2.0.3/dashscope/acli/providers/base.py +0 -49
  259. dashscope-2.0.3/dashscope/acli/providers/hardening.py +0 -302
  260. dashscope-2.0.3/dashscope/acli/providers/openai.py +0 -282
  261. dashscope-2.0.3/dashscope/acli/providers/profile.py +0 -307
  262. dashscope-2.0.3/dashscope/acli/providers/tongyi.py +0 -823
  263. dashscope-2.0.3/dashscope/acli/runtime.py +0 -115
  264. dashscope-2.0.3/dashscope/acli/sandbox.py +0 -181
  265. dashscope-2.0.3/dashscope/acli/scheduler.py +0 -643
  266. dashscope-2.0.3/dashscope/acli/sdk.py +0 -217
  267. dashscope-2.0.3/dashscope/acli/session.py +0 -566
  268. dashscope-2.0.3/dashscope/acli/session_events.py +0 -261
  269. dashscope-2.0.3/dashscope/acli/skills/__init__.py +0 -35
  270. dashscope-2.0.3/dashscope/acli/skills/base.py +0 -271
  271. dashscope-2.0.3/dashscope/acli/skills/manager.py +0 -175
  272. dashscope-2.0.3/dashscope/acli/skills/package.py +0 -253
  273. dashscope-2.0.3/dashscope/acli/skills/store.py +0 -589
  274. dashscope-2.0.3/dashscope/acli/tools/__init__.py +0 -6
  275. dashscope-2.0.3/dashscope/acli/tools/browser.py +0 -494
  276. dashscope-2.0.3/dashscope/acli/tools/camera.py +0 -39
  277. dashscope-2.0.3/dashscope/acli/tools/checkpoint.py +0 -220
  278. dashscope-2.0.3/dashscope/acli/tools/evolution.py +0 -83
  279. dashscope-2.0.3/dashscope/acli/tools/filesystem.py +0 -437
  280. dashscope-2.0.3/dashscope/acli/tools/platform.py +0 -555
  281. dashscope-2.0.3/dashscope/acli/tools/registry.py +0 -497
  282. dashscope-2.0.3/dashscope/acli/tools/session.py +0 -412
  283. dashscope-2.0.3/dashscope/acli/tools/shell.py +0 -950
  284. dashscope-2.0.3/dashscope/acli/tools/skills.py +0 -80
  285. dashscope-2.0.3/dashscope/acli/tools/vision.py +0 -674
  286. dashscope-2.0.3/dashscope/acli/tools/web_search.py +0 -193
  287. dashscope-2.0.3/dashscope/acli/ui/__init__.py +0 -2
  288. dashscope-2.0.3/dashscope/acli/ui/camera.py +0 -208
  289. dashscope-2.0.3/dashscope/acli/ui/embedded.py +0 -131
  290. dashscope-2.0.3/dashscope/acli/ui/tts.py +0 -662
  291. dashscope-2.0.3/dashscope/acli/ui/tui.py +0 -3182
  292. dashscope-2.0.3/dashscope/acli/ui/voice.py +0 -483
  293. dashscope-2.0.3/dashscope/acli/utils/__init__.py +0 -98
  294. dashscope-2.0.3/dashscope/acli/utils/clipboard.py +0 -43
  295. dashscope-2.0.3/dashscope/acli/utils/crypto.py +0 -67
  296. dashscope-2.0.3/dashscope/acli/utils/exceptions.py +0 -19
  297. dashscope-2.0.3/dashscope/acli/utils/ids.py +0 -37
  298. dashscope-2.0.3/dashscope/acli/utils/images.py +0 -31
  299. dashscope-2.0.3/dashscope/acli/utils/keywords.py +0 -52
  300. dashscope-2.0.3/dashscope/acli/utils/messages.py +0 -200
  301. dashscope-2.0.3/dashscope/acli/utils/paths.py +0 -142
  302. dashscope-2.0.3/dashscope/acli/utils/sanitizer.py +0 -104
  303. dashscope-2.0.3/dashscope/acli/utils/spinner.py +0 -108
  304. dashscope-2.0.3/dashscope/acli/utils/template.py +0 -31
  305. dashscope-2.0.3/dashscope/acli/utils/text.py +0 -140
  306. dashscope-2.0.3/dashscope/acli/utils/toml.py +0 -111
  307. dashscope-2.0.3/dashscope/acli/utils/validation.py +0 -116
  308. dashscope-2.0.3/dashscope/resources/_sse.py +0 -78
  309. dashscope-2.0.3/dashscope/resources/audio/customization.py +0 -615
  310. dashscope-2.0.3/dashscope/resources/audio/phrases.py +0 -254
  311. dashscope-2.0.3/dashscope/resources/deployments.py +0 -455
  312. dashscope-2.0.3/dashscope/resources/embeddings.py +0 -429
  313. dashscope-2.0.3/dashscope/resources/files.py +0 -400
  314. dashscope-2.0.3/dashscope/resources/fine_tunes.py +0 -698
  315. dashscope-2.0.3/dashscope/resources/models.py +0 -229
  316. dashscope-2.0.3/dashscope/resources/rerank.py +0 -168
  317. dashscope-2.0.3/dashscope/resources/tokenization.py +0 -142
  318. dashscope-2.0.3/dashscope/transport/__init__.py +0 -11
  319. dashscope-2.0.3/dashscope/transport/http.py +0 -619
  320. dashscope-2.0.3/dashscope/transport/sse.py +0 -156
  321. dashscope-2.0.3/dashscope.egg-info/entry_points.txt +0 -2
  322. dashscope-2.0.3/examples/README.md +0 -159
  323. dashscope-2.0.3/examples/README_zh.md +0 -159
  324. dashscope-2.0.3/tests/test_logging.py +0 -199
  325. {dashscope-2.0.3 → dashscope-2.1.0}/LICENSE +0 -0
  326. {dashscope-2.0.3 → dashscope-2.1.0}/LICENSE.certifi +0 -0
  327. {dashscope-2.0.3 → dashscope-2.1.0}/NOTICE +0 -0
  328. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/__init__.pyi +0 -0
  329. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_error_registry.py +0 -0
  330. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_quickstart.py +0 -0
  331. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_shared/__init__.py +0 -0
  332. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_shared/_errors.py +0 -0
  333. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_shared/_sdk_session.py +0 -0
  334. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/_shared/_validation.py +0 -0
  335. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/__init__.py +0 -0
  336. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/__init__.py +0 -0
  337. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/client.py +0 -0
  338. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/constants.py +0 -0
  339. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/exceptions.py +0 -0
  340. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/pagination.py +0 -0
  341. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/__init__.py +0 -0
  342. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/_helpers.py +0 -0
  343. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/agents.py +0 -0
  344. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/deployments.py +0 -0
  345. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/environments.py +0 -0
  346. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/files.py +0 -0
  347. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/memory_stores.py +0 -0
  348. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/security.py +0 -0
  349. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/session_events.py +0 -0
  350. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/session_resources.py +0 -0
  351. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/session_threads.py +0 -0
  352. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/skills.py +0 -0
  353. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/vaults.py +0 -0
  354. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/webhook_endpoints.py +0 -0
  355. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/streaming.py +0 -0
  356. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/agentstudio/transport.py +0 -0
  357. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/__init__.py +0 -0
  358. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/_submit.py +0 -0
  359. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/__init__.py +0 -0
  360. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/_legacy_errors.py +0 -0
  361. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/errors.py +0 -0
  362. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/log.py +0 -0
  363. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/__init__.py +0 -0
  364. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/__init__.py +0 -0
  365. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/base_data_model.py +0 -0
  366. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/group_reward_input.py +0 -0
  367. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/group_reward_output.py +0 -0
  368. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/reward_input.py +0 -0
  369. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/reward_output.py +0 -0
  370. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/rollout_input.py +0 -0
  371. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/rollout_output.py +0 -0
  372. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/__init__.py +0 -0
  373. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
  374. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
  375. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
  376. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/func_decorator.py +0 -0
  377. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/__init__.py +0 -0
  378. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
  379. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/_core.py +0 -0
  380. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
  381. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
  382. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
  383. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/messages.py +0 -0
  384. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/tools.py +0 -0
  385. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/processor_span.py +0 -0
  386. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/tracing.py +0 -0
  387. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/__init__.py +0 -0
  388. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/base_parser.py +0 -0
  389. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
  390. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/reward_parser.py +0 -0
  391. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
  392. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/__init__.py +0 -0
  393. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
  394. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
  395. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
  396. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/server/__init__.py +0 -0
  397. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/__init__.py +0 -0
  398. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/__init__.py +0 -0
  399. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/client.py +0 -0
  400. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/exceptions.py +0 -0
  401. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/streaming.py +0 -0
  402. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/transport.py +0 -0
  403. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/__init__.py +0 -0
  404. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/chat_completion.py +0 -0
  405. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/code_generation.py +0 -0
  406. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/conversation.py +0 -0
  407. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/generation.py +0 -0
  408. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/image_generation.py +0 -0
  409. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/image_synthesis.py +0 -0
  410. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/multimodal_conversation.py +0 -0
  411. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/video_synthesis.py +0 -0
  412. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/__init__.py +0 -0
  413. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/aio_session.py +0 -0
  414. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/aiohttp_request.py +0 -0
  415. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/api_request_data.py +0 -0
  416. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/api_request_factory.py +0 -0
  417. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/base_request.py +0 -0
  418. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/chat_completion_types.py +0 -0
  419. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/dashscope_response.py +0 -0
  420. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/encryption.py +0 -0
  421. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/http_request.py +0 -0
  422. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/websocket_request.py +0 -0
  423. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/app/__init__.py +0 -0
  424. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/app/application.py +0 -0
  425. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/app/application_response.py +0 -0
  426. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/__init__.py +0 -0
  427. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/assistant_types.py +0 -0
  428. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/assistants.py +0 -0
  429. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/files.py +0 -0
  430. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/__init__.py +0 -0
  431. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/__init__.py +0 -0
  432. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/asr_phrase_manager.py +0 -0
  433. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/recognition.py +0 -0
  434. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/transcription.py +0 -0
  435. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/translation_recognizer.py +0 -0
  436. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/vocabulary.py +0 -0
  437. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/http_tts/__init__.py +0 -0
  438. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/http_tts/http_speech_synthesizer.py +0 -0
  439. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_asr/__init__.py +0 -0
  440. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_asr/qwen_transcription.py +0 -0
  441. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_omni/__init__.py +0 -0
  442. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_omni/omni_realtime.py +0 -0
  443. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts/__init__.py +0 -0
  444. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts/speech_synthesizer.py +0 -0
  445. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts_realtime/__init__.py +0 -0
  446. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
  447. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts/__init__.py +0 -0
  448. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts_v2/__init__.py +0 -0
  449. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts_v2/enrollment.py +0 -0
  450. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts_v2/speech_synthesizer.py +0 -0
  451. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/__main__.py +0 -0
  452. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/agentic_rl.py +0 -0
  453. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/application.py +0 -0
  454. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/auth.py +0 -0
  455. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/code_generation.py +0 -0
  456. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/common.py +0 -0
  457. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/deployments.py +0 -0
  458. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/embeddings.py +0 -0
  459. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/files.py +0 -0
  460. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/fine_tunes.py +0 -0
  461. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/generation.py +0 -0
  462. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/image_generation.py +0 -0
  463. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/image_synthesis.py +0 -0
  464. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/models.py +0 -0
  465. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/multimodal_conversation.py +0 -0
  466. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/multimodal_embedding.py +0 -0
  467. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/oss.py +0 -0
  468. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/rerank.py +0 -0
  469. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/speech_synthesis.py +0 -0
  470. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/tokenization.py +0 -0
  471. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/transcription.py +0 -0
  472. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/understanding.py +0 -0
  473. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/cli/video_synthesis.py +0 -0
  474. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/client/__init__.py +0 -0
  475. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/client/base_api.py +0 -0
  476. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/__init__.py +0 -0
  477. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/_sdk_session.py +0 -0
  478. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/api_key.py +0 -0
  479. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/base_type.py +0 -0
  480. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/constants.py +0 -0
  481. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/env.py +0 -0
  482. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/error.py +0 -0
  483. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/logging.py +0 -0
  484. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/message_manager.py +0 -0
  485. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/common/utils.py +0 -0
  486. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/__init__.py +0 -0
  487. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/batch_text_embedding.py +0 -0
  488. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/batch_text_embedding_response.py +0 -0
  489. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/multimodal_embedding.py +0 -0
  490. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/text_embedding.py +0 -0
  491. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/files.py +0 -0
  492. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/__init__.py +0 -0
  493. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/agentic_rl.py +0 -0
  494. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/customize_types.py +0 -0
  495. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/deployments.py +0 -0
  496. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/finetunes.py +0 -0
  497. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/reinforcement/__init__.py +0 -0
  498. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/reinforcement/common/__init__.py +0 -0
  499. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/reinforcement/common/errors.py +0 -0
  500. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/io/__init__.py +0 -0
  501. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/io/input_output.py +0 -0
  502. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/model.py +0 -0
  503. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/models.py +0 -0
  504. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/__init__.py +0 -0
  505. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/dialog_state.py +0 -0
  506. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/multimodal_constants.py +0 -0
  507. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/multimodal_dialog.py +0 -0
  508. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/multimodal_request_params.py +0 -0
  509. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/tingwu/__init__.py +0 -0
  510. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/tingwu/tingwu.py +0 -0
  511. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/tingwu/tingwu_realtime.py +0 -0
  512. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/nlp/__init__.py +0 -0
  513. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/nlp/understanding.py +0 -0
  514. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/protocol/__init__.py +0 -0
  515. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/protocol/websocket.py +0 -0
  516. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/rerank/__init__.py +0 -0
  517. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/rerank/text_rerank.py +0 -0
  518. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/__init__.py +0 -0
  519. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/messages/__init__.py +0 -0
  520. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/messages/files.py +0 -0
  521. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/messages/messages.py +0 -0
  522. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/runs/__init__.py +0 -0
  523. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/runs/runs.py +0 -0
  524. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/runs/steps.py +0 -0
  525. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/thread_types.py +0 -0
  526. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/threads/threads.py +0 -0
  527. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/__init__.py +0 -0
  528. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/qwen.tiktoken +0 -0
  529. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/qwen_tokenizer.py +0 -0
  530. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/tokenization.py +0 -0
  531. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/tokenizer.py +0 -0
  532. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/tokenizer_base.py +0 -0
  533. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/utils/__init__.py +0 -0
  534. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/utils/message_utils.py +0 -0
  535. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/utils/oss_utils.py +0 -0
  536. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/legacy_1x/utils/param_utils.py +0 -0
  537. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/protocols/__init__.py +0 -0
  538. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/py.typed +0 -0
  539. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/__init__.py +0 -0
  540. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/_blocking.py +0 -0
  541. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/_oss.py +0 -0
  542. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/audio/_callbacks.py +0 -0
  543. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/chat/__init__.py +0 -0
  544. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/chat/_params.py +0 -0
  545. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/resources/multimodal/__init__.py +0 -0
  546. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/transport/_retry.py +0 -0
  547. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope/types/messages.py +0 -0
  548. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope.egg-info/dependency_links.txt +0 -0
  549. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope.egg-info/not-zip-safe +0 -0
  550. {dashscope-2.0.3 → dashscope-2.1.0}/dashscope.egg-info/top_level.txt +0 -0
  551. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/applications/apps.py +0 -0
  552. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/README.md +0 -0
  553. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/_common.py +0 -0
  554. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_file.py +0 -0
  555. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_http_stream.py +0 -0
  556. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_microphone.py +0 -0
  557. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_websocket.py +0 -0
  558. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/connection_reuse.py +0 -0
  559. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/_common.py +0 -0
  560. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_file.py +0 -0
  561. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_http_stream.py +0 -0
  562. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_microphone.py +0 -0
  563. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_websocket.py +0 -0
  564. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/connection_reuse.py +0 -0
  565. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/realtime_omni.py +0 -0
  566. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/realtime_qwen_audio.py +0 -0
  567. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/realtime_translation.py +0 -0
  568. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/tts_http.py +0 -0
  569. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/tts_http_stream.py +0 -0
  570. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/tts_websocket.py +0 -0
  571. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/voice_clone.py +0 -0
  572. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/realtime_omni.py +0 -0
  573. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/realtime_qwen_audio.py +0 -0
  574. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/realtime_translation.py +0 -0
  575. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tingwu.py +0 -0
  576. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tts_http.py +0 -0
  577. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tts_http_stream.py +0 -0
  578. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tts_websocket.py +0 -0
  579. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/voice_clone.py +0 -0
  580. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/decision/decision.py +0 -0
  581. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/embeddings/embeddings.py +0 -0
  582. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/files/files.py +0 -0
  583. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/fine_tuning/fine_tunes.py +0 -0
  584. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/fine_tuning/reinforcement_learning.py +0 -0
  585. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/image_video_synthesis/images.py +0 -0
  586. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/image_video_synthesis/videos.py +0 -0
  587. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/models/models.py +0 -0
  588. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/multimodal_vision/multimodal_chat.py +0 -0
  589. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/rerank/rerank.py +0 -0
  590. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/text_generation/chat.py +0 -0
  591. {dashscope-2.0.3 → dashscope-2.1.0}/examples/01_atomic_capabilities/text_generation/tokenization.py +0 -0
  592. {dashscope-2.0.3 → dashscope-2.1.0}/examples/02_advanced_engineering/circuit_breaker_retry.py +0 -0
  593. {dashscope-2.0.3 → dashscope-2.1.0}/examples/02_advanced_engineering/client_side_cache.py +0 -0
  594. {dashscope-2.0.3 → dashscope-2.1.0}/examples/02_advanced_engineering/local_mock_debugging.py +0 -0
  595. {dashscope-2.0.3 → dashscope-2.1.0}/examples/03_agent_recipes/agentstudio.py +0 -0
  596. {dashscope-2.0.3 → dashscope-2.1.0}/examples/03_agent_recipes/agentstudio_deployments.py +0 -0
  597. {dashscope-2.0.3 → dashscope-2.1.0}/examples/03_agent_recipes/rag_expert_system.py +0 -0
  598. {dashscope-2.0.3 → dashscope-2.1.0}/examples/03_agent_recipes/tool_call_loop.py +0 -0
  599. {dashscope-2.0.3 → dashscope-2.1.0}/examples/04_real_world_scenarios/customer_service_assistant.py +0 -0
  600. {dashscope-2.0.3 → dashscope-2.1.0}/examples/04_real_world_scenarios/production_ready_rag_harness.py +0 -0
  601. {dashscope-2.0.3 → dashscope-2.1.0}/examples/04_real_world_scenarios/realtime_audio_meeting_harness.py +0 -0
  602. {dashscope-2.0.3 → dashscope-2.1.0}/examples/04_real_world_scenarios/ticket_triage_harness.py +0 -0
  603. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/basic.py +0 -0
  604. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/custom_session.py +0 -0
  605. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/deep_research.py +0 -0
  606. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/reasoning.py +0 -0
  607. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/tool_calls.py +0 -0
  608. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_image_synthesis.py +0 -0
  609. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/asr.py +0 -0
  610. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/image.py +0 -0
  611. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/ocr.py +0 -0
  612. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/tool_calls.py +0 -0
  613. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/aio_video_synthesis.py +0 -0
  614. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/application.py +0 -0
  615. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/assistant_api.py +0 -0
  616. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/assistant_api_file.py +0 -0
  617. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/assistant_api_simple.py +0 -0
  618. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/cv_models.py +0 -0
  619. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/generation/basic.py +0 -0
  620. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/generation/custom_session.py +0 -0
  621. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/generation/deep_research.py +0 -0
  622. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/generation/reasoning.py +0 -0
  623. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/generation/tool_calls.py +0 -0
  624. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/image_generation.py +0 -0
  625. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/image_synthesis.py +0 -0
  626. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/asr.py +0 -0
  627. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/image.py +0 -0
  628. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/ocr.py +0 -0
  629. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/reasoning.py +0 -0
  630. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/tool_calls.py +0 -0
  631. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/video.py +0 -0
  632. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/multimodal_embedding.py +0 -0
  633. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/qwen_asr.py +0 -0
  634. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/qwen_tts.py +0 -0
  635. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/set_region_example.py +0 -0
  636. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/text_rerank.py +0 -0
  637. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/tingwu_realtime.py +0 -0
  638. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/tingwu_usages.py +0 -0
  639. {dashscope-2.0.3 → dashscope-2.1.0}/examples/legacy_1x/video_synthesis.py +0 -0
  640. {dashscope-2.0.3 → dashscope-2.1.0}/requirements.txt +0 -0
  641. {dashscope-2.0.3 → dashscope-2.1.0}/setup.cfg +0 -0
  642. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_agentstudio_errors.py +0 -0
  643. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_agentstudio_protocol.py +0 -0
  644. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_agentstudio_shim.py +0 -0
  645. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_apps.py +0 -0
  646. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_connection.py +0 -0
  647. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_omni_session.py +0 -0
  648. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_samples.py +0 -0
  649. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_audio_tts_session.py +0 -0
  650. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_base_url_routing.py +0 -0
  651. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_chat_params.py +0 -0
  652. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_decision.py +0 -0
  653. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_error_registry.py +0 -0
  654. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_finetune_deployments.py +0 -0
  655. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_finetune_rl_shim.py +0 -0
  656. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_http_pool.py +0 -0
  657. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_package_root.py +0 -0
  658. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_rl.py +0 -0
  659. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_sse.py +0 -0
  660. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_sse_comprehensive_verify.py +0 -0
  661. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_tingwu.py +0 -0
  662. {dashscope-2.0.3 → dashscope-2.1.0}/tests/test_types_messages.py +0 -0
@@ -3,6 +3,5 @@ include dashscope/py.typed
3
3
  include dashscope/__init__.pyi
4
4
  include NOTICE
5
5
  include LICENSE.certifi
6
- recursive-include dashscope/acli/examples *.md *.toml *.py
7
6
  recursive-include examples *.md *.py
8
7
  include requirements.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashscope
3
- Version: 2.0.3
3
+ Version: 2.1.0
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -42,10 +42,7 @@ Requires-Dist: fastapi>=0.100
42
42
  Requires-Dist: uvicorn>=0.20
43
43
  Requires-Dist: opentelemetry-sdk>=1.20
44
44
  Provides-Extra: acli
45
- Requires-Dist: prompt-toolkit>=3.0; extra == "acli"
46
- Requires-Dist: textual<9,>=0.50; extra == "acli"
47
- Requires-Dist: PyYAML>=6.0; extra == "acli"
48
- Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli"
45
+ Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "acli"
49
46
  Provides-Extra: acli-anthropic
50
47
  Requires-Dist: anthropic<2,>=0.40; extra == "acli-anthropic"
51
48
  Provides-Extra: acli-openai
@@ -56,10 +53,7 @@ Requires-Dist: numpy>=1.20; extra == "acli-voice"
56
53
  Provides-Extra: acli-camera
57
54
  Requires-Dist: opencv-python-headless>=4.5; extra == "acli-camera"
58
55
  Provides-Extra: acli-all
59
- Requires-Dist: prompt-toolkit>=3.0; extra == "acli-all"
60
- Requires-Dist: textual<9,>=0.50; extra == "acli-all"
61
- Requires-Dist: PyYAML>=6.0; extra == "acli-all"
62
- Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli-all"
56
+ Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "acli-all"
63
57
  Requires-Dist: anthropic<2,>=0.40; extra == "acli-all"
64
58
  Requires-Dist: openai<4,>=1.30; extra == "acli-all"
65
59
  Requires-Dist: sounddevice>=0.4; extra == "acli-all"
@@ -107,7 +101,7 @@ The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio
107
101
  pip install -U dashscope
108
102
  ```
109
103
 
110
- The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups all belong to the bundled AI assistant:
104
+ The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups configure the AI assistant provided by `dashscope-agenticx`; the assistant requires Python 3.10+:
111
105
 
112
106
  | Extra | Provides | Install |
113
107
  |-------|----------|---------|
@@ -264,6 +258,82 @@ resp.request_id
264
258
 
265
259
  All responses share a common envelope: `request_id`, `status_code`, `code`, `message`, `is_error`, and raw `headers`.
266
260
 
261
+ ### Pagination
262
+
263
+ List endpoints return a page object you can iterate and advance instead of looping `page_no` by hand:
264
+
265
+ ```python
266
+ page = client.models.list(page_no=1, page_size=10)
267
+
268
+ for model in page: # this page's items
269
+ ...
270
+ page.total_count # catalog total, as reported by the gateway
271
+ page.has_next_page()
272
+ page.next_page() # None on the last page
273
+
274
+ for page in client.models.list(page_size=50).iter_pages(): # every page
275
+ ...
276
+ ```
277
+
278
+ On `AsyncClient` use `await page.next_page_async()` and `async for page in page.iter_pages_async()`. Calling the synchronous traversal on an async-fetched page raises `TypeError` naming the async method, rather than handing back an un-awaited coroutine. `client.files.list()` and `client.images.jobs.list()` paginate the same way.
279
+
280
+ Serialize a page with `model_dump()`. Iterating a page yields its *items*, so `dict(page)` is not a way to read its fields.
281
+
282
+ `models.list(provider=...)` filters client-side: it narrows each page's `models`, while `total_count` stays the whole-catalog total. Pagination therefore walks the unfiltered catalog and the filter is applied to each page as it arrives.
283
+
284
+ ### Raw responses
285
+
286
+ Pass `raw=True` to get the response object itself, before any error check:
287
+
288
+ ```python
289
+ resp = client.models.list(raw=True)
290
+
291
+ resp.status_code
292
+ resp.headers # includes non-standard gateway headers
293
+ resp.request_id
294
+ resp.elapsed
295
+ resp.json() # decoded body
296
+ resp.parse(ModelList) # typed model, memoized per type
297
+ ```
298
+
299
+ `raw=True` skips the error check, so a 4xx/5xx is returned to you instead of raising. `raise_for_status()` applies it after the fact.
300
+
301
+ `parse(...)` needs the model class, and the v2 resource models are not re-exported from the top-level package — import them from where they are defined:
302
+
303
+ ```python
304
+ from dashscope.resources.models import ModelList, Model
305
+ from dashscope.resources.files import FileList, File
306
+ from dashscope.resources._jobs import Job, JobList
307
+ from dashscope.resources.embeddings import EmbeddingResponse
308
+ ```
309
+
310
+ `resp.parse(...)` is the generic envelope mapping and does not replay a resource's own reshaping — on `models.list`, a page the gateway delivered as a bare list parses through it as empty. Use `resp.json()` when you need exactly what the resource method would have built.
311
+
312
+ ### Per-request options
313
+
314
+ Every resource method that makes an HTTP request takes the same three escape hatches, for anything this SDK does not model yet:
315
+
316
+ ```python
317
+ client.chat.completions.create(
318
+ model="qwen-plus",
319
+ messages=["hi"],
320
+ extra_headers={"x-gateway-experiment": "on"},
321
+ extra_query={"debug": "1"},
322
+ extra_body={"parameters": {"top_k": 5}},
323
+ )
324
+ ```
325
+
326
+ `extra_headers` sits above every other layer — the SDK identity headers, the client defaults, your `headers=`, and a per-call `api_key=` / `workspace=` — matched case-insensitively. `extra_body` deep-merges nested dicts, so adding one nested field keeps its siblings; lists and scalars replace. A request whose body is not a JSON object (a file upload, raw bytes) has nothing to merge into, so `extra_body` is dropped with a warning rather than silently lost.
327
+
328
+ `max_retries` narrows or widens the retry budget for a single call, so a request that must not be replayed no longer needs a whole derived client:
329
+
330
+ ```python
331
+ client.deployments.list(max_retries=0) # one attempt, no retry
332
+ client.with_options(max_retries=5) # still works, client-wide
333
+ ```
334
+
335
+ Streaming methods take all four: `open_stream` retries only while no event has reached you yet, so a mid-stream failure is never replayed. The websocket methods (`audio.asr.recognize` / `recognize_file`, `tingwu.realtime`) take none of them — that transport has no per-request options channel, so a parameter there would be silently inert.
336
+
267
337
  ### Streaming
268
338
 
269
339
  `stream=True` returns a `ChatStream` (`AsyncChatStream` for `AsyncClient`) with typed helpers:
@@ -364,6 +434,7 @@ dashscope.settings.log_level = "INFO"
364
434
  | `DASHSCOPE_WEBSOCKET_BASE_URL` | Override the WebSocket endpoint | derived from region/workspace |
365
435
  | `DASHSCOPE_TIMEOUT` | Request timeout (seconds) | `300` |
366
436
  | `DASHSCOPE_MAX_RETRIES` | Automatic retries | `2` |
437
+ | `DASHSCOPE_STRICT_VALIDATION` | Raise on a response body that does not fit its typed model instead of degrading it | `false` |
367
438
  | `DASHSCOPE_HTTP_MAX_CONNECTIONS` | Connection-pool size | `100` |
368
439
  | `DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS` | Keep-alive connections held in the pool | `20` |
369
440
  | `DASHSCOPE_HTTP_KEEPALIVE_EXPIRY` | Keep-alive expiry (seconds) | `5.0` |
@@ -373,6 +444,10 @@ dashscope.settings.log_level = "INFO"
373
444
 
374
445
  The three `DASHSCOPE_HTTP_*` pool variables are also settable as `http_max_connections`, `http_max_keepalive_connections` and `http_keepalive_expiry` in `settings` and `config.toml`. Passing your own `http_client=` takes precedence over all of them.
375
446
 
447
+ By default a response body that does not fit the SDK's typed models is parsed in degraded form — the offending fields fall back to their defaults and the rest of the payload stays usable — with the drift recorded at `DEBUG` on the `dashscope._logging.parse` logger. Set `DASHSCOPE_STRICT_VALIDATION=true` (or `Client(strict_validation=True)`, `settings.strict_validation = True`, `strict_validation = true` in `config.toml`) to raise `APIResponseValidationError` instead, which is what you want in CI or contract tests. Strict validation raises even under `raise_on_error=False`: that flag governs service errors, this one governs parse errors.
448
+
449
+ One caveat: `DEBUG` is below the SDK's default log level, so a degraded parse is silent unless you raise it — see [Logging](#logging) — and `strict_validation` is the only way to make drift fail loudly. The typed-parse path covers every resource, and not only the final response object: streamed frames (`apps`, `deployments.stream_events`, `fine_tunes.stream_events`, `audio.tts.http.stream`) and websocket results (`audio.asr`) degrade frame by frame as well, so one malformed event cannot break an iteration partway through with a `pydantic.ValidationError` that no `except DashScopeError` would catch.
450
+
376
451
  **Config file** (`~/.dashscope/config.toml`):
377
452
 
378
453
  ```toml
@@ -511,13 +586,33 @@ For the latest model list, visit the [Model Studio model plaza](https://bailian.
511
586
 
512
587
  ## AI Assistant: DashScope SDK Expert
513
588
 
514
- The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`). It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
589
+ The SDK integrates an interactive AI assistant, **DashScope SDK Expert**, powered by the optional `dashscope-agenticx` dependency. It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
515
590
 
516
- - Run `dashscope` with no arguments to start the assistant. On first run it offers to install the knowledge pack (per-domain quick-reference skills: text, multimodal, speech, retrieval, fine-tuning, agent, cli), so guidance comes from the SDK's public interfaces — parameters, outputs, error codes — without reading the source.
591
+ - Run `dashscope` with no arguments to start the assistant. On first run it offers to download the Expert profile and per-domain skills into `./.agenticx/`; the same profile can be installed later with `agenticx expert download dashscope-sdk-expert`.
517
592
  - Ask it instead of reading docs — e.g. `dashscope expert "how do I stream chat output"` (asks once and exits). Type `/help` inside the assistant for available commands; `dashscope expert --help` shows all forms.
518
- - Install with the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
593
+ - With Python 3.10+, install the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
519
594
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
520
595
 
596
+ ## Command line
597
+
598
+ `pip install -U dashscope` puts two independent commands on your `PATH`. `dashscope` serves the SDK-shaped **2.0** command tree; `dashscope1` serves the frozen **1.x** implementation:
599
+
600
+ | Entry point | Implementation | Examples |
601
+ |-------------|----------------|----------|
602
+ | `dashscope` | 2.0, following the SDK resource tree | `chat create`, `apps completions create`, `multimodal chat create`, `rl jobs create`, `rl functions register`, `images jobs create`, `audio asr transcribe`, `agentstudio sessions events send` |
603
+ | `dashscope1` | 1.x, using the 1.x SDK | `generation call`, `application call`, `image-synthesis create`, `multimodal-conversation call`, `fine-tunes call`, `agentic-rl run`, `auth login`, `oss upload` |
604
+
605
+ The two CLI trees do not dispatch to or normalize arguments for each other. Running a 1.x-only command through `dashscope` exits with a usage error and points to `dashscope1`. Their module entry points are likewise independent:
606
+
607
+ ```bash
608
+ python -m dashscope.cli apps completions create ...
609
+ python -m dashscope.legacy_1x.cli generation call ...
610
+ ```
611
+
612
+ Running `dashscope` with no arguments starts the [AI assistant](#ai-assistant-dashscope-sdk-expert) instead of the CLI.
613
+
614
+ For the complete 2.0 CLI command map, output formats, exit codes, configuration precedence and CI recipes, see the CLI section in [`examples/README.md`](examples/README.md).
615
+
521
616
  ## Shell completion
522
617
 
523
618
  Run the command for your shell once, then restart the shell (or re-source your config):
@@ -534,6 +629,8 @@ Preview the script without installing:
534
629
  dashscope --show-completion bash
535
630
  ```
536
631
 
632
+ Completion is installed through the 2.0 `dashscope` entry point.
633
+
537
634
  ## Logging
538
635
 
539
636
  Set the level via settings or the environment:
@@ -556,10 +653,11 @@ examples/
556
653
  ├── 02_advanced_engineering/ Mock debugging, semantic cache, circuit breaker + multi-region DR
557
654
  ├── 03_agent_recipes/ Tool-call loop, RAG, MCP server, AgentStudio
558
655
  ├── 04_real_world_scenarios/ End-to-end production harnesses (RAG, realtime meetings, customer service)
656
+ ├── 05_cli/ Offline CLI output/error and subprocess CI harnesses
559
657
  └── legacy_1x/ 1.x module-level API examples, for reference
560
658
  ```
561
659
 
562
- See [`examples/README.md`](examples/README.md). Several flagship cases run fully offline (mock transports) with no API key.
660
+ See [`examples/README.md`](examples/README.md) for the full guide, including the complete CLI command map and shell/CI recipes. Several flagship cases and both CLI harnesses run fully offline with no API key.
563
661
 
564
662
  ## Migrating from 1.x
565
663
 
@@ -577,6 +675,8 @@ The 1.x module-level API is unchanged and still supported — you can adopt 2.0
577
675
  | `dashscope.set_region(region, workspace_id)` | `dashscope.Client(region=..., workspace=...)` |
578
676
  | OpenAI-compatible via `dashscope.aigc.chat_completion.Completions` | `dashscope.Client(protocol="openai")` |
579
677
 
678
+ The CLI follows the same split — see [Command line](#command-line) above.
679
+
580
680
  ### Package layout and compatibility
581
681
 
582
682
  The 2.0 implementation sits directly under `dashscope`; the former `dashscope.v2` namespace is gone. AgentStudio and FineTune/Agentic RL each have a single business core under `dashscope.applications`, with two thin public facades on top:
@@ -26,7 +26,7 @@ The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio
26
26
  pip install -U dashscope
27
27
  ```
28
28
 
29
- The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups all belong to the bundled AI assistant:
29
+ The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups configure the AI assistant provided by `dashscope-agenticx`; the assistant requires Python 3.10+:
30
30
 
31
31
  | Extra | Provides | Install |
32
32
  |-------|----------|---------|
@@ -183,6 +183,82 @@ resp.request_id
183
183
 
184
184
  All responses share a common envelope: `request_id`, `status_code`, `code`, `message`, `is_error`, and raw `headers`.
185
185
 
186
+ ### Pagination
187
+
188
+ List endpoints return a page object you can iterate and advance instead of looping `page_no` by hand:
189
+
190
+ ```python
191
+ page = client.models.list(page_no=1, page_size=10)
192
+
193
+ for model in page: # this page's items
194
+ ...
195
+ page.total_count # catalog total, as reported by the gateway
196
+ page.has_next_page()
197
+ page.next_page() # None on the last page
198
+
199
+ for page in client.models.list(page_size=50).iter_pages(): # every page
200
+ ...
201
+ ```
202
+
203
+ On `AsyncClient` use `await page.next_page_async()` and `async for page in page.iter_pages_async()`. Calling the synchronous traversal on an async-fetched page raises `TypeError` naming the async method, rather than handing back an un-awaited coroutine. `client.files.list()` and `client.images.jobs.list()` paginate the same way.
204
+
205
+ Serialize a page with `model_dump()`. Iterating a page yields its *items*, so `dict(page)` is not a way to read its fields.
206
+
207
+ `models.list(provider=...)` filters client-side: it narrows each page's `models`, while `total_count` stays the whole-catalog total. Pagination therefore walks the unfiltered catalog and the filter is applied to each page as it arrives.
208
+
209
+ ### Raw responses
210
+
211
+ Pass `raw=True` to get the response object itself, before any error check:
212
+
213
+ ```python
214
+ resp = client.models.list(raw=True)
215
+
216
+ resp.status_code
217
+ resp.headers # includes non-standard gateway headers
218
+ resp.request_id
219
+ resp.elapsed
220
+ resp.json() # decoded body
221
+ resp.parse(ModelList) # typed model, memoized per type
222
+ ```
223
+
224
+ `raw=True` skips the error check, so a 4xx/5xx is returned to you instead of raising. `raise_for_status()` applies it after the fact.
225
+
226
+ `parse(...)` needs the model class, and the v2 resource models are not re-exported from the top-level package — import them from where they are defined:
227
+
228
+ ```python
229
+ from dashscope.resources.models import ModelList, Model
230
+ from dashscope.resources.files import FileList, File
231
+ from dashscope.resources._jobs import Job, JobList
232
+ from dashscope.resources.embeddings import EmbeddingResponse
233
+ ```
234
+
235
+ `resp.parse(...)` is the generic envelope mapping and does not replay a resource's own reshaping — on `models.list`, a page the gateway delivered as a bare list parses through it as empty. Use `resp.json()` when you need exactly what the resource method would have built.
236
+
237
+ ### Per-request options
238
+
239
+ Every resource method that makes an HTTP request takes the same three escape hatches, for anything this SDK does not model yet:
240
+
241
+ ```python
242
+ client.chat.completions.create(
243
+ model="qwen-plus",
244
+ messages=["hi"],
245
+ extra_headers={"x-gateway-experiment": "on"},
246
+ extra_query={"debug": "1"},
247
+ extra_body={"parameters": {"top_k": 5}},
248
+ )
249
+ ```
250
+
251
+ `extra_headers` sits above every other layer — the SDK identity headers, the client defaults, your `headers=`, and a per-call `api_key=` / `workspace=` — matched case-insensitively. `extra_body` deep-merges nested dicts, so adding one nested field keeps its siblings; lists and scalars replace. A request whose body is not a JSON object (a file upload, raw bytes) has nothing to merge into, so `extra_body` is dropped with a warning rather than silently lost.
252
+
253
+ `max_retries` narrows or widens the retry budget for a single call, so a request that must not be replayed no longer needs a whole derived client:
254
+
255
+ ```python
256
+ client.deployments.list(max_retries=0) # one attempt, no retry
257
+ client.with_options(max_retries=5) # still works, client-wide
258
+ ```
259
+
260
+ Streaming methods take all four: `open_stream` retries only while no event has reached you yet, so a mid-stream failure is never replayed. The websocket methods (`audio.asr.recognize` / `recognize_file`, `tingwu.realtime`) take none of them — that transport has no per-request options channel, so a parameter there would be silently inert.
261
+
186
262
  ### Streaming
187
263
 
188
264
  `stream=True` returns a `ChatStream` (`AsyncChatStream` for `AsyncClient`) with typed helpers:
@@ -283,6 +359,7 @@ dashscope.settings.log_level = "INFO"
283
359
  | `DASHSCOPE_WEBSOCKET_BASE_URL` | Override the WebSocket endpoint | derived from region/workspace |
284
360
  | `DASHSCOPE_TIMEOUT` | Request timeout (seconds) | `300` |
285
361
  | `DASHSCOPE_MAX_RETRIES` | Automatic retries | `2` |
362
+ | `DASHSCOPE_STRICT_VALIDATION` | Raise on a response body that does not fit its typed model instead of degrading it | `false` |
286
363
  | `DASHSCOPE_HTTP_MAX_CONNECTIONS` | Connection-pool size | `100` |
287
364
  | `DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS` | Keep-alive connections held in the pool | `20` |
288
365
  | `DASHSCOPE_HTTP_KEEPALIVE_EXPIRY` | Keep-alive expiry (seconds) | `5.0` |
@@ -292,6 +369,10 @@ dashscope.settings.log_level = "INFO"
292
369
 
293
370
  The three `DASHSCOPE_HTTP_*` pool variables are also settable as `http_max_connections`, `http_max_keepalive_connections` and `http_keepalive_expiry` in `settings` and `config.toml`. Passing your own `http_client=` takes precedence over all of them.
294
371
 
372
+ By default a response body that does not fit the SDK's typed models is parsed in degraded form — the offending fields fall back to their defaults and the rest of the payload stays usable — with the drift recorded at `DEBUG` on the `dashscope._logging.parse` logger. Set `DASHSCOPE_STRICT_VALIDATION=true` (or `Client(strict_validation=True)`, `settings.strict_validation = True`, `strict_validation = true` in `config.toml`) to raise `APIResponseValidationError` instead, which is what you want in CI or contract tests. Strict validation raises even under `raise_on_error=False`: that flag governs service errors, this one governs parse errors.
373
+
374
+ One caveat: `DEBUG` is below the SDK's default log level, so a degraded parse is silent unless you raise it — see [Logging](#logging) — and `strict_validation` is the only way to make drift fail loudly. The typed-parse path covers every resource, and not only the final response object: streamed frames (`apps`, `deployments.stream_events`, `fine_tunes.stream_events`, `audio.tts.http.stream`) and websocket results (`audio.asr`) degrade frame by frame as well, so one malformed event cannot break an iteration partway through with a `pydantic.ValidationError` that no `except DashScopeError` would catch.
375
+
295
376
  **Config file** (`~/.dashscope/config.toml`):
296
377
 
297
378
  ```toml
@@ -430,13 +511,33 @@ For the latest model list, visit the [Model Studio model plaza](https://bailian.
430
511
 
431
512
  ## AI Assistant: DashScope SDK Expert
432
513
 
433
- The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`). It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
514
+ The SDK integrates an interactive AI assistant, **DashScope SDK Expert**, powered by the optional `dashscope-agenticx` dependency. It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
434
515
 
435
- - Run `dashscope` with no arguments to start the assistant. On first run it offers to install the knowledge pack (per-domain quick-reference skills: text, multimodal, speech, retrieval, fine-tuning, agent, cli), so guidance comes from the SDK's public interfaces — parameters, outputs, error codes — without reading the source.
516
+ - Run `dashscope` with no arguments to start the assistant. On first run it offers to download the Expert profile and per-domain skills into `./.agenticx/`; the same profile can be installed later with `agenticx expert download dashscope-sdk-expert`.
436
517
  - Ask it instead of reading docs — e.g. `dashscope expert "how do I stream chat output"` (asks once and exits). Type `/help` inside the assistant for available commands; `dashscope expert --help` shows all forms.
437
- - Install with the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
518
+ - With Python 3.10+, install the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
438
519
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
439
520
 
521
+ ## Command line
522
+
523
+ `pip install -U dashscope` puts two independent commands on your `PATH`. `dashscope` serves the SDK-shaped **2.0** command tree; `dashscope1` serves the frozen **1.x** implementation:
524
+
525
+ | Entry point | Implementation | Examples |
526
+ |-------------|----------------|----------|
527
+ | `dashscope` | 2.0, following the SDK resource tree | `chat create`, `apps completions create`, `multimodal chat create`, `rl jobs create`, `rl functions register`, `images jobs create`, `audio asr transcribe`, `agentstudio sessions events send` |
528
+ | `dashscope1` | 1.x, using the 1.x SDK | `generation call`, `application call`, `image-synthesis create`, `multimodal-conversation call`, `fine-tunes call`, `agentic-rl run`, `auth login`, `oss upload` |
529
+
530
+ The two CLI trees do not dispatch to or normalize arguments for each other. Running a 1.x-only command through `dashscope` exits with a usage error and points to `dashscope1`. Their module entry points are likewise independent:
531
+
532
+ ```bash
533
+ python -m dashscope.cli apps completions create ...
534
+ python -m dashscope.legacy_1x.cli generation call ...
535
+ ```
536
+
537
+ Running `dashscope` with no arguments starts the [AI assistant](#ai-assistant-dashscope-sdk-expert) instead of the CLI.
538
+
539
+ For the complete 2.0 CLI command map, output formats, exit codes, configuration precedence and CI recipes, see the CLI section in [`examples/README.md`](examples/README.md).
540
+
440
541
  ## Shell completion
441
542
 
442
543
  Run the command for your shell once, then restart the shell (or re-source your config):
@@ -453,6 +554,8 @@ Preview the script without installing:
453
554
  dashscope --show-completion bash
454
555
  ```
455
556
 
557
+ Completion is installed through the 2.0 `dashscope` entry point.
558
+
456
559
  ## Logging
457
560
 
458
561
  Set the level via settings or the environment:
@@ -475,10 +578,11 @@ examples/
475
578
  ├── 02_advanced_engineering/ Mock debugging, semantic cache, circuit breaker + multi-region DR
476
579
  ├── 03_agent_recipes/ Tool-call loop, RAG, MCP server, AgentStudio
477
580
  ├── 04_real_world_scenarios/ End-to-end production harnesses (RAG, realtime meetings, customer service)
581
+ ├── 05_cli/ Offline CLI output/error and subprocess CI harnesses
478
582
  └── legacy_1x/ 1.x module-level API examples, for reference
479
583
  ```
480
584
 
481
- See [`examples/README.md`](examples/README.md). Several flagship cases run fully offline (mock transports) with no API key.
585
+ See [`examples/README.md`](examples/README.md) for the full guide, including the complete CLI command map and shell/CI recipes. Several flagship cases and both CLI harnesses run fully offline with no API key.
482
586
 
483
587
  ## Migrating from 1.x
484
588
 
@@ -496,6 +600,8 @@ The 1.x module-level API is unchanged and still supported — you can adopt 2.0
496
600
  | `dashscope.set_region(region, workspace_id)` | `dashscope.Client(region=..., workspace=...)` |
497
601
  | OpenAI-compatible via `dashscope.aigc.chat_completion.Completions` | `dashscope.Client(protocol="openai")` |
498
602
 
603
+ The CLI follows the same split — see [Command line](#command-line) above.
604
+
499
605
  ### Package layout and compatibility
500
606
 
501
607
  The 2.0 implementation sits directly under `dashscope`; the former `dashscope.v2` namespace is gone. AgentStudio and FineTune/Agentic RL each have a single business core under `dashscope.applications`, with two thin public facades on top:
@@ -132,6 +132,36 @@ def set_region(region: str, workspace_id: str = None):
132
132
  base_websocket_api_url = f"wss://{host}/api-ws/v1/inference"
133
133
 
134
134
 
135
+ def enable_dev_mock(
136
+ mode: str = "static",
137
+ fixture_path: "str | None" = None,
138
+ ) -> None:
139
+ """Turn on the dev mock process-wide (``static``/``replay``/``record``).
140
+
141
+ Thin forwarder to :mod:`dashscope.devkit`; imported lazily so the
142
+ devkit package is never loaded on the production success path. Once
143
+ enabled, every ``Client``/``AsyncClient`` HTTP call is intercepted at
144
+ the transport. Equivalent to ``DASHSCOPE_DEV_MOCK=<mode>``.
145
+ """
146
+ from dashscope import devkit
147
+
148
+ devkit.enable_dev_mock(mode, fixture_path)
149
+
150
+
151
+ def disable_dev_mock() -> None:
152
+ """Turn the dev mock back off (forwarder to the devkit package)."""
153
+ from dashscope import devkit
154
+
155
+ devkit.disable_dev_mock()
156
+
157
+
158
+ def dev_mock_active() -> bool:
159
+ """Whether the dev mock is currently active."""
160
+ from dashscope import devkit
161
+
162
+ return devkit.is_active()
163
+
164
+
135
165
  # The Assistants API (dashscope.legacy_1x.assistants /
136
166
  # dashscope.legacy_1x.threads) is deprecated.
137
167
  # Resolve its names lazily (PEP 562) so a plain `import dashscope` does not emit
@@ -166,7 +196,6 @@ _LEGACY_LAZY_MODULES = frozenset(
166
196
  "applications",
167
197
  "assistants",
168
198
  "audio",
169
- "cli",
170
199
  "common",
171
200
  "embeddings",
172
201
  "files",
@@ -276,6 +305,9 @@ __all__ = [
276
305
  "WsConnection",
277
306
  "WsTask",
278
307
  "chat",
308
+ "dev_mock_active",
309
+ "disable_dev_mock",
310
+ "enable_dev_mock",
279
311
  "errors",
280
312
  "set_region",
281
313
  ]
@@ -88,6 +88,11 @@ DEFAULT_HTTP_MAX_CONNECTIONS = 100
88
88
  DEFAULT_HTTP_MAX_KEEPALIVE_CONNECTIONS = 20
89
89
  DEFAULT_HTTP_KEEPALIVE_EXPIRY = 5.0
90
90
 
91
+ # Response bodies that do not fit the typed models degrade by default,
92
+ # so a gateway adding or retyping a field cannot take a caller's process
93
+ # down; strict mode opts back into raising for contract testing.
94
+ DEFAULT_STRICT_VALIDATION = False
95
+
91
96
  # Each wire protocol lives at its own URL path under the gateway host.
92
97
  PROTOCOL_DEFAULT_PATHS = {
93
98
  "native": "/api/v1",
@@ -133,6 +138,7 @@ _HTTP_MAX_KEEPALIVE_CONNECTIONS_ENV = (
133
138
  "DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS"
134
139
  )
135
140
  _HTTP_KEEPALIVE_EXPIRY_ENV = "DASHSCOPE_HTTP_KEEPALIVE_EXPIRY"
141
+ _STRICT_VALIDATION_ENV = "DASHSCOPE_STRICT_VALIDATION"
136
142
  _LOG_ENV = "DASHSCOPE_LOG"
137
143
  _CONFIG_PATH_ENV = "DASHSCOPE_CONFIG"
138
144
  _DEFAULT_CONFIG_PATH = "~/.dashscope/config.toml"
@@ -153,6 +159,7 @@ _FILE_KEYS = frozenset(
153
159
  "http_max_connections",
154
160
  "http_max_keepalive_connections",
155
161
  "http_keepalive_expiry",
162
+ "strict_validation",
156
163
  },
157
164
  )
158
165
 
@@ -181,6 +188,38 @@ def _env_int(name: str) -> Optional[int]:
181
188
  ) from None
182
189
 
183
190
 
191
+ # Recognised spellings for a boolean setting. Anything else is rejected
192
+ # rather than coerced: ``"0"`` silently reading as true (the bare
193
+ # truthiness trap) would flip a caller into the wrong mode.
194
+ _TRUTHY = frozenset({"1", "true", "yes", "on", "t", "y"})
195
+ _FALSY = frozenset({"0", "false", "no", "off", "f", "n"})
196
+
197
+
198
+ def _coerce_bool(name: str, raw: Any) -> bool:
199
+ """Interpret one boolean-ish value, shared by env and ``settings``."""
200
+ if isinstance(raw, bool):
201
+ return raw
202
+ if isinstance(raw, int) and raw in (0, 1):
203
+ return bool(raw)
204
+ if isinstance(raw, str):
205
+ normalized = raw.strip().lower()
206
+ if normalized in _TRUTHY:
207
+ return True
208
+ if normalized in _FALSY:
209
+ return False
210
+ raise ValueError(
211
+ f"invalid {name}={raw!r}: expected a boolean "
212
+ "(true/false, 1/0, yes/no, on/off)",
213
+ )
214
+
215
+
216
+ def _env_bool(name: str) -> Optional[bool]:
217
+ raw = os.environ.get(name)
218
+ if raw is None or not raw.strip():
219
+ return None
220
+ return _coerce_bool(name, raw)
221
+
222
+
184
223
  def _legacy_fallback(host: str) -> str:
185
224
  """Return the legacy gateway host, nudging toward a workspace.
186
225
 
@@ -304,6 +343,10 @@ class Config:
304
343
  DEFAULT_HTTP_MAX_KEEPALIVE_CONNECTIONS
305
344
  )
306
345
  http_keepalive_expiry: float = DEFAULT_HTTP_KEEPALIVE_EXPIRY
346
+ # Raise instead of degrading when a response body does not fit its
347
+ # typed model. Off by default so a gateway retyping a field cannot
348
+ # break callers; turn it on in CI to catch contract drift.
349
+ strict_validation: bool = DEFAULT_STRICT_VALIDATION
307
350
 
308
351
 
309
352
  class Settings:
@@ -504,6 +547,23 @@ class Settings:
504
547
  with self._lock:
505
548
  self._explicit["http_keepalive_expiry"] = value
506
549
 
550
+ @property
551
+ def strict_validation(self) -> bool:
552
+ # ``is None``, not truthiness: an explicit ``False`` must win over
553
+ # the environment instead of falling through to it.
554
+ value = self._explicit.get("strict_validation")
555
+ if value is None:
556
+ value = _env_bool(_STRICT_VALIDATION_ENV)
557
+ if value is None:
558
+ return DEFAULT_STRICT_VALIDATION
559
+ return value
560
+
561
+ @strict_validation.setter
562
+ def strict_validation(self, value: Union[bool, int, str]) -> None:
563
+ coerced = _coerce_bool("strict_validation", value)
564
+ with self._lock:
565
+ self._explicit["strict_validation"] = coerced
566
+
507
567
  @property
508
568
  def log_level(self) -> Optional[str]:
509
569
  return self._explicit.get("log_level") or os.environ.get(_LOG_ENV)
@@ -607,6 +667,7 @@ def resolve_config(
607
667
  protocol: Optional[str] = None,
608
668
  timeout: Optional[float] = None,
609
669
  max_retries: Optional[int] = None,
670
+ strict_validation: Optional[bool] = None,
610
671
  config_path: Union[str, Path, None] = None,
611
672
  ) -> Config:
612
673
  path = (
@@ -702,6 +763,19 @@ def resolve_config(
702
763
  f"got {resolved_http_keepalive_expiry}",
703
764
  )
704
765
 
766
+ # _coerce_bool rather than bool(): a config.toml written as
767
+ # strict_validation = "false" would otherwise read as True.
768
+ resolved_strict_validation = _coerce_bool(
769
+ "strict_validation",
770
+ _pick(
771
+ strict_validation,
772
+ settings.get_explicit("strict_validation"),
773
+ _env_bool(_STRICT_VALIDATION_ENV),
774
+ file_cfg.get("strict_validation"),
775
+ DEFAULT_STRICT_VALIDATION,
776
+ ),
777
+ )
778
+
705
779
  resolved_workspace = _pick(
706
780
  workspace,
707
781
  settings.get_explicit("workspace"),
@@ -770,4 +844,5 @@ def resolve_config(
770
844
  http_max_connections=resolved_http_max_connections,
771
845
  http_max_keepalive_connections=resolved_http_max_keepalive,
772
846
  http_keepalive_expiry=resolved_http_keepalive_expiry,
847
+ strict_validation=resolved_strict_validation,
773
848
  )
@@ -41,6 +41,29 @@ _API_KEY_RE = re.compile(r"\bsk-[A-Za-z0-9_-]{16,}\b")
41
41
  REDACTED = "[REDACTED]"
42
42
 
43
43
 
44
+ def request_id_from_headers(
45
+ headers: Optional[Mapping[str, Any]],
46
+ ) -> Optional[str]:
47
+ """Find a gateway request ID without assuming header casing."""
48
+ names = {"x-request-id", "x-dashscope-requestid", "x-dashscope-request-id"}
49
+ for name, value in (headers or {}).items():
50
+ if not isinstance(name, str) or name.lower() not in names:
51
+ continue
52
+ values = value if isinstance(value, (list, tuple)) else (value,)
53
+ for item in values:
54
+ if isinstance(item, str) and item.strip():
55
+ return item
56
+ return None
57
+
58
+
59
+ def request_id_for_log(*request_ids: Any) -> str:
60
+ """Use real ID strings only; never stringify arbitrary response objects."""
61
+ for request_id in request_ids:
62
+ if isinstance(request_id, str) and request_id.strip():
63
+ return request_id
64
+ return "unknown"
65
+
66
+
44
67
  def redact_headers(
45
68
  headers: Optional[Mapping[str, Any]],
46
69
  ) -> Optional[dict]:
@@ -26,7 +26,7 @@ it is the other half of the request identity, and it must agree with
26
26
  (``dashscope/<version>; python/...; platform/...; processor/...``) and is
27
27
  deliberately not shared with the 2.0 transport's own
28
28
  ``dashscope.transport.http.default_user_agent()``
29
- (``dashscope-v2-python/<version>``). Those are two distinct backend
29
+ (``dashscope-sdk-python/<version>``). Those are two distinct backend
30
30
  contracts, not two spellings of one value, so they must not be merged.
31
31
 
32
32
  Only the stdlib is imported at module level; ``dashscope.version`` is