dashscope 1.27.6__tar.gz → 1.27.7__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 (364) hide show
  1. {dashscope-1.27.6 → dashscope-1.27.7}/PKG-INFO +3 -3
  2. {dashscope-1.27.6 → dashscope-1.27.7}/README.md +2 -2
  3. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/__init__.py +1 -1
  4. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/agent.py +79 -11
  5. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/__init__.py +10 -0
  6. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +9 -4
  7. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +15 -4
  8. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +10 -5
  9. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/prompt_pipeline.py +11 -3
  10. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/tongyi.py +89 -10
  11. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/scheduler.py +3 -1
  12. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/skills/base.py +12 -7
  13. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/filesystem.py +33 -9
  14. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/shell.py +82 -14
  15. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/skills.py +4 -1
  16. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/paths.py +47 -8
  17. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/sessions.py +26 -2
  18. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/types/models.py +2 -0
  19. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/types/params.py +59 -10
  20. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/__init__.py +56 -21
  21. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/version.py +1 -1
  22. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope.egg-info/PKG-INFO +3 -3
  23. {dashscope-1.27.6 → dashscope-1.27.7}/LICENSE +0 -0
  24. {dashscope-1.27.6 → dashscope-1.27.7}/LICENSE.certifi +0 -0
  25. {dashscope-1.27.6 → dashscope-1.27.7}/MANIFEST.in +0 -0
  26. {dashscope-1.27.6 → dashscope-1.27.7}/NOTICE +0 -0
  27. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/__init__.py +0 -0
  28. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/__init__.pyi +0 -0
  29. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/__main__.py +0 -0
  30. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/acceptance.py +0 -0
  31. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/agents/__init__.py +0 -0
  32. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/agents/delegate.py +0 -0
  33. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/agents/subagent.py +0 -0
  34. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/agents/subagents.py +0 -0
  35. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/audit.py +0 -0
  36. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/capabilities/__init__.py +0 -0
  37. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/capabilities/local_memory.py +0 -0
  38. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/completer.py +0 -0
  39. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/constants.py +0 -0
  40. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/dispatch.py +0 -0
  41. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/examples.py +0 -0
  42. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_capability.py +0 -0
  43. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_config.py +0 -0
  44. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_device.py +0 -0
  45. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_key.py +0 -0
  46. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_misc.py +0 -0
  47. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_profile.py +0 -0
  48. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_provider.py +0 -0
  49. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_session.py +0 -0
  50. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_setup.py +0 -0
  51. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/handlers_skill.py +0 -0
  52. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/mcp.py +0 -0
  53. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/multimodal.py +0 -0
  54. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/repl.py +0 -0
  55. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/runners.py +0 -0
  56. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/startup.py +0 -0
  57. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/cli/streaming.py +0 -0
  58. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/commands.py +0 -0
  59. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/compression.py +0 -0
  60. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/config.py +0 -0
  61. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/debuglog.py +0 -0
  62. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/deliverable.py +0 -0
  63. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/dev.py +0 -0
  64. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/eval/__init__.py +0 -0
  65. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -0
  66. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -0
  67. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -0
  68. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -0
  69. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -0
  70. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -0
  71. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -0
  72. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -0
  73. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/README.md +0 -0
  74. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -0
  75. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -0
  76. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -0
  77. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -0
  78. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -0
  79. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -0
  80. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -0
  81. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -0
  82. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -0
  83. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -0
  84. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -0
  85. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -0
  86. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -0
  87. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -0
  88. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -0
  89. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/executor.py +0 -0
  90. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/extensions.py +0 -0
  91. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/hooks.py +0 -0
  92. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/mcp_server.py +0 -0
  93. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/mcp_stdio.py +0 -0
  94. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/__init__.py +0 -0
  95. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/directives_learning.py +0 -0
  96. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/experience.py +0 -0
  97. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/manager.py +0 -0
  98. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/plan.py +0 -0
  99. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/reflection.py +0 -0
  100. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/skill_evolution.py +0 -0
  101. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/tool_chains.py +0 -0
  102. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/memory/trace.py +0 -0
  103. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/permission.py +0 -0
  104. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/__init__.py +0 -0
  105. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/__init__.py +0 -0
  106. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/cli.py +0 -0
  107. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/mcp.py +0 -0
  108. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/base.py +0 -0
  109. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/local/__init__.py +0 -0
  110. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/local/history.py +0 -0
  111. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/platforms/local/memory.py +0 -0
  112. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/prompt.py +0 -0
  113. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/__init__.py +0 -0
  114. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/adapter.py +0 -0
  115. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/anthropic.py +0 -0
  116. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/base.py +0 -0
  117. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/hardening.py +0 -0
  118. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/openai.py +0 -0
  119. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/providers/profile.py +0 -0
  120. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/sandbox.py +0 -0
  121. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/sdk.py +0 -0
  122. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/session.py +0 -0
  123. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/session_events.py +0 -0
  124. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/skills/__init__.py +0 -0
  125. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/skills/manager.py +0 -0
  126. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/skills/package.py +0 -0
  127. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/skills/store.py +0 -0
  128. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/__init__.py +0 -0
  129. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/browser.py +0 -0
  130. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/camera.py +0 -0
  131. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/checkpoint.py +0 -0
  132. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/evolution.py +0 -0
  133. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/platform.py +0 -0
  134. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/registry.py +0 -0
  135. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/session.py +0 -0
  136. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/vision.py +0 -0
  137. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/tools/web_search.py +0 -0
  138. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/ui/__init__.py +0 -0
  139. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/ui/camera.py +0 -0
  140. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/ui/embedded.py +0 -0
  141. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/ui/tts.py +0 -0
  142. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/ui/tui.py +0 -0
  143. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/ui/voice.py +0 -0
  144. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/__init__.py +0 -0
  145. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/clipboard.py +0 -0
  146. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/crypto.py +0 -0
  147. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/exceptions.py +0 -0
  148. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/ids.py +0 -0
  149. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/images.py +0 -0
  150. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/keywords.py +0 -0
  151. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/messages.py +0 -0
  152. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/sanitizer.py +0 -0
  153. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/spinner.py +0 -0
  154. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/template.py +0 -0
  155. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/text.py +0 -0
  156. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/toml.py +0 -0
  157. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/acli/utils/validation.py +0 -0
  158. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/__init__.py +0 -0
  159. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/client.py +0 -0
  160. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/constants.py +0 -0
  161. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/exceptions.py +0 -0
  162. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/pagination.py +0 -0
  163. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/__init__.py +0 -0
  164. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/_helpers.py +0 -0
  165. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/agents.py +0 -0
  166. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/deployments.py +0 -0
  167. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/environments.py +0 -0
  168. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/files.py +0 -0
  169. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/security.py +0 -0
  170. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_events.py +0 -0
  171. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_resources.py +0 -0
  172. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_threads.py +0 -0
  173. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/skills.py +0 -0
  174. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/vaults.py +0 -0
  175. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/resources/webhook_endpoints.py +0 -0
  176. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/streaming.py +0 -0
  177. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/transport.py +0 -0
  178. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/agentstudio/types/__init__.py +0 -0
  179. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/__init__.py +0 -0
  180. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/chat_completion.py +0 -0
  181. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/code_generation.py +0 -0
  182. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/conversation.py +0 -0
  183. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/generation.py +0 -0
  184. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/image_generation.py +0 -0
  185. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/image_synthesis.py +0 -0
  186. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/multimodal_conversation.py +0 -0
  187. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/aigc/video_synthesis.py +0 -0
  188. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/__init__.py +0 -0
  189. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/aio_session.py +0 -0
  190. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/aiohttp_request.py +0 -0
  191. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/api_request_data.py +0 -0
  192. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/api_request_factory.py +0 -0
  193. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/base_request.py +0 -0
  194. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/chat_completion_types.py +0 -0
  195. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/dashscope_response.py +0 -0
  196. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/encryption.py +0 -0
  197. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/http_request.py +0 -0
  198. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/api_entities/websocket_request.py +0 -0
  199. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/app/__init__.py +0 -0
  200. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/app/application.py +0 -0
  201. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/app/application_response.py +0 -0
  202. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/assistants/__init__.py +0 -0
  203. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/assistants/assistant_types.py +0 -0
  204. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/assistants/assistants.py +0 -0
  205. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/assistants/files.py +0 -0
  206. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/__init__.py +0 -0
  207. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/asr/__init__.py +0 -0
  208. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/asr/asr_phrase_manager.py +0 -0
  209. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/asr/recognition.py +0 -0
  210. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/asr/transcription.py +0 -0
  211. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/asr/translation_recognizer.py +0 -0
  212. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/asr/vocabulary.py +0 -0
  213. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/http_tts/__init__.py +0 -0
  214. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/http_tts/http_speech_synthesizer.py +0 -0
  215. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_asr/__init__.py +0 -0
  216. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_asr/qwen_transcription.py +0 -0
  217. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_omni/__init__.py +0 -0
  218. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_omni/omni_realtime.py +0 -0
  219. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_tts/__init__.py +0 -0
  220. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_tts/speech_synthesizer.py +0 -0
  221. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_tts_realtime/__init__.py +0 -0
  222. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
  223. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/tts/__init__.py +0 -0
  224. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/tts/speech_synthesizer.py +0 -0
  225. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/tts_v2/__init__.py +0 -0
  226. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/tts_v2/enrollment.py +0 -0
  227. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/audio/tts_v2/speech_synthesizer.py +0 -0
  228. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/__main__.py +0 -0
  229. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/agentic_rl.py +0 -0
  230. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/application.py +0 -0
  231. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/auth.py +0 -0
  232. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/code_generation.py +0 -0
  233. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/common.py +0 -0
  234. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/deployments.py +0 -0
  235. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/embeddings.py +0 -0
  236. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/files.py +0 -0
  237. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/fine_tunes.py +0 -0
  238. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/generation.py +0 -0
  239. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/image_generation.py +0 -0
  240. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/image_synthesis.py +0 -0
  241. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/models.py +0 -0
  242. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/multimodal_conversation.py +0 -0
  243. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/multimodal_embedding.py +0 -0
  244. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/oss.py +0 -0
  245. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/rerank.py +0 -0
  246. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/speech_synthesis.py +0 -0
  247. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/tokenization.py +0 -0
  248. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/transcription.py +0 -0
  249. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/understanding.py +0 -0
  250. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/cli/video_synthesis.py +0 -0
  251. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/client/__init__.py +0 -0
  252. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/client/base_api.py +0 -0
  253. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/__init__.py +0 -0
  254. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/api_key.py +0 -0
  255. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/base_type.py +0 -0
  256. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/constants.py +0 -0
  257. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/env.py +0 -0
  258. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/error.py +0 -0
  259. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/logging.py +0 -0
  260. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/message_manager.py +0 -0
  261. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/common/utils.py +0 -0
  262. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/embeddings/__init__.py +0 -0
  263. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/embeddings/batch_text_embedding.py +0 -0
  264. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/embeddings/batch_text_embedding_response.py +0 -0
  265. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/embeddings/multimodal_embedding.py +0 -0
  266. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/embeddings/text_embedding.py +0 -0
  267. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/files.py +0 -0
  268. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/__init__.py +0 -0
  269. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/agentic_rl.py +0 -0
  270. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/customize_types.py +0 -0
  271. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/deployments.py +0 -0
  272. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/finetunes.py +0 -0
  273. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/__init__.py +0 -0
  274. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/__init__.py +0 -0
  275. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/constants.py +0 -0
  276. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/errors.py +0 -0
  277. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/log.py +0 -0
  278. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/model.py +0 -0
  279. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/model_types.py +0 -0
  280. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/utils.py +0 -0
  281. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/__init__.py +0 -0
  282. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/__init__.py +0 -0
  283. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/base_data_model.py +0 -0
  284. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/group_reward_input.py +0 -0
  285. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/group_reward_output.py +0 -0
  286. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/reward_input.py +0 -0
  287. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/reward_output.py +0 -0
  288. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/rollout_input.py +0 -0
  289. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/rollout_output.py +0 -0
  290. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/__init__.py +0 -0
  291. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
  292. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
  293. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
  294. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/func_decorator.py +0 -0
  295. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/func_manager.py +0 -0
  296. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/__init__.py +0 -0
  297. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
  298. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/_core.py +0 -0
  299. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
  300. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
  301. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
  302. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/messages.py +0 -0
  303. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/tools.py +0 -0
  304. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/processor_span.py +0 -0
  305. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/tracing.py +0 -0
  306. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/__init__.py +0 -0
  307. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/base_parser.py +0 -0
  308. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
  309. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/reward_parser.py +0 -0
  310. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
  311. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/__init__.py +0 -0
  312. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
  313. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
  314. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_reward_processor.py +0 -0
  315. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
  316. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/server/__init__.py +0 -0
  317. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/server/server.py +0 -0
  318. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/io/__init__.py +0 -0
  319. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/io/input_output.py +0 -0
  320. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/model.py +0 -0
  321. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/models.py +0 -0
  322. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/__init__.py +0 -0
  323. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/dialog_state.py +0 -0
  324. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/multimodal_constants.py +0 -0
  325. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/multimodal_dialog.py +0 -0
  326. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/multimodal_request_params.py +0 -0
  327. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/tingwu/__init__.py +0 -0
  328. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/tingwu/tingwu.py +0 -0
  329. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/multimodal/tingwu/tingwu_realtime.py +0 -0
  330. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/nlp/__init__.py +0 -0
  331. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/nlp/understanding.py +0 -0
  332. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/protocol/__init__.py +0 -0
  333. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/protocol/websocket.py +0 -0
  334. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/py.typed +0 -0
  335. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/rerank/__init__.py +0 -0
  336. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/rerank/text_rerank.py +0 -0
  337. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/resources/qwen.tiktoken +0 -0
  338. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/__init__.py +0 -0
  339. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/messages/__init__.py +0 -0
  340. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/messages/files.py +0 -0
  341. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/messages/messages.py +0 -0
  342. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/runs/__init__.py +0 -0
  343. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/runs/runs.py +0 -0
  344. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/runs/steps.py +0 -0
  345. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/thread_types.py +0 -0
  346. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/threads/threads.py +0 -0
  347. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/tokenizers/__init__.py +0 -0
  348. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/tokenizers/qwen_tokenizer.py +0 -0
  349. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/tokenizers/tokenization.py +0 -0
  350. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/tokenizers/tokenizer.py +0 -0
  351. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/tokenizers/tokenizer_base.py +0 -0
  352. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/utils/__init__.py +0 -0
  353. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/utils/message_utils.py +0 -0
  354. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/utils/oss_utils.py +0 -0
  355. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope/utils/param_utils.py +0 -0
  356. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope.egg-info/SOURCES.txt +0 -0
  357. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope.egg-info/dependency_links.txt +0 -0
  358. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope.egg-info/entry_points.txt +0 -0
  359. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope.egg-info/not-zip-safe +0 -0
  360. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope.egg-info/requires.txt +0 -0
  361. {dashscope-1.27.6 → dashscope-1.27.7}/dashscope.egg-info/top_level.txt +0 -0
  362. {dashscope-1.27.6 → dashscope-1.27.7}/requirements.txt +0 -0
  363. {dashscope-1.27.6 → dashscope-1.27.7}/setup.cfg +0 -0
  364. {dashscope-1.27.6 → dashscope-1.27.7}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashscope
3
- Version: 1.27.6
3
+ Version: 1.27.7
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -88,7 +88,7 @@ The DashScope Python SDK provides a comprehensive interface to [Alibaba Cloud Mo
88
88
 
89
89
  ## What is New
90
90
 
91
- **v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly, e.g. `dashscope "how do I stream Generation output"`) to get SDK/API answers, runnable examples, CLI usage, and error diagnosis right in your terminal. Guidance is drawn from per-domain quick-reference skills (text, multimodal, speech, retrieval, fine-tuning, agent, cli) built on the SDK's public interfaces — parameters, outputs, and error codes — so you can ask instead of reading the docs. Type `/help` inside the assistant to view available commands.
91
+ **v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly with `dashscope expert "how do I stream Generation output"`) to get SDK/API answers, runnable examples, CLI usage, and error diagnosis right in your terminal. Guidance is drawn from per-domain quick-reference skills (text, multimodal, speech, retrieval, fine-tuning, agent, cli) built on the SDK's public interfaces — parameters, outputs, and error codes — so you can ask instead of reading the docs. Type `/help` inside the assistant to view available commands.
92
92
 
93
93
  ## Installation
94
94
  To install the DashScope Python SDK, simply run:
@@ -257,7 +257,7 @@ A complete runnable example is available in [`samples/set_region_example.py`](sa
257
257
  The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`) framework. For DashScope SDK/CLI users it is the recommended way to get development consultation and AI coding help — answering SDK/API questions, generating runnable examples, showing CLI usage, and diagnosing errors, right in your terminal.
258
258
 
259
259
  - Run `dashscope` with no arguments to start the assistant. On first run it offers to install the SDK Expert 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
260
- - Ask it instead of reading docs — e.g. `dashscope "how do I stream Generation output"` or `dashscope "CLI command to cancel a fine-tuning job"`. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, and unrecognized commands are routed to the assistant
260
+ - Ask it instead of reading docs — e.g. `dashscope expert "how do I stream Generation output"` or `dashscope expert "CLI command to cancel a fine-tuning job"`, each of which asks once and exits. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, plain `dashscope expert` enters the assistant interactively, and `dashscope expert --help` shows all the forms
261
261
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert)
262
262
 
263
263
  ## Supported Models
@@ -6,7 +6,7 @@ The DashScope Python SDK provides a comprehensive interface to [Alibaba Cloud Mo
6
6
 
7
7
  ## What is New
8
8
 
9
- **v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly, e.g. `dashscope "how do I stream Generation output"`) to get SDK/API answers, runnable examples, CLI usage, and error diagnosis right in your terminal. Guidance is drawn from per-domain quick-reference skills (text, multimodal, speech, retrieval, fine-tuning, agent, cli) built on the SDK's public interfaces — parameters, outputs, and error codes — so you can ask instead of reading the docs. Type `/help` inside the assistant to view available commands.
9
+ **v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly with `dashscope expert "how do I stream Generation output"`) to get SDK/API answers, runnable examples, CLI usage, and error diagnosis right in your terminal. Guidance is drawn from per-domain quick-reference skills (text, multimodal, speech, retrieval, fine-tuning, agent, cli) built on the SDK's public interfaces — parameters, outputs, and error codes — so you can ask instead of reading the docs. Type `/help` inside the assistant to view available commands.
10
10
 
11
11
  ## Installation
12
12
  To install the DashScope Python SDK, simply run:
@@ -175,7 +175,7 @@ A complete runnable example is available in [`samples/set_region_example.py`](sa
175
175
  The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`) framework. For DashScope SDK/CLI users it is the recommended way to get development consultation and AI coding help — answering SDK/API questions, generating runnable examples, showing CLI usage, and diagnosing errors, right in your terminal.
176
176
 
177
177
  - Run `dashscope` with no arguments to start the assistant. On first run it offers to install the SDK Expert 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
178
- - Ask it instead of reading docs — e.g. `dashscope "how do I stream Generation output"` or `dashscope "CLI command to cancel a fine-tuning job"`. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, and unrecognized commands are routed to the assistant
178
+ - Ask it instead of reading docs — e.g. `dashscope expert "how do I stream Generation output"` or `dashscope expert "CLI command to cancel a fine-tuning job"`, each of which asks once and exits. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, plain `dashscope expert` enters the assistant interactively, and `dashscope expert --help` shows all the forms
179
179
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert)
180
180
 
181
181
  ## Supported Models
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
 
4
4
  import uuid
5
5
 
6
- __version__ = "0.6.6"
6
+ __version__ = "0.6.7"
7
7
 
8
8
  # Per-process identifier sent as x-dashscope-sdk-session-id so the
9
9
  # backend can group multi-turn requests from one CLI run.
@@ -42,6 +42,7 @@ from dashscope.acli.utils import (
42
42
  UserSupplement,
43
43
  normalize_for_model,
44
44
  sanitize,
45
+ sanitize_text,
45
46
  text_of,
46
47
  tool_result_for_display,
47
48
  tool_result_for_history,
@@ -66,14 +67,22 @@ def _classify_outcome(successes: int, failures: int) -> str:
66
67
  def _tool_message(tool_call: ToolCall, result: str) -> dict:
67
68
  """Build the history entry answering ``tool_call``.
68
69
 
69
- The restore note must be attached here, at truncation time: later
70
+ Redaction happens here, ahead of truncation. ``save_session`` already ran
71
+ ``sanitize`` over the on-disk copy, so before this a key read out of the
72
+ environment was scrubbed from the session file and still handed to the
73
+ model in full — the persistence path was protecting the wrong reader.
74
+ Scrubbing after truncation would not work either: ``truncate_head_tail``
75
+ cuts on a character budget and can split a token in half, leaving a
76
+ fragment that matches no pattern.
77
+
78
+ The restore note must be attached here for the same reason: later
70
79
  shrinking skips a result that already carries an omission marker, so the
71
80
  largest results would end up with no way to be read back.
72
81
  """
73
82
  return {
74
83
  "role": "tool",
75
84
  "content": tool_result_for_history(
76
- result,
85
+ sanitize_text(result),
77
86
  note=restore_note(tool_call.name, tool_call.arguments),
78
87
  ),
79
88
  "name": tool_call.name,
@@ -154,7 +163,10 @@ Rules:
154
163
  18. **Verify code changes before reporting done.** Run the tests that cover
155
164
  what you touched; if nothing covers it, add a focused test for the new
156
165
  behaviour and run that. Report the command and its pass/fail result —
157
- never claim a change works without having executed it
166
+ never claim a change works without having executed it. When the output
167
+ transforms or joins data (ETL, CSV/JSON, migrations), also assert every
168
+ cross-reference resolves — schema-valid output with dangling IDs still
169
+ fails
158
170
 
159
171
  Reply style:
160
172
  - **Concise**. No filler like "let me see / let me help you / I'll analyze
@@ -245,6 +257,20 @@ class Agent:
245
257
  )
246
258
  except ValueError:
247
259
  self.converge_hard_ratio = 0.85
260
+ # Silence nudge: one reminder per turn after N tool calls have gone by
261
+ # without any prose reaching the user. Mode-independent on purpose —
262
+ # the shape this exists for is an interactive turn of *distinct*
263
+ # run_command calls, which every existing backstop misses:
264
+ # StagnationTracker's read-only classifier counts run_command as
265
+ # mutating and so resets its streak, its repeat counters need
266
+ # byte-identical calls, and _convergence_section is oneshot-only.
267
+ # Env: ACLI_SILENT_TOOL_NUDGE (0 disables).
268
+ try:
269
+ self.silent_tool_nudge = int(
270
+ os.environ.get("ACLI_SILENT_TOOL_NUDGE", "6"),
271
+ )
272
+ except ValueError:
273
+ self.silent_tool_nudge = 6
248
274
  # Hard acceptance gate (oneshot only): run the project's test command
249
275
  # before accepting a final answer, and send the raw output back when
250
276
  # it fails. Built here, ahead of the policy text below, so the prompt
@@ -354,6 +380,10 @@ class Agent:
354
380
  self.turn_subagents = 0
355
381
  self.turn_mcp_calls = 0
356
382
  self.turn_skills = 0
383
+ # Consecutive tool calls that streamed no prose, and whether the
384
+ # silence nudge has already been spent this turn.
385
+ self._silent_tool_calls = 0
386
+ self._silent_nudge_injected = False
357
387
  # Explicit /skill invocations to count on the next turn
358
388
  self._pending_skill_names: list[str] = []
359
389
 
@@ -567,6 +597,33 @@ class Agent:
567
597
  self.converge_hard_ratio,
568
598
  )
569
599
 
600
+ def _silence_section(self) -> str:
601
+ """Inject one reminder when tool calls stop producing prose.
602
+
603
+ Spent at most once per turn. Repeating it every iteration teaches the
604
+ model to skim past it, which is the failure mode prose instructions
605
+ already have — the point of a structural backstop is that it fires on
606
+ a count rather than on the model's willingness to re-read advice.
607
+
608
+ Deliberately not gated on ``oneshot``: the user watching a spinner for
609
+ five minutes with no text is the interactive case, and the oneshot
610
+ runs already have the convergence and read-only-cap sections.
611
+ """
612
+ if self._silent_nudge_injected or not self.silent_tool_nudge:
613
+ return ""
614
+ if self._silent_tool_calls < self.silent_tool_nudge:
615
+ return ""
616
+ self._silent_nudge_injected = True
617
+ return (
618
+ "\n## ⏸ You have gone quiet\n"
619
+ f"{self._silent_tool_calls} tool calls in a row and not one word "
620
+ "of it reached the user.\n"
621
+ "Before the next call, say in one or two sentences what you are "
622
+ "doing and what you have found so far. If the calls were "
623
+ "collecting information to answer a question you can already "
624
+ "answer, answer it instead of calling again.\n"
625
+ )
626
+
570
627
  async def _recall_memory(self, user_input) -> str:
571
628
  """Search for relevant profile info and format as context.
572
629
 
@@ -649,6 +706,8 @@ class Agent:
649
706
  self.turn_tool_calls = 0
650
707
  self.turn_subagents = 0
651
708
  self.turn_mcp_calls = 0
709
+ self._silent_tool_calls = 0
710
+ self._silent_nudge_injected = False
652
711
  try:
653
712
  active = get_skill_manager().active_packages(user_input_text)
654
713
  names = [p.name for p in active] + self._pending_skill_names
@@ -725,26 +784,28 @@ class Agent:
725
784
  f"messages → {len(self.messages)}[/dim]",
726
785
  )
727
786
 
728
- # Reflection / stagnation / convergence hints are volatile, so
729
- # they ride at the tail of the request instead of being folded
730
- # into the system message. Rewriting messages_with_system[0] on
731
- # every iteration changed the whole prompt prefix byte-for-byte and
732
- # defeated provider-side prompt caching, where cached input costs
733
- # roughly a tenth of uncached. The system message and the
734
- # accumulated history below it stay append-only and byte-stable.
787
+ # Reflection / stagnation / convergence / silence hints are
788
+ # volatile, so they ride at the tail of the request instead of
789
+ # being folded into the system message. Rewriting
790
+ # messages_with_system[0] on every iteration changed the whole
791
+ # prompt prefix byte-for-byte and defeated provider-side prompt
792
+ # caching, where cached input costs roughly a tenth of uncached.
793
+ # The system message and the accumulated history below it stay
794
+ # append-only and byte-stable.
735
795
  #
736
796
  # The hint has to be a user message, not a second system message:
737
797
  # the Anthropic converter keeps only the last system message, so a
738
798
  # second one would replace the real prompt outright, and the Tongyi
739
799
  # converter only reads messages[0] as system.
740
800
  #
741
- # All three sections are rebuilt every iteration because tracker
801
+ # All four sections are rebuilt every iteration because tracker
742
802
  # state changes as tools run; each returns "" when its condition
743
803
  # is not met, so an empty hint costs no message at all.
744
804
  hint = (
745
805
  self._reflection_section()
746
806
  + self._stagnation_section()
747
807
  + self._convergence_section(_loop_i)
808
+ + self._silence_section()
748
809
  ).strip()
749
810
  request_messages = (
750
811
  [*messages_with_system, {"role": "user", "content": hint}]
@@ -901,6 +962,13 @@ class Agent:
901
962
  tool_calls = [tc for tc in tool_calls if tc.name]
902
963
 
903
964
  self.turn_tool_calls += len(tool_calls)
965
+ # Silence is per-iteration, not cumulative over the turn: an
966
+ # iteration that streamed prose did talk to the user, so the run
967
+ # of unheard calls starts over from the next one.
968
+ if full_content.strip():
969
+ self._silent_tool_calls = 0
970
+ else:
971
+ self._silent_tool_calls += len(tool_calls)
904
972
  for tc in tool_calls:
905
973
  if tc.name in ("delegate", "subagent_invoke"):
906
974
  self.turn_subagents += 1
@@ -219,6 +219,16 @@ def main():
219
219
 
220
220
  _mcp_server_main()
221
221
  return
222
+ else:
223
+ # Only a bare `acli` and the explicit -c/--command one-shot enter
224
+ # the agent — the same contract the dashscope CLI enforces. An
225
+ # unrecognized token used to fall through and start a chat, which
226
+ # discarded the whole command line: `acli auth whoami` opened the
227
+ # agent instead of reporting that no such command exists. Exit 2
228
+ # matches the usage-error code typer/click use for the same case.
229
+ print(f"Error: No such command '{arg}'.")
230
+ print("Try 'acli --help' for help.")
231
+ sys.exit(2)
222
232
  config = Config.load()
223
233
  _apply_cli_overrides(config, protocol_override, max_turns_override)
224
234
 
@@ -67,16 +67,21 @@ with client.sessions.events.stream(session.id) as stream:
67
67
  | Error code/exception | HTTP status | Meaning | Handling |
68
68
  | --- | --- | --- | --- |
69
69
  | `InputRequired` / `ModelRequired` / `InvalidInput` | raised locally | missing required params such as app_id/prompt/model | add params per the exception message; Application failures do not raise — check status_code |
70
- | `invalid_request_error` (InvalidRequestError) | 400 | invalid agentstudio request parameters | check parameter names/types, e.g. empty events raises a local ValueError |
70
+ | `invalid_request_error` / `request_too_large` (InvalidRequestError) | 400/413 | invalid agentstudio request parameters, or payload too large | check parameter names/types, e.g. empty events raises a local ValueError |
71
71
  | `authentication_error` (AuthenticationError) | 401 | api_key missing or invalid | check api_key or DASHSCOPE_API_KEY |
72
- | `permission_denied_error` (PermissionDeniedError) | 403 | no access to the resource | check workspace/uid and resource ownership |
72
+ | `permission_denied_error` / `permission_error` (PermissionDeniedError) | 403 | no access to the resource | check workspace/uid and resource ownership |
73
73
  | `not_found_error` (NotFoundError) | 404 | agent/session and other resources do not exist | verify the id and region/workspace are correct |
74
74
  | `conflict_error` (ConflictError) | 409 | version in agents.update does not match the server | retrieve the latest version first, then update |
75
- | `rate_limit_error` (RateLimitError) | 429 | rate limited | retry with backoff (client default max_retries=2) |
76
- | `api_error` (InternalServerError) / `overloaded_error` (OverloadedError) | 500/502/504 / 503 | server error/overloaded | troubleshoot with `request_id` or retry |
75
+ | `rate_limit_error` / `billing_error` (RateLimitError) | 429 | rate limited or out of quota | retry with backoff (client default max_retries=2) |
76
+ | `api_error` / `timeout_error` (InternalServerError), `overloaded_error` (OverloadedError) | 500/502/504 / 503 | server error/overloaded | troubleshoot with `request_id` or retry |
77
77
  | `APITimeoutError` / `APIConnectionError` | no response | connection/read/write timeout | increase timeout, check network, then retry |
78
78
  | `StreamError` / `StreamClosedError` | mid-stream | SSE protocol error/stream closed | call `events.stream` again to reopen the stream |
79
79
 
80
+ Match on the exception class, not on `.code`: `.code` echoes the server's raw
81
+ string, so a 403 may arrive as either `permission_denied_error` or
82
+ `permission_error`, and it is normalised to `api_error` when the server omits
83
+ it. The class is always the one listed above.
84
+
80
85
  ## Java SDK
81
86
 
82
87
  Java SDK v2.22.23 entry points:
@@ -11,6 +11,7 @@ This file is authoritative for answering `dashscope` CLI usage questions (based
11
11
 
12
12
  | Command group | Subcommands | Purpose | Corresponding SDK class |
13
13
  | --- | --- | --- | --- |
14
+ | auth | whoami/login/logout | Verify the active API key and persist one to ~/.dashscope/api_key | dashscope.common.api_key (get_default_api_key/save_api_key) |
14
15
  | generation | create | Text generation (including streaming and multi-turn messages) | dashscope.Generation |
15
16
  | ft (hidden alias fine-tunes) | create/get/list/stream/cancel/delete | Fine-tuning job management | dashscope.FineTunes |
16
17
  | files | upload/get/list/delete | Training file upload and management | dashscope.Files |
@@ -34,9 +35,12 @@ Note: code-generation and understanding still exist in the source but are deprec
34
35
 
35
36
  ## Common usage
36
37
 
37
- Prerequisite: `export DASHSCOPE_API_KEY=sk-xxx` (or pass the global `-k/--api-key`).
38
+ Prerequisite: `export DASHSCOPE_API_KEY=sk-xxx` (or pass the global `-k/--api-key`, or persist one with `dashscope auth login`).
38
39
 
39
40
  ```bash
41
+ dashscope auth whoami # verify the active key against the API and show its source
42
+ dashscope auth login --key sk-xxx # save a key to ~/.dashscope/api_key
43
+ dashscope auth logout # remove the saved key file
40
44
  dashscope generation create -m qwen-plus -p "Hello" -s --temperature 0.7
41
45
  dashscope ft create -m qwen-turbo -t file-xxx -v file-yyy -e 2 -b 16 -l 1e-5
42
46
  dashscope files upload -f train.jsonl -p fine-tune -d "training set"
@@ -59,6 +63,9 @@ dashscope rl run -c rl_config.yaml -o json -v
59
63
  ```
60
64
 
61
65
  Key option notes:
66
+ - auth whoami: takes no options; validates the resolved key with a lightweight `dashscope.Models.list(page=1, page_size=1)` call and prints `Authenticated key=sk-xxx...yyyy source=...`. The key is always masked (first 6 + last 4), never printed in full. `source` reports where it came from: `environment / --api-key flag`, `file (<path>)`, or `unknown`. Exit codes: 0 = present and accepted, 1 = no key configured, 2 = configured but rejected (401/403) or an unexpected response.
67
+ - auth login: `-k/--key` saves to `~/.dashscope/api_key`. Omitted, it prompts interactively with hidden input — that prompt blocks forever in a non-TTY (piped stdin, or a shell tool driven by an agent), so pass `--key` explicitly there. An empty/whitespace key exits 1. Note that `--key sk-xxx` lands in shell history and the process arg list; prefer the interactive prompt when a human is at a terminal.
68
+ - auth logout: takes no options; removes `~/.dashscope/api_key` if present, otherwise prints "nothing to remove" and exits 0. It does not unset `DASHSCOPE_API_KEY`, so a key exported in the environment still authenticates afterwards.
62
69
  - generation create: `-p/--prompt`, `--messages` (JSON string), `-s/--stream`, `--temperature/--top-p/--top-k/--max-tokens/--seed/--stop/--repetition-penalty/--presence-penalty/--enable-search/--n/--result-format`
63
70
  - ft create: `-t/--training-file-ids` (repeatable), `-v/--validation-file-ids`, `--mode`, `-e/--n-epochs`, `-b/--batch-size`, `-l/--learning-rate`, `-p/--prompt-loss`; get/stream/cancel/delete all take job_id as a positional argument; list uses `-p/--page`, `-s/--size`
64
71
  - files: upload `-f/--file`, `-p/--purpose` (default fine-tune), `-d/--description`; all commands support `-u/--base-url`
@@ -75,13 +82,17 @@ Key option notes:
75
82
  - `-k/--api-key`: global API Key; can be placed before or after the command group name. The oss and rl/agentic-rl groups have their own local `--api-key` (with envvar DASHSCOPE_API_KEY), which is parsed locally once the command name appears.
76
83
  - `-h` is automatically converted to `--help`; use `dashscope --help` or `dashscope <group> --help` for the authoritative option list.
77
84
  - Legacy syntax compatibility: `dashscope fine_tunes.call` -> `fine-tunes create`, `generation.call` -> `generation create`, etc.; underscore options like `--training_file_ids` and `--api_key` are automatically mapped to hyphenated forms.
78
- - Bare `dashscope` (no subcommand; a change in this repo): enters the built-in agent "DashScope SDK Expert" interactive mode, TUI by default; `--cli` switches to a plain REPL, `--tui` forces TUI; requires `pip install dashscope[acli]`. When stdin is not a TTY, piped text is treated as a one-shot question. Unrecognized commands do not error; the whole line is forwarded to the agent as a question. On the first interactive run, if there is no ./.acli, it asks whether to download the dashscope-sdk-expert example configuration.
85
+ - Bare `dashscope` (no arguments; a change in this repo): enters the built-in agent "DashScope SDK Expert" interactive mode, TUI by default; `--cli` switches to a plain REPL, `--tui` forces TUI; requires `pip install dashscope[acli]`. When stdin is not a TTY, piped text is treated as a one-shot question. On the first interactive run, if there is no ./.acli, it asks whether to download the dashscope-sdk-expert example configuration.
86
+ - Entering the agent explicitly: `dashscope expert` (interactive), `dashscope expert --cli|--tui`, `dashscope expert --help` (prints usage), `dashscope expert "question"` (one-shot). The `expert` keyword is the only way to pass a question on the command line.
87
+ - Anything else that is not a known command group is a **typer error, not a question**: `dashscope generaton create` reports `No such command`, and so does a quoted question like `dashscope "how do I stream Generation output"`, so a typo surfaces instead of silently opening a chat. Only `-k/--api-key`, `--cli` and `--tui` may precede the command; group-level options must follow it (`dashscope generation create -w wsid`, not `dashscope -w wsid generation create`).
79
88
 
80
89
  ## Common errors and troubleshooting
81
90
 
82
- - `Error: ... AuthenticationError` (exit code 1): no Key configured; set DASHSCOPE_API_KEY or add `-k`.
91
+ - `Error: ... AuthenticationError` (exit code 1): no Key configured; set DASHSCOPE_API_KEY, add `-k`, or persist one with `dashscope auth login`. Diagnose with `dashscope auth whoami` — it reports both validity and which source the key came from.
92
+ - `dashscope auth whoami` opens the SDK Expert agent instead of printing key info: `auth` was missing from the CLI's top-level routing table, so the line was treated as an unknown command and forwarded to the agent as a question. Fixed in this repo; if a user hits it, they are on an older install and should upgrade rather than keep retrying.
83
93
  - `Option '--api-key' requires an argument.` (exit code 2): `-k/--api-key` is missing a value or the value starts with `-`.
84
94
  - `--messages must be a valid JSON string`: generation's --messages must be a JSON array string; watch shell quoting/escaping.
85
95
  - `File ... does not exist`: local paths (-f, --image, --audio, etc.) are validated locally first; `~` expansion is supported; URLs must include a scheme.
86
96
  - `Failed request_id: ..., status_code: ..., code: ..., message: ...` (exit code 1): rejected by the server; troubleshoot by code (InvalidParameter usually means a wrong model name or parameter value); HTTP 200 with a non-empty business code is also treated as a failure.
87
- - Bare dashscope shows `Install dashscope[acli] to enable the agent`: install `dashscope[acli]`; if it reports `Interactive mode requires a terminal.`, use `dashscope "your question"` for a one-shot question instead.
97
+ - Bare dashscope shows `Install dashscope[acli] to enable the agent`: install `dashscope[acli]`; if it reports `Interactive mode requires a terminal.`, use `dashscope expert "your question"` for a one-shot question instead.
98
+ - `No such command 'how do I ...'`: a question was passed without the `expert` keyword. `dashscope "question"` is no longer a short form — tell the user to write `dashscope expert "question"`.
@@ -3,7 +3,10 @@ You are DashScope SDK Expert, an intelligent assistant for the DashScope Python
3
3
  Your knowledge base:
4
4
  - Python SDK: https://github.com/dashscope/dashscope-sdk-python
5
5
  - Java SDK: https://github.com/dashscope/dashscope-sdk-java
6
- - Alibaba Cloud Model Studio (Bailian) Product Overview: https://help.aliyun.com/zh/model-studio/what-is-model-studio
6
+ - Alibaba Cloud Model Studio (Bailian) Product Overview: https://docs.modelstudio.console.alibabacloud.com/zh/model-studio/what-is-model-studio
7
+ - Get and Configure an API Key: https://docs.modelstudio.console.alibabacloud.com/zh/model-studio/get-api-key
8
+ - Get the App ID and Workspace ID: https://docs.modelstudio.console.alibabacloud.com/zh/model-studio/obtain-the-app-id-and-workspace-id
9
+ - Build a Knowledge-Base Q&A Application with No Code: https://docs.modelstudio.console.alibabacloud.com/zh/model-studio/build-knowledge-base-qa-assistant-without-coding
7
10
  - Model Studio User Guide: https://help.aliyun.com/zh/model-studio/get-started-with-models
8
11
  - Application User Guide: https://help.aliyun.com/zh/model-studio/start-using
9
12
  - Model API Reference: https://help.aliyun.com/zh/model-studio/preparations
@@ -32,6 +35,7 @@ Match your approach to the question type:
32
35
  - **Issue / bug analysis**: Analyze directly from the user's description first. Only inspect SDK source when you need to verify a specific behavior. Go straight to the root cause.
33
36
  - **API questions** (signature, parameters, usage): Load the matching skill under `.acli/skills/` (covers Python and Java interfaces). If the user mentions a specific SDK version, verify the signatures against the installed package.
34
37
  - **Example generation**: Cross-check against the installed version, then write runnable code.
38
+ - **Questions about you** (what model you are, what you can do, what a skill or slash command means): Answer from this prompt, with **zero tool calls**. Your model name is on the `Current model:` line, your domains and skill list are above, and your capabilities are in this section. Nothing about yourself is discoverable by running a command — probing the environment to answer "what can you do" only makes the user wait for an answer you already had.
35
39
 
36
40
  ### Version Check
37
41
 
@@ -61,10 +65,11 @@ When verification is needed, use `run_command` to inspect the installed `dashsco
61
65
 
62
66
  ### Workflow
63
67
 
64
- 1. Identify the question type (issue analysis / API question / example).
65
- 2. If issue analysis — answer directly, only verify if something is unclear.
66
- 3. If API question — run one targeted `inspect.signature` or `help()` call.
67
- 4. Compose a concise, actionable answer.
68
+ 1. Identify the question type (question about you / issue analysis / API question / example).
69
+ 2. If it is about you — answer straight from this prompt and stop. No tool call.
70
+ 3. If issue analysis — answer directly, only verify if something is unclear.
71
+ 4. If API question — run one targeted `inspect.signature` or `help()` call.
72
+ 5. Compose a concise, actionable answer.
68
73
 
69
74
  ### SDK Reference
70
75
 
@@ -200,7 +200,17 @@ class EnvironmentSection:
200
200
  name = "environment"
201
201
 
202
202
  def render(self, ctx: PromptContext) -> str:
203
- env_info: list[str] = []
203
+ import platform
204
+
205
+ from dashscope.acli.tools.shell import shell_label
206
+
207
+ # The platform is stated because run_command's syntax depends on it and
208
+ # a wrong guess costs a whole turn: on Windows the model wrote
209
+ # `2>/dev/null || find /` and got back a PowerShell ParserError.
210
+ env_info: list[str] = [
211
+ f"Current OS: {platform.system()} {platform.machine()}",
212
+ f"run_command executes via: {shell_label()}",
213
+ ]
204
214
  if ctx.user_name:
205
215
  env_info.append(f"Current user: {ctx.user_name}")
206
216
  if ctx.provider_name or ctx.model_name:
@@ -210,8 +220,6 @@ class EnvironmentSection:
210
220
  "mentioned in history or summaries may be outdated — "
211
221
  "always defer to this line for model questions)",
212
222
  )
213
- if not env_info:
214
- return ""
215
223
  env_info.append(
216
224
  "Rule: when mentioning this CLI's commands, only cite real "
217
225
  "commands that definitely exist; when unsure, point the user "
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import json
6
6
  import os
7
- from typing import AsyncIterator
7
+ from typing import AsyncIterator, ClassVar
8
8
 
9
9
  import httpx
10
10
 
@@ -15,14 +15,21 @@ from dashscope.acli.providers.base import LLMChunk, LLMResponse, ToolCall
15
15
  # the DashScope native route (NOT the OpenAI-compatible one) so requests
16
16
  # land in the native SLS logstore.
17
17
  DASHSCOPE_BASE_URL = "https://dashscope.aliyuncs.com"
18
- # The gateway binds each model to exactly one aigc service path (newer
19
- # models like qwen3.8-max live on multimodal-generation, classic text
20
- # models on text-generation). The provider tries them in order and
21
- # remembers the one that answers 200 — see _is_url_error.
18
+ # The gateway binds each model to exactly one aigc service path and answers
19
+ # the other with a 400 "url error" (see _is_url_error), so probing an
20
+ # unlearned model always costs one failed request — one that lands in the
21
+ # prod gateway log as InvalidParameter. multimodal-generation is probed
22
+ # first because acli's default model (qwen3.8-max) and the vl/omni family
23
+ # live there; classic text models are the minority and learn their binding
24
+ # on the first call.
22
25
  _GENERATION_PATHS = (
23
- "/api/v1/services/aigc/text-generation/generation",
24
26
  "/api/v1/services/aigc/multimodal-generation/generation",
27
+ "/api/v1/services/aigc/text-generation/generation",
25
28
  )
29
+ # Learned model → path bindings, shared across processes so a fresh CLI
30
+ # start does not re-probe. Global rather than per-workspace: the binding is
31
+ # a property of the gateway, and bench/CI runs execute in a throwaway cwd.
32
+ _PATH_CACHE_NAME = "generation-paths.json"
26
33
  # Historical/standard prefixes a persisted config may carry; the provider
27
34
  # normalizes them back to the service root.
28
35
  _LEGACY_PREFIXES = ("/compatible-mode/v1", "/api/v1")
@@ -59,6 +66,45 @@ def _is_url_error_message(message: str) -> bool:
59
66
  return "url error" in (message or "")
60
67
 
61
68
 
69
+ def _load_path_cache() -> dict[str, str]:
70
+ """Read the model → generation-path bindings learned by earlier runs.
71
+
72
+ Entries that are unreadable or name an unknown path are dropped rather
73
+ than repaired: a dropped binding costs one probe, which the fallback
74
+ already survives.
75
+ """
76
+ from dashscope.acli.config import CONFIG_DIR
77
+
78
+ try:
79
+ raw = json.loads(
80
+ (CONFIG_DIR / _PATH_CACHE_NAME).read_text(encoding="utf-8"),
81
+ )
82
+ except (OSError, ValueError):
83
+ return {}
84
+ if not isinstance(raw, dict):
85
+ return {}
86
+ return {
87
+ str(model): str(path)
88
+ for model, path in raw.items()
89
+ if str(path) in _GENERATION_PATHS
90
+ }
91
+
92
+
93
+ def _save_path_cache(paths: dict[str, str]) -> None:
94
+ """Persist learned bindings. An unwritable home must not fail a call."""
95
+ from dashscope.acli.config import CONFIG_DIR
96
+ from dashscope.acli.utils.paths import atomic_write_text
97
+
98
+ try:
99
+ CONFIG_DIR.mkdir(parents=True, exist_ok=True)
100
+ atomic_write_text(
101
+ CONFIG_DIR / _PATH_CACHE_NAME,
102
+ json.dumps(paths, indent=2, sort_keys=True),
103
+ )
104
+ except OSError:
105
+ pass
106
+
107
+
62
108
  def _to_native_content(content):
63
109
  """Convert OpenAI message content parts to the native shape.
64
110
 
@@ -185,6 +231,30 @@ def _native_chunk_to_openai(chunk) -> dict:
185
231
 
186
232
 
187
233
  class TongyiProvider:
234
+ # model → generation path, shared by every instance in this process and
235
+ # mirrored to disk by _remember_path. A provider is constructed per
236
+ # session start, per model switch and per vision call, so without this
237
+ # each of those re-probes and re-logs the same 400.
238
+ _path_cache: ClassVar[dict[str, str] | None] = None
239
+
240
+ @classmethod
241
+ def _learned_paths(cls) -> dict[str, str]:
242
+ # Bound to a local so the Optional class attribute narrows to a dict
243
+ # for both the caller and the type checker.
244
+ cache = cls._path_cache
245
+ if cache is None:
246
+ cache = _load_path_cache()
247
+ cls._path_cache = cache
248
+ return cache
249
+
250
+ @classmethod
251
+ def _remember_path(cls, model: str, path: str) -> None:
252
+ learned = cls._learned_paths()
253
+ if learned.get(model) == path:
254
+ return
255
+ learned[model] = path
256
+ _save_path_cache(learned)
257
+
188
258
  def __init__(
189
259
  self,
190
260
  model: str = "qwen3.8-max",
@@ -205,7 +275,16 @@ class TongyiProvider:
205
275
  break
206
276
  self.base_url = base
207
277
  self.module = module
208
- self._generation_path = _GENERATION_PATHS[0]
278
+ self._generation_path = self._learned_paths().get(
279
+ model,
280
+ _GENERATION_PATHS[0],
281
+ )
282
+
283
+ def _commit_path(self, path: str) -> None:
284
+ """Record the path that answered 200, for this instance and every
285
+ later one."""
286
+ self._generation_path = path
287
+ self._remember_path(self.model, path)
209
288
 
210
289
  def _candidate_paths(self) -> list[str]:
211
290
  others = [p for p in _GENERATION_PATHS if p != self._generation_path]
@@ -348,7 +427,7 @@ class TongyiProvider:
348
427
  headers=headers,
349
428
  )
350
429
  if response.status_code == 200:
351
- self._generation_path = path
430
+ self._commit_path(path)
352
431
  break
353
432
  if i + 1 < len(paths) and _is_url_error(
354
433
  response.status_code,
@@ -487,7 +566,7 @@ class TongyiProvider:
487
566
  try:
488
567
  first = await stream.__anext__()
489
568
  except StopAsyncIteration:
490
- self._generation_path = path
569
+ self._commit_path(path)
491
570
  return
492
571
  except _StreamAPIError as e:
493
572
  if i + 1 < len(paths) and _is_url_error_message(
@@ -495,7 +574,7 @@ class TongyiProvider:
495
574
  ):
496
575
  continue
497
576
  raise
498
- self._generation_path = path
577
+ self._commit_path(path)
499
578
  yield first
500
579
  async for chunk in stream:
501
580
  yield chunk
@@ -591,7 +591,9 @@ class Scheduler:
591
591
  continue
592
592
 
593
593
  rendered = render_skill(skill, inv.args)
594
- if not rendered:
594
+ # `is None`, not falsy: None is the missing-arguments signal, so
595
+ # arg_hint is never empty here.
596
+ if rendered is None:
595
597
  arg_hint = " ".join(f"<{a}>" for a in skill.arguments)
596
598
  results.append(
597
599
  f"missing args: /skill {inv.name} {arg_hint}",
@@ -200,13 +200,18 @@ def render_skill(skill: Skill, args: list[str]) -> str | None:
200
200
  don't match."""
201
201
  if len(args) < len(skill.arguments):
202
202
  return None
203
- kwargs = {}
203
+ template = skill.prompt_template
204
+ # A skill body is Markdown, not a format string: it is full of literal
205
+ # braces from the JSON and Python it documents. Running str.format() over
206
+ # the whole body raised KeyError on `{"role": ...}`, which the old
207
+ # `except KeyError` turned into a bogus "missing args" report for every
208
+ # no-argument skill that showed a payload, and let the IndexError from
209
+ # `{}` escape entirely. Substitute only the declared arguments and leave
210
+ # every other brace exactly as the author wrote it.
204
211
  for i, arg_name in enumerate(skill.arguments):
205
212
  if i == len(skill.arguments) - 1:
206
- kwargs[arg_name] = " ".join(args[i:])
213
+ value = " ".join(args[i:])
207
214
  else:
208
- kwargs[arg_name] = args[i]
209
- try:
210
- return skill.prompt_template.format(**kwargs)
211
- except KeyError:
212
- return None
215
+ value = args[i]
216
+ template = template.replace("{" + arg_name + "}", value)
217
+ return template