@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
@@ -0,0 +1,1411 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ init_esbuild_shims
5
+ } from "./chunk-5O2XNYP6.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-J2S4EL5Y.js";
9
+
10
+ // packages/core/src/providers/provider-config.ts
11
+ init_esbuild_shims();
12
+ import { createHash } from "node:crypto";
13
+ function resolveEnvKey(config, inputs) {
14
+ const protocol = inputs.protocol ?? config.protocol;
15
+ return typeof config.envKey === "function" ? config.envKey(protocol, inputs.baseUrl) : config.envKey;
16
+ }
17
+ __name(resolveEnvKey, "resolveEnvKey");
18
+ function resolveModelNamePrefix(config, baseUrl) {
19
+ return typeof config.modelNamePrefix === "function" ? config.modelNamePrefix(baseUrl) : config.modelNamePrefix;
20
+ }
21
+ __name(resolveModelNamePrefix, "resolveModelNamePrefix");
22
+ function resolveOwnsModel(config) {
23
+ if (config.ownsModel) return config.ownsModel;
24
+ if (typeof config.envKey !== "string" || typeof config.modelNamePrefix !== "string") {
25
+ return void 0;
26
+ }
27
+ const envKey = config.envKey;
28
+ const prefix = config.modelNamePrefix;
29
+ if (!prefix) return (model) => model.envKey === envKey;
30
+ const namePrefix = `[${prefix}] `;
31
+ return (model) => model.envKey === envKey && typeof model.name === "string" && model.name.startsWith(namePrefix);
32
+ }
33
+ __name(resolveOwnsModel, "resolveOwnsModel");
34
+ function buildGenerationConfig(spec) {
35
+ const parts = {};
36
+ let hasAny = false;
37
+ if (spec.enableThinking) {
38
+ parts.extra_body = { enable_thinking: true };
39
+ hasAny = true;
40
+ }
41
+ if (spec.thinkingMandatory) {
42
+ parts.thinkingMandatory = true;
43
+ hasAny = true;
44
+ }
45
+ if (spec.contextWindowSize) {
46
+ parts.contextWindowSize = spec.contextWindowSize;
47
+ hasAny = true;
48
+ }
49
+ if (spec.modalities && Object.values(spec.modalities).some(Boolean)) {
50
+ parts.modalities = spec.modalities;
51
+ hasAny = true;
52
+ }
53
+ return hasAny ? parts : void 0;
54
+ }
55
+ __name(buildGenerationConfig, "buildGenerationConfig");
56
+ function buildAdvancedGenerationConfig(advCfg, protocol) {
57
+ const cfg = {};
58
+ let hasAny = false;
59
+ if (advCfg?.enableThinking) {
60
+ if (protocol === "openai-responses" /* USE_OPENAI_RESPONSES */) {
61
+ cfg.reasoning = { effort: "medium" };
62
+ } else {
63
+ cfg.extra_body = { enable_thinking: true };
64
+ }
65
+ hasAny = true;
66
+ }
67
+ if (advCfg?.multimodal && Object.values(advCfg.multimodal).some(Boolean)) {
68
+ cfg.modalities = advCfg.multimodal;
69
+ hasAny = true;
70
+ }
71
+ if (advCfg?.contextWindowSize && advCfg.contextWindowSize > 0) {
72
+ cfg.contextWindowSize = advCfg.contextWindowSize;
73
+ hasAny = true;
74
+ }
75
+ if (advCfg?.maxTokens && advCfg.maxTokens > 0) {
76
+ cfg.samplingParams = { max_tokens: advCfg.maxTokens };
77
+ hasAny = true;
78
+ }
79
+ return hasAny ? cfg : void 0;
80
+ }
81
+ __name(buildAdvancedGenerationConfig, "buildAdvancedGenerationConfig");
82
+ function specToModelConfig(spec, prefix, baseUrl, envKey) {
83
+ const genConfig = buildGenerationConfig(spec);
84
+ return {
85
+ id: spec.id,
86
+ name: prefix ? `[${prefix}] ${spec.id}` : spec.id,
87
+ ...spec.description ? { description: spec.description } : {},
88
+ ...spec.capabilities ? { capabilities: spec.capabilities } : {},
89
+ baseUrl,
90
+ envKey,
91
+ ...spec.supportsImageGeneration ? { supportsImageGeneration: true } : {},
92
+ ...spec.imageOnly ? { imageOnly: true } : {},
93
+ ...genConfig ? { generationConfig: genConfig } : {}
94
+ };
95
+ }
96
+ __name(specToModelConfig, "specToModelConfig");
97
+ function applyProviderCustomHeaders(models, config) {
98
+ if (!config.customHeaders) return models;
99
+ return models.map((model) => {
100
+ const existing = model.generationConfig ?? {};
101
+ return {
102
+ ...model,
103
+ generationConfig: {
104
+ ...existing,
105
+ customHeaders: {
106
+ ...config.customHeaders,
107
+ ...existing.customHeaders
108
+ }
109
+ }
110
+ };
111
+ });
112
+ }
113
+ __name(applyProviderCustomHeaders, "applyProviderCustomHeaders");
114
+ function buildModelConfigs(config, inputs) {
115
+ const envKey = resolveEnvKey(config, inputs);
116
+ const prefix = resolveModelNamePrefix(config, inputs.baseUrl);
117
+ const protocol = inputs.protocol ?? config.protocol;
118
+ let models;
119
+ if (config.models && !config.modelsEditable) {
120
+ models = config.models.map(
121
+ (spec) => specToModelConfig(spec, prefix, inputs.baseUrl, envKey)
122
+ );
123
+ } else if (config.models && config.modelsEditable) {
124
+ const specMap = new Map(config.models.map((s) => [s.id.toLowerCase(), s]));
125
+ models = inputs.modelIds.map((id) => {
126
+ const spec = specMap.get(id.toLowerCase());
127
+ if (spec) {
128
+ return specToModelConfig(
129
+ { ...spec, id },
130
+ prefix,
131
+ inputs.baseUrl,
132
+ envKey
133
+ );
134
+ }
135
+ const genConfig = buildAdvancedGenerationConfig(
136
+ inputs.advancedConfig,
137
+ protocol
138
+ );
139
+ return {
140
+ id,
141
+ name: prefix ? `[${prefix}] ${id}` : id,
142
+ baseUrl: inputs.baseUrl,
143
+ envKey,
144
+ ...genConfig ? { generationConfig: genConfig } : {}
145
+ };
146
+ });
147
+ } else {
148
+ const advCfg = inputs.advancedConfig;
149
+ const displayName = /* @__PURE__ */ __name((id) => prefix ? `[${prefix}] ${id}` : id, "displayName");
150
+ models = inputs.modelIds.map((id) => {
151
+ const genConfig = buildAdvancedGenerationConfig(advCfg, protocol);
152
+ return {
153
+ id,
154
+ name: displayName(id),
155
+ baseUrl: inputs.baseUrl,
156
+ envKey,
157
+ ...genConfig ? { generationConfig: genConfig } : {}
158
+ };
159
+ });
160
+ }
161
+ return applyProviderCustomHeaders(models, config);
162
+ }
163
+ __name(buildModelConfigs, "buildModelConfigs");
164
+ function resolveMetadataKey(config) {
165
+ if (!config.models) return void 0;
166
+ if (config.id.includes(".")) {
167
+ throw new Error(
168
+ `Provider id must not contain '.' (would corrupt providerMetadata.${config.id} dotted writes): ${config.id}`
169
+ );
170
+ }
171
+ return config.id;
172
+ }
173
+ __name(resolveMetadataKey, "resolveMetadataKey");
174
+ var PROVIDER_METADATA_NS = "providerMetadata";
175
+ function resolveProviderState(config, baseUrl, models) {
176
+ const key = resolveMetadataKey(config);
177
+ if (key) {
178
+ return {
179
+ [`${PROVIDER_METADATA_NS}.${key}`]: {
180
+ version: computeModelListVersion(models),
181
+ baseUrl
182
+ }
183
+ };
184
+ }
185
+ return void 0;
186
+ }
187
+ __name(resolveProviderState, "resolveProviderState");
188
+ function buildInstallPlan(config, inputs) {
189
+ const protocol = inputs.protocol ?? config.protocol;
190
+ const envKey = resolveEnvKey(config, inputs);
191
+ const models = inputs.prebuiltModels ?? buildModelConfigs(config, inputs);
192
+ const ownsModel = config.mergeModelsByIdentity ? void 0 : resolveOwnsModel(config);
193
+ const firstModel = models[0];
194
+ if (models.length === 0) {
195
+ throw new Error(
196
+ `No models configured for provider "${config.id}". Check model list or provider configuration.`
197
+ );
198
+ }
199
+ const firstModelId = firstModel?.id;
200
+ const modelSelection = firstModelId === void 0 ? void 0 : {
201
+ modelId: firstModelId,
202
+ ...config.mergeModelsByIdentity && firstModel.baseUrl ? { baseUrl: firstModel.baseUrl } : {}
203
+ };
204
+ return {
205
+ providerId: config.id,
206
+ authType: protocol,
207
+ env: { [envKey]: inputs.apiKey },
208
+ ...modelSelection ? { modelSelection } : {},
209
+ modelProviders: [
210
+ {
211
+ authType: protocol,
212
+ models,
213
+ mergeStrategy: "prepend-and-remove-owned",
214
+ ...ownsModel ? { ownsModel } : {}
215
+ }
216
+ ],
217
+ providerState: resolveProviderState(config, inputs.baseUrl, models)
218
+ };
219
+ }
220
+ __name(buildInstallPlan, "buildInstallPlan");
221
+ function computeModelListVersion(models) {
222
+ return createHash("sha256").update(JSON.stringify(models)).digest("hex");
223
+ }
224
+ __name(computeModelListVersion, "computeModelListVersion");
225
+ var DEFAULT_BASE_URLS = {
226
+ ["openai" /* USE_OPENAI */]: "https://api.openai.com/v1",
227
+ ["openai-responses" /* USE_OPENAI_RESPONSES */]: "https://api.openai.com",
228
+ ["anthropic" /* USE_ANTHROPIC */]: "https://api.anthropic.com/v1",
229
+ ["gemini" /* USE_GEMINI */]: "https://generativelanguage.googleapis.com"
230
+ };
231
+ function getDefaultBaseUrlForProtocol(protocol) {
232
+ if (protocol === void 0) return "";
233
+ return DEFAULT_BASE_URLS[protocol] ?? "";
234
+ }
235
+ __name(getDefaultBaseUrlForProtocol, "getDefaultBaseUrlForProtocol");
236
+ function resolveBaseUrl(config, selectedBaseUrl) {
237
+ if (typeof config.baseUrl === "string") {
238
+ return config.baseUrl;
239
+ }
240
+ if (Array.isArray(config.baseUrl)) {
241
+ const normalizedSelectedBaseUrl = normalizeBaseUrlForMatching(selectedBaseUrl);
242
+ const match = config.baseUrl.find(
243
+ (opt) => normalizeBaseUrlForMatching(opt.url) === normalizedSelectedBaseUrl
244
+ );
245
+ if (match) return match.url;
246
+ return config.baseUrl[0]?.url ?? selectedBaseUrl ?? "";
247
+ }
248
+ return selectedBaseUrl ?? "";
249
+ }
250
+ __name(resolveBaseUrl, "resolveBaseUrl");
251
+ function normalizeBaseUrlForMatching(baseUrl) {
252
+ if (baseUrl === void 0) return "";
253
+ let end = baseUrl.length;
254
+ while (end > 0 && baseUrl.charCodeAt(end - 1) === 47) {
255
+ end--;
256
+ }
257
+ return end === baseUrl.length ? baseUrl : baseUrl.slice(0, end);
258
+ }
259
+ __name(normalizeBaseUrlForMatching, "normalizeBaseUrlForMatching");
260
+ function getDefaultModelIds(config) {
261
+ return config.models?.map((s) => s.id) ?? [];
262
+ }
263
+ __name(getDefaultModelIds, "getDefaultModelIds");
264
+ function isProviderModelConfig(value) {
265
+ return typeof value === "object" && value !== null && typeof value.id === "string";
266
+ }
267
+ __name(isProviderModelConfig, "isProviderModelConfig");
268
+ function findExistingProviderModels(config, modelProviders) {
269
+ const ownsModel = resolveOwnsModel(config);
270
+ if (!ownsModel || !modelProviders) return void 0;
271
+ const protocols = config.protocolOptions?.length ? config.protocolOptions : [config.protocol];
272
+ for (const protocol of protocols) {
273
+ const raw = modelProviders[protocol];
274
+ if (!Array.isArray(raw)) continue;
275
+ const models = raw.filter(
276
+ (m) => isProviderModelConfig(m) && ownsModel(m)
277
+ );
278
+ if (models.length > 0) return { protocol, models };
279
+ }
280
+ return void 0;
281
+ }
282
+ __name(findExistingProviderModels, "findExistingProviderModels");
283
+ function shouldShowStep(config, step) {
284
+ switch (step) {
285
+ case "protocol":
286
+ return Array.isArray(config.protocolOptions) && config.protocolOptions.length > 1;
287
+ case "baseUrl":
288
+ return config.baseUrl === void 0 || Array.isArray(config.baseUrl);
289
+ case "apiKey":
290
+ return true;
291
+ case "models":
292
+ return !config.models || config.modelsEditable === true;
293
+ case "advancedConfig":
294
+ return config.showAdvancedConfig === true;
295
+ default:
296
+ return false;
297
+ }
298
+ }
299
+ __name(shouldShowStep, "shouldShowStep");
300
+ function providerMatchesCredentials(config, baseUrl, envKey) {
301
+ let configEnvKey;
302
+ if (typeof config.envKey === "string") {
303
+ configEnvKey = config.envKey;
304
+ } else if (typeof config.envKey === "function" && baseUrl) {
305
+ const protocols = config.protocolOptions?.length ? config.protocolOptions : [config.protocol];
306
+ for (const proto of protocols) {
307
+ try {
308
+ const derived = config.envKey(proto, baseUrl);
309
+ if (derived === envKey) {
310
+ configEnvKey = derived;
311
+ break;
312
+ }
313
+ } catch (err) {
314
+ let safeHost;
315
+ try {
316
+ safeHost = new URL(baseUrl).hostname;
317
+ } catch {
318
+ safeHost = "[invalid]";
319
+ }
320
+ console.warn(
321
+ `[providerMatchesCredentials] envKey(${proto}, ${safeHost}) threw (${err instanceof Error ? err.constructor.name : typeof err}); skipping this protocol`
322
+ );
323
+ }
324
+ }
325
+ }
326
+ if (configEnvKey !== envKey) {
327
+ return false;
328
+ }
329
+ if (typeof config.baseUrl === "string") {
330
+ return config.baseUrl === baseUrl;
331
+ }
332
+ if (Array.isArray(config.baseUrl)) {
333
+ return config.baseUrl.some((opt) => opt.url === baseUrl);
334
+ }
335
+ if (config.baseUrl === void 0 && configEnvKey !== void 0) {
336
+ return Boolean(baseUrl);
337
+ }
338
+ return false;
339
+ }
340
+ __name(providerMatchesCredentials, "providerMatchesCredentials");
341
+ function buildProviderTemplate(config, baseUrl) {
342
+ const resolved = resolveBaseUrl(config, baseUrl);
343
+ return buildModelConfigs(config, {
344
+ baseUrl: resolved,
345
+ apiKey: "",
346
+ modelIds: getDefaultModelIds(config)
347
+ });
348
+ }
349
+ __name(buildProviderTemplate, "buildProviderTemplate");
350
+
351
+ // packages/core/src/providers/all-providers.ts
352
+ init_esbuild_shims();
353
+
354
+ // packages/core/src/providers/presets/alibaba-coding-plan.ts
355
+ init_esbuild_shims();
356
+ var CODING_PLAN_ENV_KEY = "BAILIAN_CODING_PLAN_API_KEY";
357
+ var CODING_PLAN_CHINA_BASE_URL = "https://coding.dashscope.aliyuncs.com/v1";
358
+ var CODING_PLAN_GLOBAL_BASE_URL = "https://coding-intl.dashscope.aliyuncs.com/v1";
359
+ var MODELSTUDIO_MODELS = [
360
+ {
361
+ id: "qwen3.5-plus",
362
+ capabilities: {
363
+ reasoning: {
364
+ thinking: true,
365
+ toggleOnly: true,
366
+ disableField: "enable_thinking"
367
+ }
368
+ },
369
+ contextWindowSize: 1e6,
370
+ enableThinking: true,
371
+ modalities: { image: true, video: true }
372
+ },
373
+ {
374
+ id: "qwen3.6-plus",
375
+ capabilities: {
376
+ reasoning: {
377
+ thinking: true,
378
+ toggleOnly: true,
379
+ disableField: "enable_thinking"
380
+ }
381
+ },
382
+ description: "Currently available to Pro subscribers only.",
383
+ contextWindowSize: 1e6,
384
+ enableThinking: true,
385
+ modalities: { image: true, video: true }
386
+ },
387
+ {
388
+ id: "qwen3.7-plus",
389
+ capabilities: {
390
+ reasoning: {
391
+ thinking: true,
392
+ toggleOnly: true,
393
+ disableField: "enable_thinking"
394
+ }
395
+ },
396
+ contextWindowSize: 1e6,
397
+ enableThinking: true
398
+ },
399
+ { id: "glm-5", contextWindowSize: 202752, enableThinking: true },
400
+ {
401
+ id: "kimi-k2.5",
402
+ capabilities: {
403
+ reasoning: {
404
+ thinking: true,
405
+ toggleOnly: true,
406
+ disableField: "enable_thinking"
407
+ }
408
+ },
409
+ contextWindowSize: 262144,
410
+ enableThinking: true,
411
+ modalities: { image: true, video: true }
412
+ },
413
+ { id: "MiniMax-M2.5", contextWindowSize: 196608, enableThinking: true },
414
+ { id: "qwen3-coder-plus", contextWindowSize: 1e6 },
415
+ { id: "qwen3-coder-next", contextWindowSize: 262144 },
416
+ {
417
+ id: "qwen3-max-2026-01-23",
418
+ capabilities: {
419
+ reasoning: {
420
+ thinking: true,
421
+ toggleOnly: true,
422
+ disableField: "enable_thinking"
423
+ }
424
+ },
425
+ contextWindowSize: 262144,
426
+ enableThinking: true
427
+ },
428
+ { id: "glm-4.7", contextWindowSize: 202752, enableThinking: true }
429
+ ];
430
+ var codingPlanProvider = {
431
+ id: "coding-plan",
432
+ label: "Coding Plan",
433
+ description: "For individual developers \xB7 Weekly quota included",
434
+ protocol: "openai" /* USE_OPENAI */,
435
+ baseUrl: [
436
+ {
437
+ id: "aliyun",
438
+ label: "China (Beijing)",
439
+ url: CODING_PLAN_CHINA_BASE_URL,
440
+ documentationUrl: "https://help.aliyun.com/zh/model-studio/coding-plan"
441
+ },
442
+ {
443
+ id: "alibabacloud",
444
+ label: "Singapore (International)",
445
+ url: CODING_PLAN_GLOBAL_BASE_URL,
446
+ documentationUrl: "https://www.alibabacloud.com/help/en/model-studio/coding-plan"
447
+ }
448
+ ],
449
+ envKey: CODING_PLAN_ENV_KEY,
450
+ models: MODELSTUDIO_MODELS,
451
+ modelsEditable: true,
452
+ supportsModelDiscovery: true,
453
+ modelNamePrefix: /* @__PURE__ */ __name((baseUrl) => baseUrl === CODING_PLAN_GLOBAL_BASE_URL ? "ModelStudio Coding Plan for Global/Intl" : "ModelStudio Coding Plan", "modelNamePrefix"),
454
+ apiKeyPlaceholder: "sk-sp-...",
455
+ validateApiKey: /* @__PURE__ */ __name((key) => !key.startsWith("sk-sp-") ? 'Invalid API key. Coding Plan API keys start with "sk-sp-". Please check.' : null, "validateApiKey"),
456
+ ownsModel: /* @__PURE__ */ __name((model) => model.envKey === CODING_PLAN_ENV_KEY && typeof model.baseUrl === "string" && (model.baseUrl === CODING_PLAN_CHINA_BASE_URL || model.baseUrl === CODING_PLAN_GLOBAL_BASE_URL), "ownsModel"),
457
+ uiGroup: "alibaba",
458
+ uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
459
+ };
460
+
461
+ // packages/core/src/providers/presets/alibaba-token-plan.ts
462
+ init_esbuild_shims();
463
+ var TOKEN_PLAN_ENV_KEY = "BAILIAN_TOKEN_PLAN_API_KEY";
464
+ var TOKEN_PLAN_CHINA_BASE_URL = "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1";
465
+ var TOKEN_PLAN_GLOBAL_BASE_URL = "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1";
466
+ var TOKEN_PLAN_MODELS = [
467
+ {
468
+ id: "qwen3.7-plus",
469
+ capabilities: {
470
+ reasoning: {
471
+ thinking: true,
472
+ toggleOnly: true,
473
+ disableField: "enable_thinking"
474
+ }
475
+ },
476
+ contextWindowSize: 1e6,
477
+ enableThinking: true,
478
+ modalities: { image: true, video: true }
479
+ },
480
+ {
481
+ id: "qwen3.6-plus",
482
+ capabilities: {
483
+ reasoning: {
484
+ thinking: true,
485
+ toggleOnly: true,
486
+ disableField: "enable_thinking"
487
+ }
488
+ },
489
+ contextWindowSize: 1e6,
490
+ enableThinking: true,
491
+ modalities: { image: true, video: true }
492
+ },
493
+ {
494
+ id: "qwen3.7-max",
495
+ capabilities: {
496
+ reasoning: {
497
+ thinking: true,
498
+ toggleOnly: true,
499
+ disableField: "enable_thinking"
500
+ }
501
+ },
502
+ contextWindowSize: 1e6,
503
+ enableThinking: true
504
+ },
505
+ {
506
+ id: "qwen3.8-max",
507
+ capabilities: {
508
+ reasoning: {
509
+ thinking: true,
510
+ efforts: ["low", "medium", "xhigh"],
511
+ defaultEffort: "xhigh",
512
+ canDisable: false,
513
+ disableField: "reasoning_effort"
514
+ }
515
+ },
516
+ contextWindowSize: 1e6,
517
+ enableThinking: true,
518
+ thinkingMandatory: true,
519
+ modalities: { image: true, video: true }
520
+ },
521
+ {
522
+ id: "qwen3.8-max-preview",
523
+ capabilities: {
524
+ reasoning: {
525
+ thinking: true,
526
+ efforts: ["low", "medium", "xhigh"],
527
+ defaultEffort: "xhigh",
528
+ canDisable: false,
529
+ disableField: "reasoning_effort"
530
+ }
531
+ },
532
+ contextWindowSize: 1e6,
533
+ enableThinking: true,
534
+ thinkingMandatory: true,
535
+ modalities: { image: true, video: true }
536
+ },
537
+ {
538
+ id: "qwen3.6-flash",
539
+ capabilities: {
540
+ reasoning: {
541
+ thinking: true,
542
+ toggleOnly: true,
543
+ disableField: "enable_thinking"
544
+ }
545
+ },
546
+ contextWindowSize: 1e6,
547
+ enableThinking: true
548
+ },
549
+ {
550
+ id: "deepseek-v4-pro",
551
+ capabilities: {
552
+ reasoning: {
553
+ thinking: true,
554
+ efforts: ["high", "max"],
555
+ defaultEffort: "high",
556
+ disableField: "enable_thinking"
557
+ }
558
+ },
559
+ contextWindowSize: 1e6
560
+ },
561
+ {
562
+ id: "deepseek-v4-flash-0731",
563
+ capabilities: {
564
+ reasoning: {
565
+ thinking: true,
566
+ efforts: ["low", "high", "max"],
567
+ defaultEffort: "high",
568
+ disableField: "enable_thinking"
569
+ }
570
+ },
571
+ contextWindowSize: 1e6
572
+ },
573
+ {
574
+ id: "deepseek-v3.2",
575
+ capabilities: {
576
+ reasoning: {
577
+ thinking: true,
578
+ toggleOnly: true,
579
+ disableField: "enable_thinking"
580
+ }
581
+ },
582
+ contextWindowSize: 131072
583
+ },
584
+ {
585
+ id: "kimi-k2.7-code",
586
+ capabilities: {
587
+ reasoning: {
588
+ thinking: true,
589
+ toggleOnly: true,
590
+ canDisable: false,
591
+ disableField: "enable_thinking"
592
+ }
593
+ },
594
+ contextWindowSize: 262144,
595
+ enableThinking: true,
596
+ modalities: { image: true, video: true },
597
+ thinkingMandatory: true
598
+ },
599
+ {
600
+ id: "kimi-k2.6",
601
+ capabilities: {
602
+ reasoning: {
603
+ thinking: true,
604
+ toggleOnly: true,
605
+ disableField: "enable_thinking"
606
+ }
607
+ },
608
+ contextWindowSize: 262144,
609
+ enableThinking: true
610
+ },
611
+ {
612
+ id: "kimi-k2.5",
613
+ capabilities: {
614
+ reasoning: {
615
+ thinking: true,
616
+ toggleOnly: true,
617
+ disableField: "enable_thinking"
618
+ }
619
+ },
620
+ contextWindowSize: 262144,
621
+ enableThinking: true,
622
+ modalities: { image: true, video: true }
623
+ },
624
+ { id: "glm-5.2", contextWindowSize: 1e6, enableThinking: true },
625
+ { id: "glm-5.1", contextWindowSize: 202752, enableThinking: true },
626
+ { id: "glm-5", contextWindowSize: 202752, enableThinking: true },
627
+ { id: "MiniMax-M2.5", contextWindowSize: 196608 },
628
+ {
629
+ id: "qwen3.8-flash",
630
+ contextWindowSize: 1e6,
631
+ capabilities: {
632
+ reasoning: {
633
+ thinking: true,
634
+ efforts: ["low", "medium", "xhigh"],
635
+ defaultEffort: "xhigh",
636
+ disableField: "reasoning_effort"
637
+ }
638
+ },
639
+ modalities: { image: true, video: true }
640
+ },
641
+ {
642
+ id: "deepseek-v4-pro-0813",
643
+ contextWindowSize: 1e6,
644
+ capabilities: {
645
+ reasoning: {
646
+ thinking: true,
647
+ efforts: ["low", "high", "max"],
648
+ defaultEffort: "high",
649
+ disableField: "enable_thinking"
650
+ }
651
+ }
652
+ }
653
+ ];
654
+ var tokenPlanProvider = {
655
+ id: "token-plan",
656
+ label: "Token Plan",
657
+ description: "For teams and companies \xB7 Usage-based billing with dedicated endpoint",
658
+ protocol: "openai" /* USE_OPENAI */,
659
+ baseUrl: [
660
+ {
661
+ id: "cn-beijing",
662
+ label: "China (Beijing)",
663
+ url: TOKEN_PLAN_CHINA_BASE_URL,
664
+ documentationUrl: "https://bailian.console.aliyun.com/cn-beijing?tab=doc#/doc/?type=model&url=3028856"
665
+ },
666
+ {
667
+ id: "ap-southeast-1",
668
+ label: "Singapore (International)",
669
+ url: TOKEN_PLAN_GLOBAL_BASE_URL,
670
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model"
671
+ }
672
+ ],
673
+ envKey: TOKEN_PLAN_ENV_KEY,
674
+ models: TOKEN_PLAN_MODELS,
675
+ modelsEditable: true,
676
+ supportsModelDiscovery: true,
677
+ modelNamePrefix: /* @__PURE__ */ __name((baseUrl) => baseUrl === TOKEN_PLAN_GLOBAL_BASE_URL ? "ModelStudio Token Plan for Global/Intl" : "ModelStudio Token Plan", "modelNamePrefix"),
678
+ ownsModel: /* @__PURE__ */ __name((model) => model.envKey === TOKEN_PLAN_ENV_KEY && (typeof model.baseUrl === "string" && (model.baseUrl === TOKEN_PLAN_CHINA_BASE_URL || model.baseUrl === TOKEN_PLAN_GLOBAL_BASE_URL) || typeof model.name === "string" && model.name.startsWith("[ModelStudio Token Plan]")), "ownsModel"),
679
+ // Same server-side search tools as the Standard endpoints, billed against
680
+ // the plan's quota (probe 2026-09-08: `web_search` + `web_extractor` both
681
+ // execute and are reported under `usage.x_tools`).
682
+ webSearch: { backend: "dashscope" },
683
+ uiGroup: "alibaba",
684
+ uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
685
+ };
686
+
687
+ // packages/core/src/providers/presets/alibaba-standard.ts
688
+ init_esbuild_shims();
689
+ var alibabaStandardProvider = {
690
+ id: "alibabaStandard",
691
+ label: "Standard API Key",
692
+ description: "Connect with an existing ModelStudio API key",
693
+ protocol: "openai" /* USE_OPENAI */,
694
+ baseUrl: [
695
+ {
696
+ id: "cn-beijing",
697
+ label: "China (Beijing)",
698
+ url: "https://dashscope.aliyuncs.com/compatible-mode/v1",
699
+ documentationUrl: "https://bailian.console.aliyun.com/cn-beijing?tab=api#/api"
700
+ },
701
+ {
702
+ id: "sg-singapore",
703
+ label: "Singapore",
704
+ url: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
705
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=api#/api/?type=model&url=2712195"
706
+ },
707
+ {
708
+ id: "us-virginia",
709
+ label: "US (Virginia)",
710
+ url: "https://dashscope-us.aliyuncs.com/compatible-mode/v1",
711
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/us-east-1?tab=api#/api/?type=model&url=2712195"
712
+ },
713
+ {
714
+ id: "cn-hongkong",
715
+ label: "China (Hong Kong)",
716
+ url: "https://cn-hongkong.dashscope.aliyuncs.com/compatible-mode/v1",
717
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/cn-hongkong?tab=api#/api/?type=model&url=2712195"
718
+ }
719
+ ],
720
+ envKey: "DASHSCOPE_API_KEY",
721
+ models: [
722
+ {
723
+ id: "qwen3.6-plus",
724
+ capabilities: {
725
+ reasoning: {
726
+ thinking: true,
727
+ toggleOnly: true,
728
+ disableField: "enable_thinking"
729
+ }
730
+ },
731
+ contextWindowSize: 1e6,
732
+ enableThinking: true
733
+ },
734
+ {
735
+ id: "qwen3.7-plus",
736
+ capabilities: {
737
+ reasoning: {
738
+ thinking: true,
739
+ toggleOnly: true,
740
+ disableField: "enable_thinking"
741
+ }
742
+ },
743
+ contextWindowSize: 1e6,
744
+ enableThinking: true
745
+ },
746
+ {
747
+ id: "qwen3.7-max",
748
+ capabilities: {
749
+ reasoning: {
750
+ thinking: true,
751
+ toggleOnly: true,
752
+ disableField: "enable_thinking"
753
+ }
754
+ },
755
+ contextWindowSize: 1e6,
756
+ enableThinking: true
757
+ },
758
+ { id: "glm-5.1", contextWindowSize: 202752, enableThinking: true },
759
+ {
760
+ id: "deepseek-v4-pro",
761
+ capabilities: {
762
+ reasoning: {
763
+ thinking: true,
764
+ efforts: ["high", "max"],
765
+ defaultEffort: "high",
766
+ disableField: "enable_thinking"
767
+ }
768
+ },
769
+ contextWindowSize: 1e6
770
+ },
771
+ {
772
+ id: "deepseek-v4-flash",
773
+ capabilities: {
774
+ reasoning: {
775
+ thinking: true,
776
+ efforts: ["high", "max"],
777
+ defaultEffort: "high",
778
+ disableField: "enable_thinking"
779
+ }
780
+ },
781
+ contextWindowSize: 1e6
782
+ },
783
+ {
784
+ id: "qwen3.8-max",
785
+ contextWindowSize: 1e6,
786
+ capabilities: {
787
+ reasoning: {
788
+ thinking: true,
789
+ efforts: ["low", "medium", "xhigh"],
790
+ defaultEffort: "xhigh",
791
+ disableField: "reasoning_effort"
792
+ }
793
+ },
794
+ modalities: { image: true, video: true }
795
+ },
796
+ {
797
+ id: "qwen3.8-max-0902",
798
+ contextWindowSize: 1e6,
799
+ capabilities: {
800
+ reasoning: {
801
+ thinking: true,
802
+ efforts: ["low", "medium", "xhigh"],
803
+ defaultEffort: "xhigh",
804
+ disableField: "reasoning_effort"
805
+ }
806
+ },
807
+ modalities: { image: true, video: true }
808
+ },
809
+ {
810
+ id: "qwen3.8-flash",
811
+ contextWindowSize: 1e6,
812
+ capabilities: {
813
+ reasoning: {
814
+ thinking: true,
815
+ efforts: ["low", "medium", "xhigh"],
816
+ defaultEffort: "xhigh",
817
+ disableField: "reasoning_effort"
818
+ }
819
+ },
820
+ modalities: { image: true, video: true }
821
+ },
822
+ {
823
+ id: "deepseek-v4-pro-0813",
824
+ contextWindowSize: 1e6,
825
+ capabilities: {
826
+ reasoning: {
827
+ thinking: true,
828
+ efforts: ["low", "high", "max"],
829
+ defaultEffort: "high",
830
+ disableField: "enable_thinking"
831
+ }
832
+ }
833
+ },
834
+ {
835
+ id: "deepseek-v4-flash-0731",
836
+ contextWindowSize: 1e6,
837
+ capabilities: {
838
+ reasoning: {
839
+ thinking: true,
840
+ efforts: ["low", "high", "max"],
841
+ defaultEffort: "high",
842
+ disableField: "enable_thinking"
843
+ }
844
+ }
845
+ },
846
+ {
847
+ id: "kimi-k3",
848
+ thinkingMandatory: true,
849
+ contextWindowSize: 1e6,
850
+ capabilities: {
851
+ reasoning: {
852
+ thinking: true,
853
+ efforts: ["low", "high", "max"],
854
+ defaultEffort: "max",
855
+ canDisable: false,
856
+ disableField: "reasoning_effort"
857
+ }
858
+ },
859
+ modalities: { image: true }
860
+ },
861
+ {
862
+ id: "kimi-k2.7-code",
863
+ thinkingMandatory: true,
864
+ enableThinking: true,
865
+ contextWindowSize: 262144,
866
+ capabilities: {
867
+ reasoning: {
868
+ thinking: true,
869
+ toggleOnly: true,
870
+ canDisable: false,
871
+ disableField: "enable_thinking"
872
+ }
873
+ },
874
+ modalities: { image: true, video: true }
875
+ },
876
+ {
877
+ id: "kimi-k2.6",
878
+ enableThinking: true,
879
+ contextWindowSize: 262144,
880
+ capabilities: {
881
+ reasoning: {
882
+ thinking: true,
883
+ toggleOnly: true,
884
+ disableField: "enable_thinking"
885
+ }
886
+ },
887
+ modalities: { image: true, video: true }
888
+ }
889
+ ],
890
+ modelsEditable: true,
891
+ modelNamePrefix: "ModelStudio Standard",
892
+ // The Responses API on these endpoints serves the server-side `web_search`
893
+ // / `web_extractor` tools with the same key, so the built-in tool needs no
894
+ // extra configuration.
895
+ webSearch: { backend: "dashscope" },
896
+ uiGroup: "alibaba",
897
+ uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
898
+ };
899
+
900
+ // packages/core/src/providers/presets/openrouter.ts
901
+ init_esbuild_shims();
902
+ var OPENROUTER_ENV_KEY = "OPENROUTER_API_KEY";
903
+ var OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1";
904
+ var openRouterProvider = {
905
+ id: "openrouter",
906
+ label: "OpenRouter",
907
+ description: "Connect with an OpenRouter API key (get one from openrouter.ai/keys)",
908
+ protocol: "openai" /* USE_OPENAI */,
909
+ baseUrl: OPENROUTER_BASE_URL,
910
+ envKey: OPENROUTER_ENV_KEY,
911
+ models: [
912
+ { id: "z-ai/glm-4.5-air:free", contextWindowSize: 128e3 },
913
+ { id: "openai/gpt-oss-120b:free", contextWindowSize: 131072 }
914
+ ],
915
+ modelsEditable: true,
916
+ modelNamePrefix: "OpenRouter",
917
+ ownsModel: /* @__PURE__ */ __name((model) => {
918
+ if (model.envKey !== OPENROUTER_ENV_KEY) return false;
919
+ try {
920
+ const host = new URL(model.baseUrl ?? "").hostname;
921
+ return host === "openrouter.ai" || host.endsWith(".openrouter.ai");
922
+ } catch {
923
+ return false;
924
+ }
925
+ }, "ownsModel"),
926
+ customHeaders: {
927
+ "HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
928
+ "X-OpenRouter-Title": "Qwen Code"
929
+ },
930
+ documentationUrl: "https://openrouter.ai/docs",
931
+ uiGroup: "third-party"
932
+ };
933
+
934
+ // packages/core/src/providers/presets/requesty.ts
935
+ init_esbuild_shims();
936
+ var REQUESTY_ENV_KEY = "REQUESTY_API_KEY";
937
+ var REQUESTY_BASE_URL = "https://router.requesty.ai/v1";
938
+ var requestyProvider = {
939
+ id: "requesty",
940
+ label: "Requesty",
941
+ description: "Connect with a Requesty API key (get one from app.requesty.ai/api-keys)",
942
+ protocol: "openai" /* USE_OPENAI */,
943
+ baseUrl: REQUESTY_BASE_URL,
944
+ envKey: REQUESTY_ENV_KEY,
945
+ models: [
946
+ { id: "openai/gpt-4o-mini", contextWindowSize: 128e3 },
947
+ { id: "openai/gpt-4o", contextWindowSize: 128e3 }
948
+ ],
949
+ modelsEditable: true,
950
+ modelNamePrefix: "Requesty",
951
+ ownsModel: /* @__PURE__ */ __name((model) => {
952
+ if (model.envKey !== REQUESTY_ENV_KEY) return false;
953
+ try {
954
+ const host = new URL(model.baseUrl ?? "").hostname;
955
+ return host === "router.requesty.ai" || host.endsWith(".requesty.ai");
956
+ } catch {
957
+ return false;
958
+ }
959
+ }, "ownsModel"),
960
+ customHeaders: {
961
+ "HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
962
+ "X-Title": "Qwen Code"
963
+ },
964
+ documentationUrl: "https://docs.requesty.ai",
965
+ uiGroup: "third-party"
966
+ };
967
+
968
+ // packages/core/src/providers/presets/deepseek.ts
969
+ init_esbuild_shims();
970
+ var deepseekProvider = {
971
+ id: "deepseek",
972
+ label: "DeepSeek API Key",
973
+ description: "Quick setup for DeepSeek (deepseek-v4-flash, deepseek-v4-pro)",
974
+ protocol: "openai" /* USE_OPENAI */,
975
+ baseUrl: "https://api.deepseek.com",
976
+ envKey: "DEEPSEEK_API_KEY",
977
+ models: [
978
+ {
979
+ id: "deepseek-v4-pro",
980
+ contextWindowSize: 1e6,
981
+ capabilities: {
982
+ reasoning: {
983
+ thinking: true,
984
+ efforts: ["low", "high", "max"],
985
+ defaultEffort: "high",
986
+ disableField: "thinking"
987
+ }
988
+ }
989
+ },
990
+ {
991
+ id: "deepseek-v4-flash",
992
+ capabilities: {
993
+ reasoning: {
994
+ thinking: true,
995
+ efforts: ["low", "high", "max"],
996
+ defaultEffort: "high",
997
+ disableField: "thinking"
998
+ }
999
+ },
1000
+ contextWindowSize: 1e6
1001
+ }
1002
+ ],
1003
+ modelsEditable: true,
1004
+ modelNamePrefix: "DeepSeek",
1005
+ documentationUrl: "https://api-docs.deepseek.com/zh-cn/",
1006
+ uiGroup: "third-party"
1007
+ };
1008
+
1009
+ // packages/core/src/providers/presets/grok.ts
1010
+ init_esbuild_shims();
1011
+ var GROK_ENV_KEY = "XAI_API_KEY";
1012
+ var GROK_BASE_URL = "https://api.x.ai/v1";
1013
+ var grokProvider = {
1014
+ id: "grok",
1015
+ label: "Grok (xAI) API Key",
1016
+ description: "Quick setup for xAI Grok chat & code models",
1017
+ protocol: "openai" /* USE_OPENAI */,
1018
+ baseUrl: GROK_BASE_URL,
1019
+ envKey: GROK_ENV_KEY,
1020
+ // xAI's API follows the standard OpenAI format. Grok models reason by
1021
+ // default (grok-4.5 exposes an optional reasoning_effort knob, default
1022
+ // high) and have no Qwen-style enable_thinking toggle, so the preset
1023
+ // carries only each model's context window.
1024
+ models: [
1025
+ { id: "grok-4.5", contextWindowSize: 5e5 },
1026
+ { id: "grok-4.3", contextWindowSize: 1e6 },
1027
+ { id: "grok-4.20-0309-reasoning", contextWindowSize: 1e6 },
1028
+ { id: "grok-4.20-0309-non-reasoning", contextWindowSize: 1e6 },
1029
+ { id: "grok-4.20-multi-agent-0309", contextWindowSize: 1e6 },
1030
+ { id: "grok-build-0.1", contextWindowSize: 262144 }
1031
+ ],
1032
+ modelsEditable: true,
1033
+ modelNamePrefix: "Grok",
1034
+ documentationUrl: "https://docs.x.ai/docs",
1035
+ uiGroup: "third-party"
1036
+ };
1037
+
1038
+ // packages/core/src/providers/presets/minimax.ts
1039
+ init_esbuild_shims();
1040
+ var minimaxProvider = {
1041
+ id: "minimax",
1042
+ label: "MiniMax API Key",
1043
+ description: "Quick setup for MiniMax models",
1044
+ protocol: "openai" /* USE_OPENAI */,
1045
+ baseUrl: [
1046
+ {
1047
+ id: "international",
1048
+ label: "International",
1049
+ url: "https://api.minimax.io/v1",
1050
+ documentationUrl: "https://www.minimax.io/platform"
1051
+ },
1052
+ {
1053
+ id: "china",
1054
+ label: "China",
1055
+ url: "https://api.minimaxi.com/v1",
1056
+ documentationUrl: "https://platform.minimaxi.com"
1057
+ }
1058
+ ],
1059
+ envKey: "MINIMAX_API_KEY",
1060
+ models: [
1061
+ {
1062
+ id: "MiniMax-M3",
1063
+ contextWindowSize: 1e6,
1064
+ modalities: { image: true, video: true }
1065
+ },
1066
+ { id: "MiniMax-M2.7", contextWindowSize: 204800 },
1067
+ { id: "MiniMax-M2.7-highspeed", contextWindowSize: 204800 },
1068
+ { id: "MiniMax-M2.5", contextWindowSize: 196608 },
1069
+ { id: "MiniMax-M2.5-highspeed", contextWindowSize: 196608 },
1070
+ { id: "image-01", imageOnly: true },
1071
+ { id: "image-01-live", imageOnly: true }
1072
+ ],
1073
+ modelsEditable: true,
1074
+ modelNamePrefix: "MiniMax",
1075
+ uiGroup: "third-party"
1076
+ };
1077
+
1078
+ // packages/core/src/providers/presets/zai.ts
1079
+ init_esbuild_shims();
1080
+ var zaiProvider = {
1081
+ id: "zai",
1082
+ label: "Z.AI API Key",
1083
+ description: "Quick setup for Z.AI models",
1084
+ protocol: "openai" /* USE_OPENAI */,
1085
+ baseUrl: [
1086
+ {
1087
+ id: "standard-api-key",
1088
+ label: "Standard API Key",
1089
+ url: "https://api.z.ai/api/paas/v4",
1090
+ documentationUrl: "https://docs.z.ai/"
1091
+ },
1092
+ {
1093
+ id: "coding-plan",
1094
+ label: "Coding Plan",
1095
+ url: "https://api.z.ai/api/coding/paas/v4",
1096
+ documentationUrl: "https://docs.z.ai/"
1097
+ }
1098
+ ],
1099
+ envKey: "ZAI_API_KEY",
1100
+ models: [
1101
+ { id: "GLM-5.2", contextWindowSize: 1e6, enableThinking: true },
1102
+ { id: "GLM-5.1", contextWindowSize: 204800, enableThinking: true },
1103
+ { id: "GLM-5", contextWindowSize: 204800 },
1104
+ { id: "GLM-5-Turbo", contextWindowSize: 204800 }
1105
+ ],
1106
+ modelsEditable: true,
1107
+ modelNamePrefix: "Z.AI",
1108
+ uiGroup: "third-party"
1109
+ };
1110
+
1111
+ // packages/core/src/providers/presets/moonshot.ts
1112
+ init_esbuild_shims();
1113
+ var moonshotProvider = {
1114
+ id: "moonshot",
1115
+ label: "Kimi (Moonshot AI) API Key",
1116
+ description: "Quick setup for Kimi models",
1117
+ protocol: "openai" /* USE_OPENAI */,
1118
+ baseUrl: [
1119
+ {
1120
+ id: "international",
1121
+ label: "International",
1122
+ url: "https://api.moonshot.ai/v1",
1123
+ documentationUrl: "https://platform.kimi.ai/docs"
1124
+ },
1125
+ {
1126
+ id: "china",
1127
+ label: "China",
1128
+ url: "https://api.moonshot.cn/v1",
1129
+ documentationUrl: "https://platform.moonshot.cn/docs"
1130
+ }
1131
+ ],
1132
+ envKey: "MOONSHOT_API_KEY",
1133
+ models: [
1134
+ {
1135
+ id: "kimi-k3",
1136
+ capabilities: {
1137
+ reasoning: {
1138
+ thinking: true,
1139
+ efforts: ["low", "high", "max"],
1140
+ defaultEffort: "max",
1141
+ canDisable: false,
1142
+ disableField: "reasoning_effort"
1143
+ }
1144
+ },
1145
+ contextWindowSize: 1e6,
1146
+ // K3 always thinks: the API exposes `reasoning_effort` but no way to
1147
+ // turn thinking off, so never emit a disable shape on the wire.
1148
+ thinkingMandatory: true,
1149
+ modalities: { image: true, video: true }
1150
+ },
1151
+ {
1152
+ id: "kimi-k2.7-code",
1153
+ capabilities: {
1154
+ reasoning: {
1155
+ thinking: true,
1156
+ toggleOnly: true,
1157
+ canDisable: false,
1158
+ disableField: "thinking"
1159
+ }
1160
+ },
1161
+ contextWindowSize: 262144,
1162
+ modalities: { image: true, video: true },
1163
+ thinkingMandatory: true
1164
+ },
1165
+ {
1166
+ id: "kimi-k2.7-code-highspeed",
1167
+ capabilities: {
1168
+ reasoning: {
1169
+ thinking: true,
1170
+ toggleOnly: true,
1171
+ canDisable: false,
1172
+ disableField: "thinking"
1173
+ }
1174
+ },
1175
+ contextWindowSize: 262144,
1176
+ modalities: { image: true, video: true },
1177
+ thinkingMandatory: true
1178
+ },
1179
+ {
1180
+ id: "kimi-k2.6",
1181
+ capabilities: {
1182
+ reasoning: {
1183
+ thinking: true,
1184
+ toggleOnly: true,
1185
+ disableField: "thinking"
1186
+ }
1187
+ },
1188
+ contextWindowSize: 262144,
1189
+ modalities: { image: true, video: true }
1190
+ }
1191
+ ],
1192
+ modelsEditable: true,
1193
+ modelNamePrefix: "Kimi",
1194
+ uiGroup: "third-party"
1195
+ };
1196
+
1197
+ // packages/core/src/providers/presets/idealab.ts
1198
+ init_esbuild_shims();
1199
+ var idealabProvider = {
1200
+ id: "idealab",
1201
+ label: "Idealab API Key",
1202
+ description: "Alibaba internal LLM service (Qwen3.6-Plus-DogFooding, DeepSeek V4, Kimi K2.6)",
1203
+ protocol: "openai" /* USE_OPENAI */,
1204
+ baseUrl: "https://idealab.alibaba-inc.com/api/openai/v1",
1205
+ envKey: "IDEALAB_API_KEY",
1206
+ models: [
1207
+ {
1208
+ id: "Qwen3.6-Plus-DogFooding",
1209
+ contextWindowSize: 1e6,
1210
+ enableThinking: true,
1211
+ modalities: { image: true, video: true }
1212
+ },
1213
+ {
1214
+ id: "bailian/deepseek-v4-pro",
1215
+ contextWindowSize: 1e6,
1216
+ enableThinking: true
1217
+ },
1218
+ {
1219
+ id: "bailian/deepseek-v4-flash",
1220
+ contextWindowSize: 1e6,
1221
+ enableThinking: true
1222
+ },
1223
+ {
1224
+ id: "bailian/kimi-k2.6",
1225
+ contextWindowSize: 262144,
1226
+ enableThinking: true
1227
+ }
1228
+ ],
1229
+ modelsEditable: true,
1230
+ modelNamePrefix: "Idealab",
1231
+ uiGroup: "third-party"
1232
+ };
1233
+
1234
+ // packages/core/src/providers/presets/modelscope.ts
1235
+ init_esbuild_shims();
1236
+ var modelscopeProvider = {
1237
+ id: "modelscope",
1238
+ label: "ModelScope API Key",
1239
+ description: "Quick setup for ModelScope API Inference",
1240
+ protocol: "openai" /* USE_OPENAI */,
1241
+ baseUrl: "https://api-inference.modelscope.cn/v1",
1242
+ envKey: "MODELSCOPE_API_KEY",
1243
+ models: [
1244
+ {
1245
+ id: "deepseek-ai/DeepSeek-V4-Flash",
1246
+ contextWindowSize: 1e6,
1247
+ enableThinking: true
1248
+ },
1249
+ {
1250
+ id: "Qwen/Qwen3.5-397B-A17B",
1251
+ contextWindowSize: 1e6,
1252
+ enableThinking: true
1253
+ },
1254
+ {
1255
+ id: "ZhipuAI/GLM-5.1",
1256
+ contextWindowSize: 1e6,
1257
+ enableThinking: true
1258
+ }
1259
+ ],
1260
+ modelsEditable: true,
1261
+ modelNamePrefix: "ModelScope",
1262
+ documentationUrl: "https://modelscope.cn/docs/model-service/API-Inference/intro",
1263
+ uiGroup: "third-party"
1264
+ };
1265
+
1266
+ // packages/core/src/providers/presets/custom-provider.ts
1267
+ init_esbuild_shims();
1268
+ import { createHash as createHash2 } from "node:crypto";
1269
+ var CUSTOM_API_KEY_ENV_PREFIX = "QWEN_CUSTOM_API_KEY_";
1270
+ function normalizeEnvSegment(value) {
1271
+ const upper = value.trim().toUpperCase();
1272
+ let result = "";
1273
+ let prevWasUnderscore = false;
1274
+ for (let i = 0; i < upper.length; i++) {
1275
+ const code = upper.charCodeAt(i);
1276
+ const isAlphaNum = code >= 65 && code <= 90 || code >= 48 && code <= 57;
1277
+ if (isAlphaNum) {
1278
+ result += upper[i];
1279
+ prevWasUnderscore = false;
1280
+ } else if (!prevWasUnderscore) {
1281
+ result += "_";
1282
+ prevWasUnderscore = true;
1283
+ }
1284
+ }
1285
+ let start = 0;
1286
+ let end = result.length;
1287
+ while (start < end && result.charCodeAt(start) === 95) start++;
1288
+ while (end > start && result.charCodeAt(end - 1) === 95) end--;
1289
+ return result.slice(start, end);
1290
+ }
1291
+ __name(normalizeEnvSegment, "normalizeEnvSegment");
1292
+ function stripTrailingSlashes(value) {
1293
+ let end = value.length;
1294
+ while (end > 0 && value.charCodeAt(end - 1) === 47) end--;
1295
+ return value.slice(0, end);
1296
+ }
1297
+ __name(stripTrailingSlashes, "stripTrailingSlashes");
1298
+ function generateCustomEnvKey(protocol, baseUrl) {
1299
+ const canonicalBaseUrl = stripTrailingSlashes(baseUrl.trim());
1300
+ const suffix = createHash2("sha256").update(`${protocol}\0${canonicalBaseUrl}`).digest("hex").slice(0, 12).toUpperCase();
1301
+ return `${CUSTOM_API_KEY_ENV_PREFIX}${normalizeEnvSegment(
1302
+ protocol
1303
+ )}_${normalizeEnvSegment(baseUrl)}_${suffix}`;
1304
+ }
1305
+ __name(generateCustomEnvKey, "generateCustomEnvKey");
1306
+ var customProvider = {
1307
+ id: "custom-openai-compatible",
1308
+ label: "Custom Provider",
1309
+ description: "Manually connect a local server, proxy, or unsupported provider",
1310
+ protocol: "openai" /* USE_OPENAI */,
1311
+ protocolOptions: [
1312
+ "openai" /* USE_OPENAI */,
1313
+ "openai-responses" /* USE_OPENAI_RESPONSES */,
1314
+ "anthropic" /* USE_ANTHROPIC */,
1315
+ "gemini" /* USE_GEMINI */
1316
+ ],
1317
+ baseUrl: void 0,
1318
+ envKey: generateCustomEnvKey,
1319
+ models: void 0,
1320
+ modelNamePrefix: "",
1321
+ showAdvancedConfig: true,
1322
+ // Detect existing custom entries by our env-key namespace for UI/ACP flows,
1323
+ // but merge installs by id+baseUrl so /auth can add another custom model
1324
+ // without deleting models from other endpoints or different models on the
1325
+ // same endpoint.
1326
+ ownsModel: /* @__PURE__ */ __name((model) => typeof model.envKey === "string" && model.envKey.startsWith(CUSTOM_API_KEY_ENV_PREFIX), "ownsModel"),
1327
+ mergeModelsByIdentity: true,
1328
+ uiGroup: "custom"
1329
+ };
1330
+
1331
+ // packages/core/src/providers/all-providers.ts
1332
+ var ALL_PROVIDERS = [
1333
+ codingPlanProvider,
1334
+ tokenPlanProvider,
1335
+ alibabaStandardProvider,
1336
+ deepseekProvider,
1337
+ grokProvider,
1338
+ minimaxProvider,
1339
+ zaiProvider,
1340
+ moonshotProvider,
1341
+ idealabProvider,
1342
+ modelscopeProvider,
1343
+ openRouterProvider,
1344
+ requestyProvider,
1345
+ customProvider
1346
+ ];
1347
+ var ALIBABA_PROVIDERS = ALL_PROVIDERS.filter(
1348
+ (p) => p.uiGroup === "alibaba"
1349
+ );
1350
+ var THIRD_PARTY_PROVIDERS = ALL_PROVIDERS.filter(
1351
+ (p) => p.uiGroup === "third-party"
1352
+ );
1353
+ function findProviderById(id) {
1354
+ return ALL_PROVIDERS.find((p) => p.id === id);
1355
+ }
1356
+ __name(findProviderById, "findProviderById");
1357
+ function findProviderByCredentials(baseUrl, envKey) {
1358
+ return ALL_PROVIDERS.find(
1359
+ (p) => providerMatchesCredentials(p, baseUrl, envKey)
1360
+ );
1361
+ }
1362
+ __name(findProviderByCredentials, "findProviderByCredentials");
1363
+ function getAllProviderBaseUrls() {
1364
+ return ALL_PROVIDERS.flatMap((p) => {
1365
+ if (typeof p.baseUrl === "string") return [p.baseUrl];
1366
+ if (Array.isArray(p.baseUrl))
1367
+ return p.baseUrl.map((o) => o.url);
1368
+ return [];
1369
+ });
1370
+ }
1371
+ __name(getAllProviderBaseUrls, "getAllProviderBaseUrls");
1372
+
1373
+ export {
1374
+ resolveOwnsModel,
1375
+ resolveMetadataKey,
1376
+ PROVIDER_METADATA_NS,
1377
+ buildInstallPlan,
1378
+ computeModelListVersion,
1379
+ getDefaultBaseUrlForProtocol,
1380
+ resolveBaseUrl,
1381
+ getDefaultModelIds,
1382
+ findExistingProviderModels,
1383
+ shouldShowStep,
1384
+ providerMatchesCredentials,
1385
+ buildProviderTemplate,
1386
+ customProvider,
1387
+ ALL_PROVIDERS,
1388
+ ALIBABA_PROVIDERS,
1389
+ THIRD_PARTY_PROVIDERS,
1390
+ findProviderById,
1391
+ findProviderByCredentials,
1392
+ getAllProviderBaseUrls
1393
+ };
1394
+ /**
1395
+ * @license
1396
+ * Copyright 2026 Qwen Team
1397
+ * SPDX-License-Identifier: Apache-2.0
1398
+ */
1399
+ /**
1400
+ * @license
1401
+ * Copyright 2025 Qwen Team
1402
+ * SPDX-License-Identifier: Apache-2.0
1403
+ */
1404
+ /**
1405
+ * @license
1406
+ * Copyright 2026 Qwen Team
1407
+ * SPDX-License-Identifier: Apache-2.0
1408
+ *
1409
+ * Provider registry — imports all provider definitions and assembles the
1410
+ * lookup tables used by the UI and CLI commands.
1411
+ */