@qwen-code/qwen-code 0.23.2-preview.0 → 0.23.3-nightly.20260910.c46cb85cf2

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 (409) hide show
  1. package/README.md +35 -15
  2. package/bundled/computer-use/SKILL.md +1 -1
  3. package/bundled/goal-draft/SKILL.md +2 -2
  4. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  5. package/bundled/qc-helper/docs/configuration/model-providers.md +76 -34
  6. package/bundled/qc-helper/docs/configuration/settings.md +5 -3
  7. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  8. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -21
  9. package/bundled/qc-helper/docs/features/channels/dws.md +7 -1
  10. package/bundled/qc-helper/docs/features/channels/github.md +1 -9
  11. package/bundled/qc-helper/docs/features/channels/overview.md +30 -56
  12. package/bundled/qc-helper/docs/features/channels/qqbot.md +1 -2
  13. package/bundled/qc-helper/docs/features/commands.md +105 -18
  14. package/bundled/qc-helper/docs/features/computer-use.md +1 -1
  15. package/bundled/qc-helper/docs/features/cross-session-protocol.md +320 -0
  16. package/bundled/qc-helper/docs/features/goals.md +5 -3
  17. package/bundled/qc-helper/docs/features/hooks.md +14 -13
  18. package/bundled/qc-helper/docs/features/sub-agents.md +8 -0
  19. package/bundled/qc-helper/docs/qwen-serve.md +84 -53
  20. package/bundled/review/SKILL.md +82 -79
  21. package/bundled/review/references/posting.md +31 -14
  22. package/chunks/{MaxSizedBox-ZZJT3PJF.js → MaxSizedBox-UZW24XUX.js} +63 -55
  23. package/chunks/{StandaloneSessionPicker-DIOSZTMX.js → StandaloneSessionPicker-IDK7NAZL.js} +85 -77
  24. package/chunks/{acp-startup-profiler-KEU6VAYR.js → acp-startup-profiler-ARO4II44.js} +2 -2
  25. package/chunks/acp-subagent-executor-7TLJGISS.js +919 -0
  26. package/chunks/{acpAgent-62JUP5A7.js → acpAgent-YRCNNIIU.js} +939 -306
  27. package/chunks/{agent-NLPEQQDZ.js → agent-SGU5EE7U.js} +47 -41
  28. package/chunks/{agent-headless-Y2GR5F2Q.js → agent-headless-JVYBLNLT.js} +47 -41
  29. package/chunks/{anthropicContentGenerator-I7LQZH26.js → anthropicContentGenerator-SGIR5IKF.js} +68 -36
  30. package/chunks/{artifact-tool-P52OKKEF.js → artifact-tool-PMYZCYNH.js} +2 -2
  31. package/chunks/{askUserQuestion-I5W5S3D6.js → askUserQuestion-4M4YYIB4.js} +2 -2
  32. package/chunks/{bridge-Q66BD62H.js → bridge-YF6NYRPZ.js} +68 -60
  33. package/chunks/{ca-KC2AISNS.js → ca-MX3WCEEG.js} +1 -1
  34. package/chunks/{channel-management-service-TRTLQTSV.js → channel-management-service-E4HTMU7T.js} +9 -9
  35. package/chunks/{channel-settings-store-R5STFWUW.js → channel-settings-store-FZ5VKHQD.js} +74 -66
  36. package/chunks/{channel-worker-group-PIYPVCTF.js → channel-worker-group-X6WH4XWF.js} +9 -9
  37. package/chunks/{channel-worker-manager-FQHEDTD2.js → channel-worker-manager-SICFJDPJ.js} +19 -10
  38. package/chunks/{channel-worker-supervisor-XJPZZ3VK.js → channel-worker-supervisor-HSFAKML6.js} +6 -6
  39. package/chunks/{chunk-CLKE4IY3.js → chunk-2SZH22YO.js} +1 -1
  40. package/chunks/{chunk-OIPUQE3S.js → chunk-34ZYDM3F.js} +27 -12
  41. package/chunks/{chunk-HIXUUCGY.js → chunk-36HCNKDS.js} +1 -1
  42. package/chunks/{chunk-6YEOCHSE.js → chunk-3FPYT6QC.js} +101 -31
  43. package/chunks/{chunk-NFIDVZND.js → chunk-3I7W2POO.js} +3 -22
  44. package/chunks/{chunk-W3ONSAYO.js → chunk-3VPFA6L2.js} +3 -3
  45. package/chunks/chunk-532WHF4F.js +127 -0
  46. package/chunks/{chunk-J3TJH52D.js → chunk-5FFAUU4T.js} +1 -1
  47. package/chunks/{chunk-G5QLLD53.js → chunk-5FKZ7KFQ.js} +1864 -35
  48. package/chunks/{chunk-B44JBZBB.js → chunk-5GLDOLNQ.js} +132 -27
  49. package/chunks/{chunk-ORREXWOM.js → chunk-5ZJ3KK5J.js} +5 -5
  50. package/chunks/{chunk-2OR32P5M.js → chunk-6EDWSKN4.js} +125 -10
  51. package/chunks/{chunk-EA4NFWVG.js → chunk-6EOMQPTS.js} +4 -4
  52. package/chunks/{chunk-45ROPFQY.js → chunk-6NONRGYX.js} +1 -1
  53. package/chunks/{chunk-EHTKOO6W.js → chunk-6UK77U7D.js} +46 -3
  54. package/chunks/{chunk-QXXBW2G4.js → chunk-72BGC7RT.js} +4 -4
  55. package/chunks/{chunk-CRZBDVP2.js → chunk-74JEYK2C.js} +10 -10
  56. package/chunks/{chunk-B54PFQS5.js → chunk-7CLLH5TI.js} +1 -1
  57. package/chunks/{chunk-CG2PDIGD.js → chunk-7XM6KEVW.js} +1 -1
  58. package/chunks/{chunk-CALNF3Z3.js → chunk-7XVQNDFB.js} +1 -1
  59. package/chunks/{chunk-TK4XHPKW.js → chunk-7ZKDPTYO.js} +2 -2
  60. package/chunks/{chunk-ZIPYCXQP.js → chunk-7ZVIGDZF.js} +1 -1
  61. package/chunks/chunk-AEY27Z35.js +1411 -0
  62. package/chunks/{chunk-WIRYFL2L.js → chunk-ATH66AEU.js} +64 -59
  63. package/chunks/{chunk-33MLFMCL.js → chunk-AW2SIT3B.js} +3 -3
  64. package/chunks/{chunk-4BLTSTF6.js → chunk-AWMJRE5N.js} +4 -4
  65. package/chunks/chunk-AYEJOTIU.js +43 -0
  66. package/chunks/{chunk-M73KHGNR.js → chunk-B2TGBZXY.js} +420 -227
  67. package/chunks/{chunk-XDNFODER.js → chunk-B6BDT4RX.js} +1 -1
  68. package/chunks/{chunk-WZ4YULVF.js → chunk-BHR6IN2X.js} +3251 -974
  69. package/chunks/{chunk-GXIHBIHC.js → chunk-BI3WSRQE.js} +61 -72
  70. package/chunks/{chunk-NVS4Z6GT.js → chunk-BQOP3K76.js} +1 -1
  71. package/chunks/{chunk-R2266LQ5.js → chunk-BTWGOKHU.js} +2 -2
  72. package/chunks/{process-registry-OAEG6WGC.js → chunk-BYUAT5OC.js} +1 -0
  73. package/chunks/{chunk-XVTCSVBK.js → chunk-C4NLHK7X.js} +227 -298
  74. package/chunks/{chunk-NOO4QFXM.js → chunk-C75BXMPM.js} +1 -3
  75. package/chunks/chunk-CAAMI77K.js +937 -0
  76. package/chunks/chunk-CF5KXZZX.js +150 -0
  77. package/chunks/{chunk-SOA4HKRJ.js → chunk-CGKEUUYG.js} +2 -2
  78. package/chunks/{chunk-BF3RUIVP.js → chunk-CH2YDT6X.js} +36 -38
  79. package/chunks/{chunk-5HBA2Z7V.js → chunk-CJ3DHN5I.js} +3 -3
  80. package/chunks/{chunk-3BTHHXXE.js → chunk-CSHX5ZC4.js} +1 -1
  81. package/chunks/{chunk-UYDQYDW2.js → chunk-CUK6F5UF.js} +1 -1
  82. package/chunks/{chunk-RPFJJ33Z.js → chunk-DLH7YIX6.js} +3 -3
  83. package/chunks/{chunk-L6ZME3W7.js → chunk-DMX7RF6E.js} +1 -1
  84. package/chunks/{chunk-TRWQQBVH.js → chunk-DTNV6UZY.js} +1 -1
  85. package/chunks/{chunk-FDOGGKAA.js → chunk-E4UEO3XM.js} +5 -2
  86. package/chunks/{chunk-RN6V5HKE.js → chunk-E5GQNSJY.js} +3 -3
  87. package/chunks/chunk-ELRMZTPF.js +374 -0
  88. package/chunks/chunk-ERU3SDXT.js +27 -0
  89. package/chunks/{chunk-O2FEO2CB.js → chunk-EUURTIV6.js} +18 -2
  90. package/chunks/{chunk-4HOEU2OR.js → chunk-EWJTAP3Y.js} +1 -19
  91. package/chunks/{chunk-ZELCTN6Y.js → chunk-F23YN37B.js} +10 -0
  92. package/chunks/{chunk-BL6B2QS2.js → chunk-F2RKL5I2.js} +809 -1195
  93. package/chunks/{chunk-J4ECGDA3.js → chunk-F45SKYIQ.js} +3 -3
  94. package/chunks/{chunk-5WC2ECUK.js → chunk-FCQJLMA2.js} +114 -8
  95. package/chunks/{chunk-4JKLPTV6.js → chunk-FGRDUDCI.js} +13 -6
  96. package/chunks/{chunk-ZUNWKOAP.js → chunk-FGV2QEAO.js} +5 -27
  97. package/chunks/{chunk-4VY3ITHR.js → chunk-FN3JNDRU.js} +3 -3
  98. package/chunks/{chunk-XI7RST4D.js → chunk-FRVV5SSD.js} +2 -2
  99. package/chunks/{chunk-UXDVUFKU.js → chunk-FYZ5NZ3V.js} +2 -20
  100. package/chunks/{chunk-ALMR3E6Q.js → chunk-GDWE23OR.js} +3 -3
  101. package/chunks/{chunk-W7PXLIZJ.js → chunk-GP47UR3M.js} +6 -6
  102. package/chunks/{chunk-LNYV4GXX.js → chunk-GSKX53AN.js} +0 -139
  103. package/chunks/{chunk-MA5OUNN6.js → chunk-HG46TTAG.js} +1 -1
  104. package/chunks/{chunk-FETY36NQ.js → chunk-HGEUHUEV.js} +1 -1
  105. package/chunks/{chunk-UULHYZ4W.js → chunk-HL2DQG3Y.js} +148 -23
  106. package/chunks/{chunk-E6TI726I.js → chunk-HUXPEUFL.js} +1 -1
  107. package/chunks/{chunk-5DQ4YTIZ.js → chunk-HZTXKVSV.js} +1 -1
  108. package/chunks/{chunk-LYT2OU7D.js → chunk-IAEXTMED.js} +1 -1
  109. package/chunks/{chunk-CPJRFFPH.js → chunk-IFHJIEMN.js} +576 -169
  110. package/chunks/{chunk-IW6RQPQB.js → chunk-IJOS26LH.js} +1 -3
  111. package/chunks/{chunk-ORFIYTI2.js → chunk-IK2MWJP5.js} +1 -1
  112. package/chunks/{chunk-MWEF5MUK.js → chunk-IOUBOANU.js} +42 -13
  113. package/chunks/{chunk-KA5HR3G2.js → chunk-IUVIBDKU.js} +2 -2
  114. package/chunks/{chunk-PQWM4SX2.js → chunk-J2RNOJRV.js} +2 -2
  115. package/chunks/{chunk-VHPG7BH6.js → chunk-J5PYQVD2.js} +2 -2
  116. package/chunks/{chunk-JDPBJIKI.js → chunk-JDEW3V5B.js} +1 -1
  117. package/chunks/{chunk-RX3FYFCN.js → chunk-JEMDIKGQ.js} +7 -7
  118. package/chunks/chunk-JL6APGBX.js +43 -0
  119. package/chunks/{chunk-UHUT4IDM.js → chunk-JOMCZWX7.js} +9 -15
  120. package/chunks/{chunk-43CI6YWJ.js → chunk-JV5YASQA.js} +2777 -2151
  121. package/chunks/{chunk-N6S3NUYJ.js → chunk-JXNIF2O5.js} +1 -1
  122. package/chunks/chunk-K2OJUPOE.js +78 -0
  123. package/chunks/{chunk-QLM7D7W3.js → chunk-KFGPNCCY.js} +8 -8
  124. package/chunks/{chunk-7RXOEUFF.js → chunk-KHIBLKNK.js} +1 -1
  125. package/chunks/{chunk-5GD7LYOH.js → chunk-KVBNJ4K2.js} +5 -5
  126. package/chunks/{chunk-QJAFSFYA.js → chunk-KZ2CU2LH.js} +1 -1
  127. package/chunks/{chunk-DCPRCDSR.js → chunk-L2KF7HUE.js} +6 -6
  128. package/chunks/{chunk-4ALNJDHL.js → chunk-L3DTX6U4.js} +3 -1
  129. package/chunks/{chunk-3SH53ANB.js → chunk-LAP7X6EC.js} +12 -0
  130. package/chunks/{chunk-GM44O6F7.js → chunk-LEGNDA46.js} +1 -1
  131. package/chunks/{chunk-WXFCI3O5.js → chunk-LG5Y4OWO.js} +2 -2
  132. package/chunks/{chunk-3LPJ776W.js → chunk-LILGKQ4B.js} +10 -7
  133. package/chunks/{chunk-LBKYQ33T.js → chunk-LIR7YS2O.js} +18 -12
  134. package/chunks/{chunk-5Z4FCEPY.js → chunk-LK2WUCDQ.js} +625 -119
  135. package/chunks/{chunk-W673V2H3.js → chunk-LY2GK2PR.js} +4 -4
  136. package/chunks/{chunk-PQSCGZT2.js → chunk-MOS5OAOG.js} +36 -10
  137. package/chunks/chunk-MXOALJIL.js +691 -0
  138. package/chunks/chunk-NFXXBWSE.js +463 -0
  139. package/chunks/chunk-NUQ4GK5I.js +315 -0
  140. package/chunks/{chunk-J3VZF2AL.js → chunk-NUQVB25K.js} +2 -2
  141. package/chunks/{chunk-GNY7B3CA.js → chunk-NVIBH7WS.js} +1 -1
  142. package/chunks/{chunk-M6YLOETP.js → chunk-O3MKRN2I.js} +4 -4
  143. package/chunks/{chunk-ISPBBKJN.js → chunk-ONGZNOIP.js} +7 -2
  144. package/chunks/{chunk-Q2F43WTJ.js → chunk-OOLSYRZ7.js} +36 -19
  145. package/chunks/{chunk-63ACHB2H.js → chunk-PIGUW2U2.js} +197 -28
  146. package/chunks/{chunk-QAZ2MGYT.js → chunk-PLLIWEM3.js} +2 -2
  147. package/chunks/{chunk-ULY4ISY2.js → chunk-PMS4FVLY.js} +23 -8
  148. package/chunks/{chunk-NB3NDQQK.js → chunk-Q2XLNLAV.js} +1 -1
  149. package/chunks/{chunk-6GRDHIVI.js → chunk-Q6HXLBZF.js} +12 -12
  150. package/chunks/{chunk-EUXF6URV.js → chunk-QPWZX4ZV.js} +32 -34
  151. package/chunks/{chunk-DTB5BXRG.js → chunk-RJZTX2OF.js} +30 -17
  152. package/chunks/{chunk-PQEISIKS.js → chunk-SAH4BD2J.js} +0 -67
  153. package/chunks/{chunk-LUVXLLMS.js → chunk-SAWPURIU.js} +2 -2
  154. package/chunks/{chunk-WZS3X663.js → chunk-SNZWDV67.js} +43 -18
  155. package/chunks/{chunk-IRKQ4YYX.js → chunk-SVWWF5TZ.js} +29 -1
  156. package/chunks/{chunk-5VZFJTL2.js → chunk-SXEE6PND.js} +2 -2
  157. package/chunks/{chunk-743XE7N7.js → chunk-T4JVQR7Z.js} +2 -2
  158. package/chunks/{chunk-6RZX2HIH.js → chunk-TBEXLLAO.js} +2 -2
  159. package/chunks/{chunk-LN3WBOKU.js → chunk-TP2DUOB6.js} +8 -8
  160. package/chunks/{chunk-MWIO7MF6.js → chunk-TP6FYVQT.js} +2 -0
  161. package/chunks/{chunk-HRPFBHW7.js → chunk-TPKQIA7G.js} +1 -0
  162. package/chunks/{chunk-VH764G6B.js → chunk-TWC3FHUI.js} +4 -4
  163. package/chunks/{chunk-H3Q3RSKZ.js → chunk-U7O65WKL.js} +1 -1
  164. package/chunks/{chunk-IUJLW6ZI.js → chunk-UBEYS536.js} +7 -7
  165. package/chunks/{chunk-VEQBVJYH.js → chunk-UGS62IR2.js} +3 -3
  166. package/chunks/{chunk-VF6D6EGV.js → chunk-UKMWZ5NS.js} +109 -842
  167. package/chunks/{chunk-7GZCCHJL.js → chunk-VHKOULAI.js} +6 -5
  168. package/chunks/{chunk-ODBNTMZW.js → chunk-VID4BW52.js} +97 -86
  169. package/chunks/{chunk-7L35FKPF.js → chunk-VLZOU6UH.js} +7 -7
  170. package/chunks/{chunk-XBLG564H.js → chunk-VTBPMLRO.js} +12 -12
  171. package/chunks/{chunk-QTNCGZHQ.js → chunk-VX63RJXE.js} +9 -0
  172. package/chunks/{chunk-7VEYUF3N.js → chunk-W5ZQMAEM.js} +1 -1
  173. package/chunks/{chunk-XQ4RDO5B.js → chunk-WBCPROWX.js} +1 -1
  174. package/chunks/{chunk-RDV4NLI3.js → chunk-WS7MOFK6.js} +3 -3
  175. package/chunks/{chunk-FV4DM2M4.js → chunk-WXFK4MH7.js} +32 -12
  176. package/chunks/{chunk-XAXTQURR.js → chunk-WY4N6KS7.js} +4 -4
  177. package/chunks/{chunk-CABDNUJ4.js → chunk-XDQUDARC.js} +11 -14
  178. package/chunks/{chunk-YHDGABDC.js → chunk-XKBFYTCD.js} +1 -1
  179. package/chunks/{chunk-2EKVPSIJ.js → chunk-Y2MYW47X.js} +1 -1
  180. package/chunks/{chunk-Y6ZWXM44.js → chunk-YIU5PEAT.js} +2 -2
  181. package/chunks/{chunk-PSPAM24S.js → chunk-YKK2XXHF.js} +4 -0
  182. package/chunks/{chunk-HZ2HUXX7.js → chunk-YS2ZJSOA.js} +29 -12
  183. package/chunks/{chunk-OFVAS4AR.js → chunk-ZGQIIGNQ.js} +2 -2
  184. package/chunks/{chunk-HNLMYDQE.js → chunk-ZHECLGA6.js} +2 -4
  185. package/chunks/{chunk-XBVNNDPK.js → chunk-ZHKTKHMO.js} +8 -1
  186. package/chunks/{chunk-OWCFKIFQ.js → chunk-ZKYR7QS4.js} +1 -1
  187. package/chunks/{chunk-YZTGGCEE.js → chunk-ZKZHSB5W.js} +1 -1
  188. package/chunks/{chunk-ERXNTINK.js → chunk-ZT6EPPBY.js} +1 -1
  189. package/chunks/{chunk-565U2ANU.js → chunk-ZTTC7T4X.js} +1 -1
  190. package/chunks/{chunk-MMMA36MN.js → chunk-ZUQVZTWG.js} +3 -3
  191. package/chunks/{chunk-7OCIQNKX.js → chunk-ZW2EUO2A.js} +1 -1
  192. package/chunks/{config-utils-37FHWPTP.js → config-utils-S5LFS4RN.js} +67 -59
  193. package/chunks/{contextCommand-R4JUBV5N.js → contextCommand-XXKZMMSQ.js} +64 -56
  194. package/chunks/{core-runtime-6U4OXU5C.js → core-runtime-YGUA42AZ.js} +68 -59
  195. package/chunks/{create-sub-session-LLUYAGZN.js → create-sub-session-SEK6KCYR.js} +64 -56
  196. package/chunks/{create-sub-session-TGIX63YU.js → create-sub-session-TIGCFGCS.js} +2 -2
  197. package/chunks/{cron-create-GTPVMJCF.js → cron-create-AKWX67FO.js} +1 -1
  198. package/chunks/{cron-delete-ZBK27Z4K.js → cron-delete-XPB6IYZJ.js} +1 -1
  199. package/chunks/{cron-list-KTFKFDKC.js → cron-list-XBKO4WU5.js} +1 -1
  200. package/chunks/{daemon-UI6SQSBV.js → daemon-G5TYKZD6.js} +2 -2
  201. package/chunks/{daemon-git-worktree-guard-O2UTNFJC.js → daemon-git-worktree-guard-3AWINPPX.js} +65 -57
  202. package/chunks/{daemon-status-provider-7GMAKSTX.js → daemon-status-provider-RTKHKUFJ.js} +73 -65
  203. package/chunks/{daemon-trust-policy-VNP76VMO.js → daemon-trust-policy-6YQOC7B6.js} +69 -61
  204. package/chunks/{daemon-trust-policy-monitor-TD5O3BZA.js → daemon-trust-policy-monitor-EN5L23GS.js} +69 -61
  205. package/chunks/{de-UU2YTO37.js → de-OOLZAU2U.js} +1 -1
  206. package/chunks/{deferred-core-runtime-NJM63YJS.js → deferred-core-runtime-JPLQRVZO.js} +62 -54
  207. package/chunks/{display-image-CTNHJRZC.js → display-image-NAH3AZ63.js} +3 -3
  208. package/chunks/{dist-STAGIFNB.js → dist-3BJVSJ7D.js} +389 -724
  209. package/chunks/{dist-OR2ZQTXZ.js → dist-65Q3TRLH.js} +16 -36
  210. package/chunks/{dist-24TCWK5H.js → dist-HX2LG76F.js} +233 -35
  211. package/chunks/{dist-XJ25G6OH.js → dist-J7PDFK53.js} +13 -38
  212. package/chunks/{dist-WZTUKIDR.js → dist-JCXKXRH6.js} +3 -6
  213. package/chunks/{dist-M4CBX53H.js → dist-LHGMHIDK.js} +2 -6
  214. package/chunks/{dist-5I4HLUTO.js → dist-QPTIRE3U.js} +4 -13
  215. package/chunks/{dist-FDISN4AK.js → dist-SBK33YLC.js} +5 -40
  216. package/chunks/{dist-NQ2636VT.js → dist-WMFHZG3R.js} +2 -5
  217. package/chunks/{edit-GL7OA6RV.js → edit-QXJZIWRQ.js} +50 -44
  218. package/chunks/{en-YJNRUQG4.js → en-7BZ2OZKH.js} +2 -1
  219. package/chunks/{enter-worktree-YFTKHXHZ.js → enter-worktree-54L5QJ3N.js} +4 -4
  220. package/chunks/{enterPlanMode-VC4BCSZE.js → enterPlanMode-2ITCVQ5N.js} +47 -41
  221. package/chunks/{environment-BI6IBAZJ.js → environment-URPO5ORZ.js} +65 -57
  222. package/chunks/{errors-D6G2ZM2R.js → errors-TDUYLEKI.js} +64 -56
  223. package/chunks/{exit-worktree-NF2XEMES.js → exit-worktree-EORJDKDS.js} +4 -4
  224. package/chunks/{exitPlanMode-DX446CA6.js → exitPlanMode-RA7KMUEW.js} +47 -41
  225. package/chunks/{fast-path-MAYDLJIP.js → fast-path-Q2JYP64P.js} +7 -7
  226. package/chunks/{fast-path-settings-SATXY3PD.js → fast-path-settings-GTHZLVSS.js} +2 -2
  227. package/chunks/{fr-HKNWVXRJ.js → fr-JJWM2HUS.js} +1 -1
  228. package/chunks/{glob-TVKRFY36.js → glob-VHSV4BKE.js} +50 -44
  229. package/chunks/{goal-tools-CA6YANRN.js → goal-tools-5FIE56CK.js} +53 -43
  230. package/chunks/{grep-BLHF2S5D.js → grep-3PKFKLCA.js} +2 -2
  231. package/chunks/{handleAutoUpdate-AW4ZAHON.js → handleAutoUpdate-7FZFLKNZ.js} +65 -57
  232. package/chunks/{i18n-IH5CRAY7.js → i18n-NTFQDWKR.js} +63 -55
  233. package/chunks/{image-gen-XP4NNIYG.js → image-gen-TF3IQWSH.js} +7 -6
  234. package/chunks/{initializer-UBR37ZNM.js → initializer-LB3T635H.js} +69 -61
  235. package/chunks/{installationInfo-Y52756EC.js → installationInfo-KRO433ZG.js} +62 -54
  236. package/chunks/{ja-GJS5RZGU.js → ja-L67TXFDJ.js} +1 -1
  237. package/chunks/{list-7V5JDZPO.js → list-NEP3WPZ7.js} +72 -64
  238. package/chunks/{list-agents-I5TRH3J7.js → list-agents-QLDXS5OD.js} +18 -8
  239. package/chunks/{llm-QDB6JVF5.js → llm-AZEJEIAD.js} +141 -128
  240. package/chunks/{llm-content-generator-EO6MZCEO.js → llm-content-generator-KWXFHBR3.js} +6 -5
  241. package/chunks/{loadedSettingsAdapter-I3YQKMC4.js → loadedSettingsAdapter-NZORJLSD.js} +69 -61
  242. package/chunks/{loggingContentGenerator-MNXYUGDG.js → loggingContentGenerator-NGHVU6AK.js} +69 -62
  243. package/chunks/{loop-wakeup-HL6XOWI4.js → loop-wakeup-HHMYIC7Z.js} +2 -2
  244. package/chunks/{ls-YV7RKLKY.js → ls-N7ABR6HI.js} +4 -4
  245. package/chunks/{lsp-NO3AMRZT.js → lsp-LTOFWG5P.js} +1 -1
  246. package/chunks/{managed-npm-update-EA3EXPTO.js → managed-npm-update-3LHNBEAG.js} +62 -54
  247. package/chunks/{mcp-QTAJ544Y.js → mcp-4SWJKDX7.js} +69 -61
  248. package/chunks/{monitor-6FQKQOTP.js → monitor-V5EFBZC7.js} +49 -43
  249. package/chunks/{nonInteractiveCli-MRCTZL5X.js → nonInteractiveCli-5UFUBUAT.js} +117 -109
  250. package/chunks/{notebook-edit-BQQCKI7K.js → notebook-edit-ATV46KWD.js} +48 -42
  251. package/chunks/{open-with-auth-D6JD6LDS.js → open-with-auth-6MVIHMXB.js} +1 -1
  252. package/chunks/openai-WX26N5OJ.js +47 -0
  253. package/chunks/{openaiContentGenerator-TTSKXNVH.js → openaiContentGenerator-BKTO5QJK.js} +31 -25
  254. package/chunks/openaiResponsesContentGenerator-RTCAJ5V5.js +1658 -0
  255. package/chunks/{pidfile-KPIS6RIT.js → pidfile-JAIOWPI3.js} +65 -55
  256. package/chunks/process-registry-X6ZCASEN.js +10 -0
  257. package/chunks/{processUtils-ZCASPKK4.js → processUtils-TCQH3LVD.js} +2 -2
  258. package/chunks/{prompt-terminal-ledger-D6HM6TV7.js → prompt-terminal-ledger-BYXHEUHX.js} +63 -55
  259. package/chunks/{pt-FXMYXEUV.js → pt-77SBDL4B.js} +1 -1
  260. package/chunks/{qwenContentGenerator-GGZEFLBD.js → qwenContentGenerator-K5TJK75P.js} +60 -52
  261. package/chunks/{qwenOAuth2-KX6LVYQ3.js → qwenOAuth2-NOXRK323.js} +6 -5
  262. package/chunks/{read-file-VE5GDFLP.js → read-file-DL7GNZD5.js} +11 -9
  263. package/chunks/{read-mcp-resource-D3N75DGF.js → read-mcp-resource-B37WANAQ.js} +1 -1
  264. package/chunks/{record-artifact-Q5CRGJTP.js → record-artifact-OAXWXZ5D.js} +2 -2
  265. package/chunks/record-source-D7R7X3GT.js +22 -0
  266. package/chunks/{report-findings-TJ34R7QK.js → report-findings-AR3VC6EQ.js} +3 -3
  267. package/chunks/{request-shutdown-LRKMTBAD.js → request-shutdown-IKNWTX5M.js} +5 -5
  268. package/chunks/{resumeHistoryUtils-HSSGMYDC.js → resumeHistoryUtils-OYKXZ4YO.js} +68 -60
  269. package/chunks/{ripGrep-SEJE7AA6.js → ripGrep-EOUMIU4K.js} +15 -13
  270. package/chunks/{ru-RMHURE5U.js → ru-UYWHKWF2.js} +1 -1
  271. package/chunks/{run-qwen-serve-OJYVH7N6.js → run-qwen-serve-PPTGWC5B.js} +471 -152
  272. package/chunks/{runtime-KGMQQFJD.js → runtime-5RO22P2N.js} +77 -67
  273. package/chunks/{scheduled-tasks-7H5HWHYD.js → scheduled-tasks-YGERFWLZ.js} +70 -62
  274. package/chunks/{scheduler-BE42AKDG.js → scheduler-S6WU6M3C.js} +64 -56
  275. package/chunks/{sdk-exporters-grpc-MXTVSE3C.js → sdk-exporters-grpc-Y2ZUQDUQ.js} +2 -2
  276. package/chunks/{sdk-exporters-http-7R2ARBPV.js → sdk-exporters-http-VWTF4W6K.js} +3 -3
  277. package/chunks/{sdk-impl-YOLO7LV4.js → sdk-impl-G6FVTBQZ.js} +9 -9
  278. package/chunks/{send-message-AWKUDJBH.js → send-message-TWOGWCBG.js} +13 -10
  279. package/chunks/{serve-KZVKYMSL.js → serve-HT4WOCWS.js} +70 -62
  280. package/chunks/{server-PJRALPJQ.js → server-SWXVPRCS.js} +2977 -617
  281. package/chunks/{session-IHITXU2S.js → session-6DSFUOMO.js} +154 -119
  282. package/chunks/{session-attachments-root-GQ2TUI3Y.js → session-attachments-root-SOZCTQWW.js} +62 -54
  283. package/chunks/{session-pr-refresh-H43LULTE.js → session-pr-refresh-F7XUBQBH.js} +70 -62
  284. package/chunks/{settings-RKEQQDFC.js → settings-SWQH36PO.js} +74 -66
  285. package/chunks/{shell-6PJ444U5.js → shell-XUQL6EYV.js} +47 -41
  286. package/chunks/{skill-Q3UP7B5V.js → skill-HNRDD54C.js} +33 -23
  287. package/chunks/{skill-settings-LZR5YRRW.js → skill-settings-JU72PCII.js} +68 -60
  288. package/chunks/{spawnChannel-WM3DT2BF.js → spawnChannel-7ZVM3GBU.js} +65 -57
  289. package/chunks/{standalone-update-E5474IBI.js → standalone-update-64JQY2LX.js} +64 -56
  290. package/chunks/{start-opentui-ui-WLWZNQ2I.js → start-opentui-ui-RSLBXESU.js} +554 -297
  291. package/chunks/{startInteractiveUI-FBQSGWGO.js → startInteractiveUI-ZDPHD7XE.js} +1282 -1915
  292. package/chunks/{syntheticOutput-D2P5V6RG.js → syntheticOutput-F6F27JMK.js} +2 -2
  293. package/chunks/{task-create-PMAFST2T.js → task-create-Y623TBHB.js} +10 -10
  294. package/chunks/{task-list-R2HSY2NC.js → task-list-FCPEEGWL.js} +3 -3
  295. package/chunks/{task-stop-BFSKRTGV.js → task-stop-QTKZXLPH.js} +1 -1
  296. package/chunks/{task-update-JYC57USF.js → task-update-YLSXF25N.js} +10 -10
  297. package/chunks/{team-create-VIGUFUT4.js → team-create-U52VYSNO.js} +49 -43
  298. package/chunks/{team-delete-CBHVBTPB.js → team-delete-S7TLHZCF.js} +3 -3
  299. package/chunks/{team-plan-approval-HQVZA3MD.js → team-plan-approval-IQ4ADQIK.js} +47 -41
  300. package/chunks/{terminal-image-renderer-LUKNCOVM.js → terminal-image-renderer-ZEMF7LB2.js} +64 -56
  301. package/chunks/{theme-manager-LOENKYLY.js → theme-manager-DK2S2SOX.js} +62 -54
  302. package/chunks/{todoWrite-5ERKFWAK.js → todoWrite-5QI2H2FW.js} +4 -4
  303. package/chunks/{tool-search-ZIFAQCE2.js → tool-search-6U4OQG7K.js} +21 -15
  304. package/chunks/{total-session-admission-FUUJH3QH.js → total-session-admission-BOARHBZU.js} +68 -60
  305. package/chunks/{trustedFolders-C76KYROP.js → trustedFolders-GKQZXZSV.js} +63 -55
  306. package/chunks/{update-relaunch-4G2SRXKX.js → update-relaunch-GLACF7PX.js} +5 -5
  307. package/chunks/{updateCheck-EIZIO7HI.js → updateCheck-NLBSZB4Q.js} +64 -56
  308. package/chunks/{useAutoAcceptIndicator-EAA6KSY4.js → useAutoAcceptIndicator-3X3BYU7H.js} +72 -64
  309. package/chunks/{validateNonInterActiveAuth-BRX22QCN.js → validateNonInterActiveAuth-NE3JLOIR.js} +114 -106
  310. package/chunks/{version-E56RU7PR.js → version-6H5YAT4N.js} +3 -1
  311. package/chunks/{web-fetch-AAUCD7RM.js → web-fetch-RWSO7TTN.js} +15 -13
  312. package/chunks/{web-search-HFUQF44Q.js → web-search-DADI3LV5.js} +560 -322
  313. package/chunks/{web-shell-static-POZHGGXE.js → web-shell-static-CCN4JZEE.js} +5 -4
  314. package/chunks/workflow-LPGCZCIT.js +1224 -0
  315. package/chunks/workspace-providers-status-QBRBEFTO.js +127 -0
  316. package/chunks/{workspace-registration-store-YL7HLYYI.js → workspace-registration-store-WUKTMJPW.js} +3 -2
  317. package/chunks/{workspace-registry-BNRP2ELW.js → workspace-registry-CJV7KVGF.js} +68 -60
  318. package/chunks/{workspace-runtime-coordinator-WKGF7VHS.js → workspace-runtime-coordinator-7LYMFMFF.js} +71 -61
  319. package/chunks/{workspace-service-4MYO72MM.js → workspace-service-HWXZSA4J.js} +75 -67
  320. package/chunks/{workspace-skills-status-SU66TJLZ.js → workspace-skills-status-D6QXUWCC.js} +70 -62
  321. package/chunks/{workspace-trust-reconciler-D5QT7WQB.js → workspace-trust-reconciler-VZX7G7CZ.js} +75 -67
  322. package/chunks/{write-file-NVPQE2AZ.js → write-file-KKHV26YV.js} +49 -43
  323. package/chunks/{zh-VBFCRQBL.js → zh-J2GLI64H.js} +2 -1
  324. package/chunks/{zh-TW-N2TBF2F2.js → zh-TW-TBAICUJQ.js} +2 -1
  325. package/chunks/{zoom-image-RJHC66WG.js → zoom-image-OG7X7KAA.js} +12 -10
  326. package/cli.js +14 -14
  327. package/export-transcript-document.css +1 -0
  328. package/export-transcript-document.js +164 -165
  329. package/locales/ca.js +2 -2
  330. package/locales/de.js +2 -2
  331. package/locales/en.js +3 -2
  332. package/locales/fr.js +2 -2
  333. package/locales/ja.js +2 -2
  334. package/locales/pt.js +2 -2
  335. package/locales/ru.js +2 -2
  336. package/locales/zh-TW.js +3 -2
  337. package/locales/zh.js +3 -2
  338. package/package.json +6 -5
  339. package/web-shell/assets/{abnfDiagram-VCTEODGH-DHc6plZn.js → abnfDiagram-VCTEODGH-NT0lTLRG.js} +1 -1
  340. package/web-shell/assets/{arc-BQ9m8TDV.js → arc-DDqnIMMx.js} +1 -1
  341. package/web-shell/assets/{architectureDiagram-5GKGNRK7-D5ap3oVB.js → architectureDiagram-5GKGNRK7-DfYghE3W.js} +1 -1
  342. package/web-shell/assets/{blockDiagram-NRAW4CY4-BIbnyNph.js → blockDiagram-NRAW4CY4-DlqJIx5c.js} +1 -1
  343. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BRsdx_iG.js → c4Diagram-UCG6FXSJ-CinqLGU4.js} +1 -1
  344. package/web-shell/assets/channel-BHGoSkEv.js +1 -0
  345. package/web-shell/assets/{chunk-2Q5K7J3B-3lf1fNlx.js → chunk-2Q5K7J3B-CsjJX5M7.js} +1 -1
  346. package/web-shell/assets/{chunk-5VM5RSS4-DP8VNRc4.js → chunk-5VM5RSS4-CaVb2tdH.js} +1 -1
  347. package/web-shell/assets/{chunk-F27PBJKO-DrohDmZ6.js → chunk-F27PBJKO-CRyErlzW.js} +1 -1
  348. package/web-shell/assets/{chunk-G27WJ6UU-UZ2QhSx6.js → chunk-G27WJ6UU-7I79DZCf.js} +1 -1
  349. package/web-shell/assets/{chunk-JWPE2WC7-BIMHVcZK.js → chunk-JWPE2WC7-Dz4cac5F.js} +1 -1
  350. package/web-shell/assets/{chunk-LCL6LL3I-izRxdSDd.js → chunk-LCL6LL3I-Ls24Derb.js} +1 -1
  351. package/web-shell/assets/{chunk-POPQ4Y6H-CXADD4PP.js → chunk-POPQ4Y6H-JzYe4qx7.js} +1 -1
  352. package/web-shell/assets/{chunk-SVP7TREG-B96d8Y_1.js → chunk-SVP7TREG-BxDwesA-.js} +1 -1
  353. package/web-shell/assets/{chunk-XXDRQBXY-CF2sVQpv.js → chunk-XXDRQBXY-CW4hjgWc.js} +1 -1
  354. package/web-shell/assets/classDiagram-DTDB5LWJ-E47Xnn15.js +1 -0
  355. package/web-shell/assets/classDiagram-v2-JRS7N3AN-E47Xnn15.js +1 -0
  356. package/web-shell/assets/{cose-bilkent-JH36ORCC-CT6tXVAS.js → cose-bilkent-JH36ORCC-DxikE9iF.js} +1 -1
  357. package/web-shell/assets/{cynefin-OW5HDTMX-X1NS4vtV.js → cynefin-OW5HDTMX-CvVsIkVN.js} +1 -1
  358. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DNsKNOT4.js → cynefinDiagram-5FMLGOSQ-CDHkk3wq.js} +1 -1
  359. package/web-shell/assets/{dagre-3AP2YEHR-9-AHKqsb.js → dagre-3AP2YEHR-BgLdkVLT.js} +1 -1
  360. package/web-shell/assets/{diagram-S7CK7UJ4-Bjgms7j6.js → diagram-S7CK7UJ4-DP43cGhe.js} +1 -1
  361. package/web-shell/assets/{diagram-UQ7AKVKN-h6bCprbE.js → diagram-UQ7AKVKN-BWrZYhoT.js} +1 -1
  362. package/web-shell/assets/{diagram-VSXAHHWV-4SbQXVLt.js → diagram-VSXAHHWV-B80wjH_n.js} +1 -1
  363. package/web-shell/assets/{diagram-VX7I27RA-B5gPCzzB.js → diagram-VX7I27RA-DPpKmDsY.js} +1 -1
  364. package/web-shell/assets/{diagram-Z3DM3KII-DFJXIA3A.js → diagram-Z3DM3KII-kaEBNbNU.js} +1 -1
  365. package/web-shell/assets/{ebnfDiagram-PWID7BFC-FwyaU7VY.js → ebnfDiagram-PWID7BFC-1-qbEZvk.js} +1 -1
  366. package/web-shell/assets/{erDiagram-SSCWMZ5O-8vJQh2te.js → erDiagram-SSCWMZ5O-CrK2gMkV.js} +1 -1
  367. package/web-shell/assets/{flowDiagram-A5DVABFB-BzA_1gMN.js → flowDiagram-A5DVABFB-Dic2xofW.js} +1 -1
  368. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-Co-ABbVX.js → ganttDiagram-EL5Y4UJY-DJko8vT7.js} +1 -1
  369. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DW_FcyrX.js → gitGraphDiagram-WWUBYQGX-DxsQ-bHT.js} +1 -1
  370. package/web-shell/assets/index-DY8CxdBr.js +2173 -0
  371. package/web-shell/assets/index-eBxK3rs2.css +36 -0
  372. package/web-shell/assets/{index-BbMXfhNG.js → index-t7VBrUeD.js} +1 -1
  373. package/web-shell/assets/{infoDiagram-RXCK75RN-BEgfhUFN.js → infoDiagram-RXCK75RN-DcRUJbNi.js} +1 -1
  374. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DCsMxQmc.js → ishikawaDiagram-5VMMS53U-CUPw-2_e.js} +1 -1
  375. package/web-shell/assets/{journeyDiagram-EYS64GPL-DyIEYoHz.js → journeyDiagram-EYS64GPL-yOHhZxkW.js} +1 -1
  376. package/web-shell/assets/{kanban-definition-3QL26DDD-CkxjqCNr.js → kanban-definition-3QL26DDD-CFUGBbqz.js} +1 -1
  377. package/web-shell/assets/{layout-BEWc0Al9.js → layout-BoilNfBU.js} +1 -1
  378. package/web-shell/assets/{linear-CNuNxirL.js → linear-DOuHaPrl.js} +1 -1
  379. package/web-shell/assets/{mermaid.core-DZBre674.js → mermaid.core-1G1fXWda.js} +6 -6
  380. package/web-shell/assets/{mindmap-definition-FBJOCRG2-CpafFz_F.js → mindmap-definition-FBJOCRG2-B8BhkrOX.js} +1 -1
  381. package/web-shell/assets/{pegDiagram-XKGWAZYB-DfZqk_dq.js → pegDiagram-XKGWAZYB-CipC5K1D.js} +1 -1
  382. package/web-shell/assets/{pieDiagram-E7YTZNPT-S0UWXlgC.js → pieDiagram-E7YTZNPT-CHBDFDUJ.js} +1 -1
  383. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-dd37_Ohj.js → quadrantDiagram-AXDQQJYC-_iiBkoZO.js} +1 -1
  384. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH8NJZ7u.js → railroadDiagram-O6MQD6OU-Cx1peHDi.js} +1 -1
  385. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CFdqWYih.js → requirementDiagram-EFPCY7ZU-CBRiPbdQ.js} +1 -1
  386. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CsddcEGD.js → sankeyDiagram-P5KCCOFB-TT6GcHaZ.js} +1 -1
  387. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BZ270mGw.js → sequenceDiagram-WJ2MYXX4-CWP42PNb.js} +1 -1
  388. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CGaS4DBV.js → sizeCapture-X5ZJPWSS-Bp94roEG.js} +1 -1
  389. package/web-shell/assets/{stateDiagram-HBIQ2CUA-COpIzMu6.js → stateDiagram-HBIQ2CUA-0ftrzTAy.js} +1 -1
  390. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-PgAST0dK.js +1 -0
  391. package/web-shell/assets/{swimlanes-XN3QIQJK-CMF889m3.js → swimlanes-XN3QIQJK-D-FsenYJ.js} +1 -1
  392. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-BcWcB5bj.js +8 -0
  393. package/web-shell/assets/{timeline-definition-24CTP7MA-BelnxYz5.js → timeline-definition-24CTP7MA-Ctvrj28y.js} +1 -1
  394. package/web-shell/assets/{vennDiagram-4TSXK5OY-CU-NRqIB.js → vennDiagram-4TSXK5OY-5DZncjOt.js} +1 -1
  395. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CDNKqWh-.js → wardleyDiagram-VM6X3IG4-jZjYwPY7.js} +1 -1
  396. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CLqguL5D.js → xychartDiagram-S5SC5T6Z-Ci6Q2C2_.js} +1 -1
  397. package/web-shell/index.html +29 -5
  398. package/chunks/chunk-V7RNNPGC.js +0 -44
  399. package/chunks/chunk-X35VIWWJ.js +0 -276
  400. package/chunks/workflow-3MABM53N.js +0 -2771
  401. package/chunks/workspace-providers-status-2FRLBZ5I.js +0 -119
  402. package/web-shell/assets/channel-uMMdTrYk.js +0 -1
  403. package/web-shell/assets/classDiagram-DTDB5LWJ-DcY-26Ig.js +0 -1
  404. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DcY-26Ig.js +0 -1
  405. package/web-shell/assets/index-Bu-rZoJ-.js +0 -2150
  406. package/web-shell/assets/index-CsPwZ1ut.css +0 -36
  407. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-D6qEVAji.js +0 -1
  408. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-mem5Jj4m.js +0 -8
  409. /package/chunks/{chunk-JA5CBKRP.js → chunk-7NXSVSFB.js} +0 -0
@@ -1,32 +1,5 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import {
4
- DASHSCOPE_PROXY_BASE_URL,
5
- DEFAULT_DASHSCOPE_BASE_URL,
6
- DEFAULT_MAX_RETRIES,
7
- REASONING_EFFORT_TIERS,
8
- clampReasoningEffort,
9
- resolveRequestTimeout
10
- } from "./chunk-6YEOCHSE.js";
11
- import {
12
- buildSessionAwareFetch
13
- } from "./chunk-NOO4QFXM.js";
14
- import {
15
- isQwenFamilyWireModel,
16
- isTieredEffortWireModel
17
- } from "./chunk-XBVNNDPK.js";
18
- import {
19
- defaultOutputCeiling,
20
- hasExplicitOutputLimit,
21
- parsePositiveIntegerEnvValue,
22
- tokenLimit
23
- } from "./chunk-FPGTNKCP.js";
24
- import {
25
- buildRuntimeFetchOptions
26
- } from "./chunk-4HOEU2OR.js";
27
- import {
28
- createDebugLogger
29
- } from "./chunk-ZAFYHRVY.js";
30
3
  import {
31
4
  init_esbuild_shims
32
5
  } from "./chunk-5O2XNYP6.js";
@@ -34,6 +7,9 @@ import {
34
7
  __name
35
8
  } from "./chunk-J2S4EL5Y.js";
36
9
 
10
+ // node_modules/openai/index.mjs
11
+ init_esbuild_shims();
12
+
37
13
  // node_modules/openai/client.mjs
38
14
  init_esbuild_shims();
39
15
 
@@ -6878,849 +6854,140 @@ OpenAI.Responses = Responses;
6878
6854
  OpenAI.Evals = Evals;
6879
6855
  OpenAI.Containers = Containers;
6880
6856
 
6881
- // node_modules/openai/index.mjs
6882
- init_esbuild_shims();
6883
-
6884
6857
  // node_modules/openai/azure.mjs
6885
6858
  init_esbuild_shims();
6886
-
6887
- // packages/core/src/core/openaiContentGenerator/provider/default.ts
6888
- init_esbuild_shims();
6889
- var debugLogger = createDebugLogger("DefaultOpenAICompatibleProvider");
6890
- var OPENAI_COMPATIBLE_EFFORTS = [
6891
- "low",
6892
- "medium",
6893
- "high",
6894
- "xhigh"
6895
- ];
6896
- function isQwen3Model(model) {
6897
- return model.toLowerCase().includes("qwen3");
6898
- }
6899
- __name(isQwen3Model, "isQwen3Model");
6900
- function mirrorReasoningContentToReasoning(message) {
6901
- if (message.role !== "assistant") {
6902
- return message;
6903
- }
6904
- const assistant = message;
6905
- if (typeof assistant.reasoning_content !== "string" || assistant.reasoning_content.length === 0 || typeof assistant.reasoning === "string") {
6906
- return message;
6907
- }
6908
- return {
6909
- ...assistant,
6910
- reasoning: assistant.reasoning_content
6911
- };
6912
- }
6913
- __name(mirrorReasoningContentToReasoning, "mirrorReasoningContentToReasoning");
6914
- var DefaultOpenAICompatibleProvider = class {
6915
- static {
6916
- __name(this, "DefaultOpenAICompatibleProvider");
6917
- }
6918
- contentGeneratorConfig;
6919
- cliConfig;
6920
- /**
6921
- * Latch so an effort-clamp warning fires once per provider lifetime. Shared
6922
- * with subclasses that clamp on their own wire shape (see DashScope) so one
6923
- * provider instance never repeats the notice.
6924
- */
6925
- effortClampWarned = false;
6926
- constructor(contentGeneratorConfig, cliConfig) {
6927
- this.cliConfig = cliConfig;
6928
- this.contentGeneratorConfig = contentGeneratorConfig;
6929
- }
6930
- buildHeaders() {
6931
- const version = this.cliConfig.getCliVersion() || "unknown";
6932
- const userAgent = `QwenCode/${version} (${process.platform}; ${process.arch})`;
6933
- const { customHeaders } = this.contentGeneratorConfig;
6934
- const defaultHeaders = {
6935
- "User-Agent": userAgent
6936
- };
6937
- return customHeaders ? { ...defaultHeaders, ...customHeaders } : defaultHeaders;
6938
- }
6939
- buildClient() {
6940
- const {
6941
- apiKey,
6942
- baseUrl,
6943
- maxRetries = DEFAULT_MAX_RETRIES
6944
- } = this.contentGeneratorConfig;
6945
- const timeout = resolveRequestTimeout(this.contentGeneratorConfig.timeout);
6946
- const defaultHeaders = this.buildHeaders();
6947
- const runtimeOptions = buildRuntimeFetchOptions(
6948
- "openai",
6949
- this.cliConfig.getProxy()
6950
- );
6951
- return new OpenAI({
6952
- apiKey,
6953
- baseURL: baseUrl,
6954
- timeout,
6955
- maxRetries,
6956
- defaultHeaders,
6957
- ...runtimeOptions || {},
6958
- fetch: buildSessionAwareFetch(
6959
- runtimeOptions?.fetch,
6960
- this.cliConfig,
6961
- this.contentGeneratorConfig.customHeaders
6962
- )
6963
- });
6964
- }
6965
- /**
6966
- * Effort tiers this endpoint accepts for `model`. Takes the wire model
6967
- * rather than reading the configured one, because a request may override it
6968
- * (`pipeline.ts` resolves `request.model || contentGeneratorConfig.model`),
6969
- * and a capability answered for the wrong model is how an unaccepted tier
6970
- * reaches the wire. Override in a subclass whose endpoint takes `max`; the
6971
- * clamp calls it through `this`, so a subclass answer applies even on the
6972
- * `super.buildRequest` path.
6973
- */
6974
- supportedReasoningEffortsFor(_model) {
6975
- return OPENAI_COMPATIBLE_EFFORTS;
6976
- }
6977
- /**
6978
- * Cap the pipeline-injected `reasoning.effort` at what this endpoint accepts.
6979
- * The tier is configured once (`/effort`) and persisted, so an unaccepted
6980
- * value is not a one-off rejection: it 400s every later request in the
6981
- * session too.
6982
- *
6983
- * Only the pipeline-injected tier is capped. A `reasoning` object the user
6984
- * put in `samplingParams` ships verbatim (the pipeline hands those keys
6985
- * straight to the wire and skips the injection entirely), and `extra_body`
6986
- * merges after this, so both explicit overrides survive unchanged.
6987
- */
6988
- clampConfiguredReasoningEffort(request) {
6989
- if (this.contentGeneratorConfig.samplingParams?.["reasoning"] !== void 0) {
6990
- return request;
6991
- }
6992
- const loose = request;
6993
- const reasoning = loose["reasoning"];
6994
- const effort = reasoning?.effort;
6995
- if (typeof effort !== "string" || !REASONING_EFFORT_TIERS.includes(effort)) {
6996
- return request;
6997
- }
6998
- const clamped = clampReasoningEffort(
6999
- effort,
7000
- this.supportedReasoningEffortsFor(
7001
- loose["model"] ?? this.contentGeneratorConfig.model
7002
- )
7003
- );
7004
- if (clamped === effort) {
7005
- return request;
7006
- }
7007
- if (!this.effortClampWarned) {
7008
- debugLogger.warn(
7009
- `reasoning.effort='${effort}' is not accepted by this OpenAI-compatible endpoint; using '${clamped}'.`
7010
- );
7011
- this.effortClampWarned = true;
7012
- }
7013
- return {
7014
- ...loose,
7015
- reasoning: { ...reasoning, effort: clamped }
7016
- };
7017
- }
7018
- buildRequest(request, _userPromptId) {
7019
- const extraBody = this.contentGeneratorConfig.extra_body;
7020
- const requestWithTokenLimits = this.clampConfiguredReasoningEffort(
7021
- this.applyOutputTokenLimit(request)
7022
- );
7023
- const messages = isQwen3Model(request.model) ? requestWithTokenLimits.messages.map(mirrorReasoningContentToReasoning) : requestWithTokenLimits.messages;
7024
- return {
7025
- ...requestWithTokenLimits,
7026
- messages,
7027
- ...extraBody ? extraBody : {}
7028
- };
7029
- }
7030
- getDefaultGenerationConfig() {
7031
- return {};
7032
- }
7033
- getResponseParsingOptions(model) {
7034
- return {
7035
- contentOnlyThinkingTagLeaks: true,
7036
- ...model && isQwen3Model(model) ? { taggedThinkingTagsAfterReasoning: true } : {}
7037
- };
7038
- }
7039
- /**
7040
- * Apply output token limit to a request's max_tokens parameter.
7041
- *
7042
- * Purpose:
7043
- * Some APIs (e.g., OpenAI-compatible) default to a very small max_tokens value,
7044
- * which can cause responses to be truncated mid-output. This function ensures
7045
- * a reasonable default is set while respecting user configuration.
7046
- *
7047
- * Logic:
7048
- * 1. If user explicitly configured max_tokens:
7049
- * - For known models (in OUTPUT_PATTERNS): use the user's value, but cap at
7050
- * model's max output limit to avoid API errors
7051
- * (input + max_output > contextWindowSize would cause 400 errors on some APIs)
7052
- * - For unknown models (deployment aliases, self-hosted): respect user's
7053
- * configured value entirely (backend may support larger limits)
7054
- * 2. If user didn't configure max_tokens:
7055
- * - Check QWEN_CODE_MAX_OUTPUT_TOKENS env var first
7056
- * - Otherwise use the model's output limit, clipped to
7057
- * OUTPUT_TOKEN_CEILING (64K)
7058
- * 3. If model has no specific limit (tokenLimit returns default):
7059
- * - Use DEFAULT_OUTPUT_TOKEN_LIMIT
7060
- *
7061
- * Examples:
7062
- * - User sets 4K, known model limit 64K → uses 4K (respects user preference)
7063
- * - User sets 100K, known model limit 64K → uses 64K (capped to avoid API error)
7064
- * - User sets 100K, unknown model → uses 100K (respects user, backend may support it)
7065
- * - User not set, model limit 64K → uses 64K
7066
- * - User not set, model limit 4K → uses 4K (model limit is lower)
7067
- * - User not set, env QWEN_CODE_MAX_OUTPUT_TOKENS=16000 -> uses 16K
7068
- *
7069
- * @param request - The chat completion request parameters
7070
- * @returns The request with max_tokens adjusted according to the logic
7071
- */
7072
- applyOutputTokenLimit(request) {
7073
- if (this.contentGeneratorConfig.samplingParams !== void 0) {
7074
- return request;
7075
- }
7076
- const userMaxTokens = request.max_tokens;
7077
- const modelLimit = tokenLimit(request.model, "output");
7078
- const isKnownModel = hasExplicitOutputLimit(request.model);
7079
- let effectiveMaxTokens;
7080
- if (userMaxTokens !== void 0 && userMaxTokens !== null) {
7081
- if (isKnownModel) {
7082
- effectiveMaxTokens = Math.min(userMaxTokens, modelLimit);
7083
- } else {
7084
- effectiveMaxTokens = userMaxTokens;
7085
- }
7086
- } else {
7087
- const envMaxTokens = parsePositiveIntegerEnvValue(
7088
- process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"]
7089
- );
7090
- if (envMaxTokens !== void 0) {
7091
- effectiveMaxTokens = isKnownModel ? Math.min(envMaxTokens, modelLimit) : envMaxTokens;
7092
- } else {
7093
- effectiveMaxTokens = defaultOutputCeiling(request.model);
7094
- }
7095
- }
7096
- return {
7097
- ...request,
7098
- max_tokens: effectiveMaxTokens
7099
- };
7100
- }
7101
- };
7102
-
7103
- // packages/core/src/core/openaiContentGenerator/provider/dashscope.ts
7104
- init_esbuild_shims();
7105
- var debugLogger2 = createDebugLogger("DashScopeOpenAICompatibleProvider");
7106
- var DASHSCOPE_TIERED_EFFORTS = [
7107
- "low",
7108
- "medium",
7109
- "high",
7110
- "xhigh"
7111
- ];
7112
- function selectDashScopeThinkingKnob(model, extraBody, samplingParams, reasoningEffort) {
7113
- if (!isTieredEffortWireModel((model ?? "").toLowerCase())) {
7114
- return void 0;
7115
- }
7116
- const selectFromLayer = /* @__PURE__ */ __name((source, layer) => {
7117
- if (layer?.["enable_thinking"] === false) {
7118
- return { source, field: "enable_thinking", value: false };
7119
- }
7120
- return selectValueFromLayer(source, layer) ?? selectOnSwitch(source, layer);
7121
- }, "selectFromLayer");
7122
- const selectValueFromLayer = /* @__PURE__ */ __name((source, layer) => {
7123
- if (layer?.["reasoning_effort"] != null) {
7124
- return {
7125
- source,
7126
- field: "reasoning_effort",
7127
- value: layer["reasoning_effort"]
7128
- };
7129
- }
7130
- if (layer?.["thinking_budget"] != null) {
7131
- return {
7132
- source,
7133
- field: "thinking_budget",
7134
- value: layer["thinking_budget"]
7135
- };
7136
- }
7137
- return void 0;
7138
- }, "selectValueFromLayer");
7139
- const selectOnSwitch = /* @__PURE__ */ __name((source, layer) => {
7140
- if (layer?.["enable_thinking"] === true) {
7141
- return { source, field: "enable_thinking", value: true };
7142
- }
7143
- return void 0;
7144
- }, "selectOnSwitch");
7145
- const reasoningSelection = reasoningEffort !== void 0 ? {
7146
- source: "reasoning",
7147
- field: "reasoning_effort",
7148
- value: reasoningEffort
7149
- } : void 0;
7150
- const extraBodySelection = selectFromLayer("extra_body", extraBody);
7151
- if (extraBodySelection?.field === "enable_thinking" && extraBodySelection.value === true) {
7152
- return selectValueFromLayer("samplingParams", samplingParams) ?? reasoningSelection ?? extraBodySelection;
7153
- }
7154
- if (extraBodySelection) {
7155
- return extraBodySelection;
7156
- }
7157
- const samplingSelection = selectFromLayer("samplingParams", samplingParams);
7158
- return samplingSelection?.field === "enable_thinking" && samplingSelection.value === true ? reasoningSelection ?? samplingSelection : samplingSelection ?? reasoningSelection;
7159
- }
7160
- __name(selectDashScopeThinkingKnob, "selectDashScopeThinkingKnob");
7161
- function withoutNullishThinkingKnobs(layer) {
7162
- if (!layer) {
7163
- return void 0;
7164
- }
7165
- const hasNullishEnableThinking = "enable_thinking" in layer && layer["enable_thinking"] == null;
7166
- const hasNullishEffort = "reasoning_effort" in layer && layer["reasoning_effort"] == null;
7167
- const hasNullishBudget = "thinking_budget" in layer && layer["thinking_budget"] == null;
7168
- if (!hasNullishEnableThinking && !hasNullishEffort && !hasNullishBudget) {
7169
- return layer;
7170
- }
7171
- const sanitized = { ...layer };
7172
- if (hasNullishEnableThinking) {
7173
- delete sanitized["enable_thinking"];
7174
- }
7175
- if (hasNullishEffort) {
7176
- delete sanitized["reasoning_effort"];
7177
- }
7178
- if (hasNullishBudget) {
7179
- delete sanitized["thinking_budget"];
7180
- }
7181
- return sanitized;
7182
- }
7183
- __name(withoutNullishThinkingKnobs, "withoutNullishThinkingKnobs");
7184
- var DASHSCOPE_REGIONAL_HOSTS = [
7185
- "dashscope.aliyuncs.com",
7186
- "dashscope-intl.aliyuncs.com",
7187
- "dashscope-us.aliyuncs.com"
7188
- ];
7189
- var DashScopeOpenAICompatibleProvider = class _DashScopeOpenAICompatibleProvider extends DefaultOpenAICompatibleProvider {
6859
+ var AzureOpenAI = class extends OpenAI {
7190
6860
  static {
7191
- __name(this, "DashScopeOpenAICompatibleProvider");
7192
- }
7193
- constructor(contentGeneratorConfig, cliConfig) {
7194
- super(contentGeneratorConfig, cliConfig);
7195
- }
7196
- /**
7197
- * Determines whether to use the DashScope-compatible provider.
7198
- * Covers the official regional hosts (DASHSCOPE_REGIONAL_HOSTS),
7199
- * Token Plan endpoints under token-plan.<region>.maas.aliyuncs.com,
7200
- * internal Alibaba domains (*.alibaba-inc.com, *.aliyun-inc.com),
7201
- * Alibaba Cloud API Gateway domains (*.alicloudapi.com),
7202
- * and proxy matches.
7203
- *
7204
- * Note: any *.alibaba-inc.com / *.aliyun-inc.com host is treated as a
7205
- * DashScope-compatible endpoint by design. Keep this generic and avoid
7206
- * embedding individual private gateway hostnames in provider detection.
7207
- */
7208
- static isDashScopeProvider(contentGeneratorConfig) {
7209
- const { authType, baseUrl } = contentGeneratorConfig;
7210
- if (authType === "qwen-oauth" /* QWEN_OAUTH */) return true;
7211
- if (!baseUrl) return true;
7212
- const normalizedBaseUrl = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
7213
- let hostname = null;
7214
- try {
7215
- hostname = new URL(normalizedBaseUrl).hostname.toLowerCase();
7216
- } catch {
7217
- hostname = null;
7218
- }
7219
- const isDashscopeOrigin = hostname !== null && DASHSCOPE_REGIONAL_HOSTS.some(
7220
- (host) => hostname === host || hostname.endsWith("." + host)
7221
- );
7222
- const isTokenPlanOrigin = hostname !== null && hostname.startsWith("token-plan.") && hostname.endsWith(".maas.aliyuncs.com");
7223
- const isInternalOrigin = hostname !== null && (hostname.endsWith(".alibaba-inc.com") || hostname.endsWith(".aliyun-inc.com"));
7224
- const isAliCloudApiOrigin = hostname !== null && hostname.endsWith(".alicloudapi.com");
7225
- const normalizedProxyUrl = DASHSCOPE_PROXY_BASE_URL?.endsWith("/") ? DASHSCOPE_PROXY_BASE_URL.slice(0, -1) : DASHSCOPE_PROXY_BASE_URL;
7226
- const isProxyMatch = Boolean(
7227
- normalizedProxyUrl && normalizedBaseUrl.toLowerCase() === normalizedProxyUrl.toLowerCase()
7228
- );
7229
- if (normalizedProxyUrl && !isDashscopeOrigin && !isTokenPlanOrigin && !isInternalOrigin && !isAliCloudApiOrigin && !isProxyMatch) {
7230
- debugLogger2.debug(
7231
- `DASHSCOPE_PROXY_BASE_URL is configured but the request baseUrl does not match. DashScope headers/cache control will be skipped.`
7232
- );
7233
- }
7234
- if (isInternalOrigin) {
7235
- debugLogger2.debug(
7236
- `DashScope provider activated via internal origin: ${hostname}`
7237
- );
7238
- }
7239
- if (isAliCloudApiOrigin) {
7240
- debugLogger2.debug(
7241
- `DashScope provider activated via alicloudapi origin: ${hostname}`
7242
- );
7243
- }
7244
- return isDashscopeOrigin || isTokenPlanOrigin || isInternalOrigin || isAliCloudApiOrigin || isProxyMatch;
7245
- }
7246
- buildHeaders() {
7247
- const version = this.cliConfig.getCliVersion() || "unknown";
7248
- const userAgent = `QwenCode/${version} (${process.platform}; ${process.arch})`;
7249
- const { authType, customHeaders } = this.contentGeneratorConfig;
7250
- const defaultHeaders = {
7251
- "User-Agent": userAgent,
7252
- "X-DashScope-CacheControl": "enable",
7253
- "X-DashScope-UserAgent": userAgent,
7254
- "X-DashScope-AuthType": authType
7255
- };
7256
- return customHeaders ? { ...defaultHeaders, ...customHeaders } : defaultHeaders;
7257
- }
7258
- buildClient() {
7259
- const {
7260
- apiKey,
7261
- baseUrl = DEFAULT_DASHSCOPE_BASE_URL,
7262
- maxRetries = DEFAULT_MAX_RETRIES
7263
- } = this.contentGeneratorConfig;
7264
- const timeout = resolveRequestTimeout(this.contentGeneratorConfig.timeout);
7265
- const defaultHeaders = this.buildHeaders();
7266
- const runtimeOptions = buildRuntimeFetchOptions(
7267
- "openai",
7268
- this.cliConfig.getProxy()
7269
- );
7270
- return new OpenAI({
7271
- apiKey,
7272
- baseURL: baseUrl,
7273
- timeout,
7274
- maxRetries,
7275
- defaultHeaders,
7276
- ...runtimeOptions || {},
7277
- fetch: buildSessionAwareFetch(
7278
- runtimeOptions?.fetch,
7279
- this.cliConfig,
7280
- this.contentGeneratorConfig.customHeaders
7281
- )
7282
- });
6861
+ __name(this, "AzureOpenAI");
7283
6862
  }
7284
6863
  /**
7285
- * Build and configure the request for DashScope API.
6864
+ * API Client for interfacing with the Azure OpenAI API.
7286
6865
  *
7287
- * This method applies DashScope-specific configurations including:
7288
- * - Cache control for the system message, last tool message (when tools are configured),
7289
- * and the latest history message
7290
- * - Output token limits based on model capabilities
7291
- * - Vision model specific parameters (vl_high_resolution_images)
7292
- * - Request metadata for session tracking
7293
- *
7294
- * @param request - The original chat completion request parameters
7295
- * @param userPromptId - Unique identifier for the user prompt for session tracking
7296
- * @returns Configured request with DashScope-specific parameters applied
7297
- */
7298
- buildRequest(request, userPromptId) {
7299
- let messages = request.messages;
7300
- let tools = request.tools;
7301
- const flattenPlainTextForGlm = this.isGlmModel(request.model) && !this.hasFunctionCallingContext(request);
7302
- if (flattenPlainTextForGlm) {
7303
- messages = this.flattenTextContent(messages);
7304
- } else if (this.shouldEnableCacheControl()) {
7305
- const { messages: updatedMessages, tools: updatedTools } = this.addDashScopeCacheControl(
7306
- request,
7307
- request.stream ? "all" : "system_only"
7308
- );
7309
- messages = updatedMessages;
7310
- tools = updatedTools;
7311
- }
7312
- const requestWithTokenLimits = this.applyOutputTokenLimit(request);
7313
- const isTieredQwenModel = isTieredEffortWireModel(
7314
- this.resolveWireModel(request.model)
7315
- );
7316
- const extraBody = isTieredQwenModel ? withoutNullishThinkingKnobs(this.contentGeneratorConfig.extra_body) : this.contentGeneratorConfig.extra_body;
7317
- const qwenEffortConfig = this.buildQwenEffortConfig(request.model);
7318
- const rawRequestParams = requestWithTokenLimits;
7319
- const requestParams = isTieredQwenModel ? withoutNullishThinkingKnobs(rawRequestParams) : rawRequestParams;
7320
- if ("reasoning_effort" in requestParams && "reasoning_effort" in qwenEffortConfig) {
7321
- qwenEffortConfig["reasoning_effort"] = requestParams["reasoning_effort"];
7322
- }
7323
- const hasQwenEffortConfig = Object.keys(qwenEffortConfig).length > 0;
7324
- const selectedThinkingKnob = isTieredQwenModel ? selectDashScopeThinkingKnob(
7325
- this.resolveWireModel(request.model),
7326
- extraBody,
7327
- requestParams,
7328
- qwenEffortConfig["reasoning_effort"]
7329
- ) : void 0;
7330
- if (this.isVisionModel(request.model)) {
7331
- const dashscopeExtras2 = {
7332
- vl_high_resolution_images: true,
7333
- preserve_thinking: true,
7334
- ...qwenEffortConfig
7335
- };
7336
- const visionResult = {
7337
- ...requestParams,
7338
- messages,
7339
- ...tools ? { tools } : {},
7340
- ...this.buildMetadata(userPromptId) || {},
7341
- ...dashscopeExtras2
7342
- };
7343
- if (hasQwenEffortConfig && "reasoning" in visionResult) {
7344
- delete visionResult["reasoning"];
7345
- }
7346
- return this.mergeExtraBodyAndResolveKnobs(
7347
- hasQwenEffortConfig ? visionResult : this.clampConfiguredReasoningEffort(visionResult),
7348
- extraBody,
7349
- request.model,
7350
- selectedThinkingKnob
7351
- );
7352
- }
7353
- const dashscopeExtras = {
7354
- preserve_thinking: true,
7355
- ...qwenEffortConfig
7356
- };
7357
- const result = {
7358
- ...requestParams,
7359
- // Preserve all original parameters including sampling params and adjusted max_tokens
7360
- messages,
7361
- ...tools ? { tools } : {},
7362
- ...this.buildMetadata(userPromptId) || {},
7363
- ...dashscopeExtras
7364
- };
7365
- if (hasQwenEffortConfig && "reasoning" in result) {
7366
- delete result["reasoning"];
7367
- }
7368
- return this.mergeExtraBodyAndResolveKnobs(
7369
- hasQwenEffortConfig ? result : this.clampConfiguredReasoningEffort(result),
7370
- extraBody,
7371
- request.model,
7372
- selectedThinkingKnob
7373
- );
7374
- }
7375
- /**
7376
- * Shared tail for the vision and text branches: merge user extra_body
7377
- * last, then resolve thinking-knob conflicts against the wire model.
7378
- */
7379
- mergeExtraBodyAndResolveKnobs(result, extraBody, model, selectedThinkingKnob) {
7380
- const merged = {
7381
- ...result,
7382
- ...extraBody ? extraBody : {}
7383
- };
7384
- const reasoningEffort = merged["reasoning_effort"];
7385
- const dropped = /* @__PURE__ */ new Set();
7386
- if (selectedThinkingKnob?.field === "thinking_budget") {
7387
- if (reasoningEffort !== void 0) {
7388
- dropped.add("reasoning_effort");
7389
- }
7390
- if (merged["enable_thinking"] === false) {
7391
- dropped.add("enable_thinking");
7392
- }
7393
- }
7394
- if (selectedThinkingKnob?.field === "reasoning_effort" && merged["thinking_budget"] !== void 0) {
7395
- dropped.add("thinking_budget");
7396
- }
7397
- for (const key of dropped) {
7398
- delete merged[key];
7399
- }
7400
- for (const key of this.dropConflictingThinkingKnobs(
7401
- model,
7402
- merged,
7403
- selectedThinkingKnob
7404
- )) {
7405
- dropped.add(key);
7406
- }
7407
- this.warnConflictingKnobDrop(model, reasoningEffort, [...dropped]);
7408
- return merged;
7409
- }
7410
- resolveWireModel(model) {
7411
- return (model ?? this.contentGeneratorConfig.model ?? "").toLowerCase();
7412
- }
7413
- /**
7414
- * Translate the unified reasoning effort into the wire shape the model
7415
- * accepts. The qwen3.8-max family takes the tiered `reasoning_effort`
7416
- * directly; older qwen hybrid models expose only the on/off
7417
- * `enable_thinking` switch, so the effort ladder collapses to on/off
7418
- * there. Gated to qwen-family wire models (mirroring the pipeline's
7419
- * disable gate) so the qwen-specific fields never leak to a non-qwen
7420
- * model sharing the DashScope endpoint.
6866
+ * @param {string | undefined} [opts.apiVersion=process.env['OPENAI_API_VERSION'] ?? undefined]
6867
+ * @param {string | undefined} [opts.endpoint=process.env['AZURE_OPENAI_ENDPOINT'] ?? undefined] - Your Azure endpoint, including the resource, e.g. `https://example-resource.azure.openai.com/`
6868
+ * @param {string | undefined} [opts.apiKey=process.env['AZURE_OPENAI_API_KEY'] ?? undefined]
6869
+ * @param {string | undefined} opts.deployment - A model deployment, if given, sets the base client URL to include `/deployments/{deployment}`.
6870
+ * @param {string | null | undefined} [opts.organization=process.env['OPENAI_ORG_ID'] ?? null]
6871
+ * @param {string} [opts.baseURL=process.env['OPENAI_BASE_URL']] - Sets the base URL for the API, e.g. `https://example-resource.azure.openai.com/openai/`.
6872
+ * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
6873
+ * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
6874
+ * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
6875
+ * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
6876
+ * @param {Headers} opts.defaultHeaders - Default headers to include with every request to the API.
6877
+ * @param {DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
6878
+ * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
7421
6879
  */
7422
- buildQwenEffortConfig(model) {
7423
- const reasoning = this.contentGeneratorConfig.reasoning;
7424
- if (!reasoning || reasoning.effort === void 0) {
7425
- return {};
6880
+ constructor({ baseURL = readEnv("OPENAI_BASE_URL"), apiKey = readEnv("AZURE_OPENAI_API_KEY"), apiVersion = readEnv("OPENAI_API_VERSION"), endpoint, deployment, azureADTokenProvider, dangerouslyAllowBrowser, ...opts } = {}) {
6881
+ if (!apiVersion) {
6882
+ throw new OpenAIError("The OPENAI_API_VERSION environment variable is missing or empty; either provide it, or instantiate the AzureOpenAI client with an apiVersion option, like new AzureOpenAI({ apiVersion: 'My API Version' }).");
7426
6883
  }
7427
- const wireModel = this.resolveWireModel(model);
7428
- if (isTieredEffortWireModel(wireModel)) {
7429
- return { reasoning_effort: this.clampTieredEffort(reasoning.effort) };
6884
+ if (typeof azureADTokenProvider === "function") {
6885
+ dangerouslyAllowBrowser = true;
7430
6886
  }
7431
- if (isQwenFamilyWireModel(wireModel)) {
7432
- return { enable_thinking: true };
6887
+ if (!azureADTokenProvider && !apiKey) {
6888
+ throw new OpenAIError("Missing credentials. Please pass one of `apiKey` and `azureADTokenProvider`, or set the `AZURE_OPENAI_API_KEY` environment variable.");
7433
6889
  }
7434
- return {};
7435
- }
7436
- /**
7437
- * Cap a configured tier at what the qwen3.8-max family actually accepts.
7438
- * This family does not take `max`, and the rejection is a 400 on every
7439
- * subsequent request rather than a one-off, so the tier is clamped to the
7440
- * strongest supported tier and reported once. Only the
7441
- * configured `reasoning.effort` passes through here: an explicit
7442
- * `extra_body` / `samplingParams` `reasoning_effort` is a documented
7443
- * verbatim override and is merged after this, so it still ships unchanged.
7444
- */
7445
- clampTieredEffort(effort) {
7446
- const clamped = clampReasoningEffort(effort, DASHSCOPE_TIERED_EFFORTS);
7447
- if (clamped !== effort && !this.effortClampWarned) {
7448
- debugLogger2.warn(
7449
- `reasoning.effort='${effort}' is not accepted by the DashScope tiered-effort family; using '${clamped}'.`
7450
- );
7451
- this.effortClampWarned = true;
7452
- }
7453
- return clamped;
7454
- }
7455
- /**
7456
- * Resolve thinking knobs that conflict with a shipping `reasoning_effort`.
7457
- * Preset extra_body injects `enable_thinking` for models declared with
7458
- * enableThinking (provider-config.ts), and user extra_body merges last.
7459
- * Only the qwen3.8-max family reads `reasoning_effort` itself — there an
7460
- * effort tier ships alone: an `enable_thinking: true` alongside an effort
7461
- * tier is a second competing knob (the shape the nested-`reasoning` strip
7462
- * in buildRequest exists to prevent), and DashScope rejects
7463
- * `reasoning_effort` combined with `thinking_budget`. The `'none'`
7464
- * disable and a winning `thinking_budget` intentionally keep a co-present
7465
- * `enable_thinking: true`. Explicit same-layer effort/budget pairs retain
7466
- * reasoning_effort, matching the provider's behavior before cross-layer
7467
- * resolution. An explicit `enable_thinking: false` is the documented
7468
- * extra_body escape hatch winning over the config tier, so it is honoured
7469
- * as the family's canonical disable (`reasoning_effort: 'none'`, preserved
7470
- * by the pipeline's disable strip) rather than silently deleted; a
7471
- * higher-priority `enable_thinking: true` conversely keeps the shipping
7472
- * tier. Older qwen
7473
- * hybrids read `enable_thinking` / `thinking_budget`, not
7474
- * `reasoning_effort`, so when an opaque reasoning_effort override
7475
- * conflicts with a meaningful thinking_budget the inert field goes and
7476
- * the knobs the model reads survive. Non-qwen models treat
7477
- * `reasoning_effort` as an opaque sampling override and keep every knob.
7478
- */
7479
- dropConflictingThinkingKnobs(model, merged, selectedThinkingKnob) {
7480
- const wireModel = this.resolveWireModel(model);
7481
- if (!isQwenFamilyWireModel(wireModel)) {
7482
- return [];
6890
+ if (azureADTokenProvider && apiKey) {
6891
+ throw new OpenAIError("The `apiKey` and `azureADTokenProvider` arguments are mutually exclusive; only one can be passed at a time.");
7483
6892
  }
7484
- const isTieredEffortModel = isTieredEffortWireModel(wireModel);
7485
- if (isTieredEffortModel && selectedThinkingKnob?.field === "enable_thinking" && selectedThinkingKnob.value === false) {
7486
- merged["reasoning_effort"] = "none";
7487
- const dropped = ["enable_thinking"];
7488
- if (merged["thinking_budget"] !== void 0) {
7489
- dropped.push("thinking_budget");
6893
+ apiKey ?? (apiKey = API_KEY_SENTINEL);
6894
+ opts.defaultQuery = { ...opts.defaultQuery, "api-version": apiVersion };
6895
+ if (!baseURL) {
6896
+ if (!endpoint) {
6897
+ endpoint = process.env["AZURE_OPENAI_ENDPOINT"];
7490
6898
  }
7491
- for (const key of dropped) {
7492
- delete merged[key];
6899
+ if (!endpoint) {
6900
+ throw new OpenAIError("Must provide one of the `baseURL` or `endpoint` arguments, or the `AZURE_OPENAI_ENDPOINT` environment variable");
7493
6901
  }
7494
- return dropped;
7495
- }
7496
- const effort = merged["reasoning_effort"];
7497
- if (typeof effort !== "string") {
7498
- return [];
7499
- }
7500
- if (isTieredEffortModel && effort === "none") {
7501
- if (merged["thinking_budget"] === void 0) {
7502
- return [];
7503
- }
7504
- delete merged["thinking_budget"];
7505
- return ["thinking_budget"];
7506
- }
7507
- if (isTieredEffortModel) {
7508
- if (selectedThinkingKnob?.field === "reasoning_effort" && "enable_thinking" in merged) {
7509
- delete merged["enable_thinking"];
7510
- return ["enable_thinking"];
6902
+ baseURL = `${endpoint}/openai`;
6903
+ } else {
6904
+ if (endpoint) {
6905
+ throw new OpenAIError("baseURL and endpoint are mutually exclusive");
7511
6906
  }
7512
- return [];
7513
- }
7514
- if (merged["thinking_budget"] === void 0) {
7515
- return [];
7516
- }
7517
- delete merged["reasoning_effort"];
7518
- return ["reasoning_effort"];
7519
- }
7520
- warnConflictingKnobDrop(model, reasoningEffort, dropped) {
7521
- if (dropped.length === 0) {
7522
- return;
7523
- }
7524
- if (!this.conflictingKnobDropWarned) {
7525
- this.conflictingKnobDropWarned = true;
7526
- debugLogger2.warn("DashScope: dropped conflicting thinking knobs", {
7527
- model: this.resolveWireModel(model),
7528
- reasoningEffort,
7529
- dropped
7530
- });
7531
6907
  }
6908
+ super({
6909
+ apiKey,
6910
+ baseURL,
6911
+ ...opts,
6912
+ ...dangerouslyAllowBrowser !== void 0 ? { dangerouslyAllowBrowser } : {}
6913
+ });
6914
+ this.apiVersion = "";
6915
+ this._azureADTokenProvider = azureADTokenProvider;
6916
+ this.apiVersion = apiVersion;
6917
+ this.deploymentName = deployment;
7532
6918
  }
7533
- conflictingKnobDropWarned = false;
7534
- buildMetadata(userPromptId) {
7535
- const channel = this.cliConfig.getChannel?.();
7536
- return {
7537
- metadata: {
7538
- sessionId: this.cliConfig.getSessionId?.(),
7539
- promptId: userPromptId,
7540
- ...channel ? { channel } : {}
6919
+ async buildRequest(options, props = {}) {
6920
+ if (_deployments_endpoints.has(options.path) && options.method === "post" && options.body !== void 0) {
6921
+ if (!isObj(options.body)) {
6922
+ throw new Error("Expected request body to be an object");
7541
6923
  }
7542
- };
7543
- }
7544
- getDefaultGenerationConfig() {
7545
- return {};
7546
- }
7547
- /**
7548
- * Add cache control flag to specified message(s) for DashScope providers
7549
- */
7550
- addDashScopeCacheControl(request, cacheControl) {
7551
- const messages = request.messages;
7552
- const systemIndex = messages.findIndex((msg) => msg.role === "system");
7553
- const lastIndex = messages.length - 1;
7554
- const updatedMessages = messages.length === 0 ? messages : messages.map((message, index) => {
7555
- const shouldAddCacheControl = Boolean(
7556
- index === systemIndex && systemIndex !== -1 || index === lastIndex && cacheControl === "all"
7557
- );
7558
- if (!shouldAddCacheControl || !("content" in message) || message.content === null || message.content === void 0) {
7559
- return message;
6924
+ const model = this.deploymentName || options.body["model"] || options.__metadata?.["model"];
6925
+ if (model !== void 0 && !this.baseURL.includes("/deployments")) {
6926
+ options.path = `/deployments/${model}${options.path}`;
7560
6927
  }
7561
- return {
7562
- ...message,
7563
- content: this.addCacheControlToContent(message.content)
7564
- };
7565
- });
7566
- const updatedTools = cacheControl === "all" && request.tools?.length ? this.addCacheControlToTools(request.tools) : request.tools;
7567
- return {
7568
- messages: updatedMessages,
7569
- tools: updatedTools
7570
- };
7571
- }
7572
- addCacheControlToTools(tools) {
7573
- if (tools.length === 0) {
7574
- return tools;
7575
- }
7576
- const updatedTools = [...tools];
7577
- const lastToolIndex = tools.length - 1;
7578
- updatedTools[lastToolIndex] = {
7579
- ...updatedTools[lastToolIndex],
7580
- cache_control: { type: "ephemeral" }
7581
- };
7582
- return updatedTools;
7583
- }
7584
- /**
7585
- * Add cache control to message content, handling both string and array formats
7586
- */
7587
- addCacheControlToContent(content) {
7588
- const contentArray = this.normalizeContentToArray(content);
7589
- return this.addCacheControlToContentArray(contentArray);
7590
- }
7591
- /**
7592
- * Normalize content to array format
7593
- */
7594
- normalizeContentToArray(content) {
7595
- if (typeof content === "string") {
7596
- return [
7597
- {
7598
- type: "text",
7599
- text: content
7600
- }
7601
- ];
7602
6928
  }
7603
- return [...content];
6929
+ return super.buildRequest(options, props);
7604
6930
  }
7605
- /**
7606
- * Add cache control to the content array
7607
- */
7608
- addCacheControlToContentArray(contentArray) {
7609
- if (contentArray.length === 0) {
7610
- return contentArray;
7611
- }
7612
- const lastItem = contentArray[contentArray.length - 1];
7613
- contentArray[contentArray.length - 1] = {
7614
- ...lastItem,
7615
- cache_control: { type: "ephemeral" }
7616
- };
7617
- return contentArray;
7618
- }
7619
- /**
7620
- * True for glm-* models (e.g. glm-4.5, glm-5.2). Uses the same `^glm-` prefix
7621
- * convention as the GLM matchers in tokenLimits.ts, keeping model detection
7622
- * consistent across the codebase.
7623
- */
7624
- isGlmModel(model) {
7625
- return !!model && model.toLowerCase().startsWith("glm-");
7626
- }
7627
- /**
7628
- * Whether the request is in "function-calling mode" — it declares `tools`, or
7629
- * its history already contains a tool result / assistant tool_call. glm needs
7630
- * one of these present to parse structured content-part arrays.
7631
- */
7632
- hasFunctionCallingContext(request) {
7633
- if (request.tools && request.tools.length > 0) {
7634
- return true;
7635
- }
7636
- return request.messages.some((message) => {
7637
- if (message.role === "tool") {
7638
- return true;
7639
- }
7640
- if (message.role === "assistant") {
7641
- const toolCalls = message.tool_calls;
7642
- return Array.isArray(toolCalls) && toolCalls.length > 0;
6931
+ async _getAzureADToken() {
6932
+ if (typeof this._azureADTokenProvider === "function") {
6933
+ const token = await this._azureADTokenProvider();
6934
+ if (!token || typeof token !== "string") {
6935
+ throw new OpenAIError(`Expected 'azureADTokenProvider' argument to return a string but it returned ${token}`);
7643
6936
  }
7644
- return false;
7645
- });
6937
+ return token;
6938
+ }
6939
+ return void 0;
7646
6940
  }
7647
- /**
7648
- * Collapse text-only content arrays back to a plain string, leaving
7649
- * media-bearing parts (image/audio/...) as arrays. Used for glm tool-less
7650
- * requests, where the array form would otherwise be dropped server-side.
7651
- * Multiple text parts are joined with a blank line, matching the DeepSeek
7652
- * provider's flattening (separate parts read as separate blocks).
7653
- * Only called on the flatten branch, which skips cache control, so no part
7654
- * here carries a `cache_control` marker.
7655
- */
7656
- flattenTextContent(messages) {
7657
- return messages.map((message) => {
7658
- if (!("content" in message) || !Array.isArray(message.content)) {
7659
- return message;
7660
- }
7661
- const parts = message.content;
7662
- if (parts.length === 0) {
7663
- return message;
7664
- }
7665
- const isTextOnly = parts.every((part) => part && part.type === "text");
7666
- if (!isTextOnly) {
7667
- return message;
7668
- }
7669
- const text = parts.map((part) => part.text ?? "").join("\n\n");
7670
- return {
7671
- ...message,
7672
- content: text
7673
- };
7674
- });
6941
+ async authHeaders(opts) {
6942
+ return;
7675
6943
  }
7676
- /**
7677
- * Vision-capable model patterns.
7678
- * Supports exact matches and prefix patterns for easy extension.
7679
- */
7680
- static VISION_MODEL_EXACT_MATCHES = /* @__PURE__ */ new Set(["coder-model"]);
7681
- static VISION_MODEL_PREFIX_PATTERNS = [
7682
- "qwen-vl",
7683
- // qwen-vl-max, qwen-vl-max-latest, etc.
7684
- "qwen3-vl-plus",
7685
- // qwen3-vl-plus variants
7686
- "qwen3.5-plus",
7687
- // qwen3.5-plus (has built-in vision capabilities)
7688
- "qwen3.6-plus",
7689
- // qwen3.6-plus (multimodal)
7690
- "qwen3.7-plus"
7691
- // qwen3.7-plus (multimodal)
7692
- ];
7693
- isVisionModel(model) {
7694
- if (!model) {
7695
- return false;
6944
+ async prepareOptions(opts) {
6945
+ opts.headers = buildHeaders([opts.headers]);
6946
+ if (opts.headers.values.get("Authorization") || opts.headers.values.get("api-key")) {
6947
+ return super.prepareOptions(opts);
7696
6948
  }
7697
- const normalized = model.toLowerCase();
7698
- if (_DashScopeOpenAICompatibleProvider.VISION_MODEL_EXACT_MATCHES.has(
7699
- normalized
7700
- )) {
7701
- return true;
7702
- }
7703
- for (const prefix of _DashScopeOpenAICompatibleProvider.VISION_MODEL_PREFIX_PATTERNS) {
7704
- if (normalized.startsWith(prefix)) {
7705
- return true;
7706
- }
6949
+ const token = await this._getAzureADToken();
6950
+ if (token) {
6951
+ opts.headers.values.set("Authorization", `Bearer ${token}`);
6952
+ } else if (this.apiKey !== API_KEY_SENTINEL) {
6953
+ opts.headers.values.set("api-key", this.apiKey);
6954
+ } else {
6955
+ throw new OpenAIError("Unable to handle auth");
7707
6956
  }
7708
- return false;
7709
- }
7710
- /**
7711
- * Check if cache control should be disabled based on configuration.
7712
- *
7713
- * @returns true if cache control should be enabled, false otherwise
7714
- */
7715
- shouldEnableCacheControl() {
7716
- return this.cliConfig.getContentGeneratorConfig()?.enableCacheControl !== false;
6957
+ return super.prepareOptions(opts);
7717
6958
  }
7718
6959
  };
6960
+ var _deployments_endpoints = /* @__PURE__ */ new Set([
6961
+ "/completions",
6962
+ "/chat/completions",
6963
+ "/embeddings",
6964
+ "/audio/transcriptions",
6965
+ "/audio/translations",
6966
+ "/audio/speech",
6967
+ "/images/generations",
6968
+ "/batches",
6969
+ "/images/edits"
6970
+ ]);
6971
+ var API_KEY_SENTINEL = "<Missing Key>";
7719
6972
 
7720
6973
  export {
6974
+ OpenAIError,
6975
+ APIError,
6976
+ APIUserAbortError,
6977
+ APIConnectionError,
6978
+ APIConnectionTimeoutError,
6979
+ BadRequestError,
6980
+ AuthenticationError,
6981
+ PermissionDeniedError,
6982
+ NotFoundError,
6983
+ ConflictError,
6984
+ UnprocessableEntityError,
6985
+ RateLimitError,
6986
+ InternalServerError,
6987
+ InvalidWebhookSignatureError,
6988
+ APIPromise,
6989
+ PagePromise,
6990
+ toFile,
7721
6991
  OpenAI,
7722
- DefaultOpenAICompatibleProvider,
7723
- selectDashScopeThinkingKnob,
7724
- DASHSCOPE_REGIONAL_HOSTS,
7725
- DashScopeOpenAICompatibleProvider
6992
+ AzureOpenAI
7726
6993
  };