@qwen-code/qwen-code 0.23.1 → 0.23.2-nightly.20260909.2e212144d3

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 (293) hide show
  1. package/README.md +35 -15
  2. package/bundled/computer-use/SKILL.md +1 -1
  3. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  4. package/bundled/qc-helper/docs/configuration/model-providers.md +19 -15
  5. package/bundled/qc-helper/docs/configuration/settings.md +1 -1
  6. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  7. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
  8. package/bundled/qc-helper/docs/features/channels/github.md +1 -9
  9. package/bundled/qc-helper/docs/features/channels/overview.md +26 -51
  10. package/bundled/qc-helper/docs/features/channels/qqbot.md +1 -2
  11. package/bundled/qc-helper/docs/features/commands.md +79 -17
  12. package/bundled/qc-helper/docs/features/computer-use.md +1 -1
  13. package/bundled/qc-helper/docs/features/cross-session-protocol.md +291 -0
  14. package/bundled/qc-helper/docs/features/goals.md +3 -1
  15. package/bundled/qc-helper/docs/features/sub-agents.md +8 -0
  16. package/bundled/qc-helper/docs/qwen-serve.md +62 -48
  17. package/chunks/{MaxSizedBox-UDO6Y7RB.js → MaxSizedBox-ZBGWYJZW.js} +20 -19
  18. package/chunks/{StandaloneSessionPicker-D4CUOO4H.js → StandaloneSessionPicker-NR5ACIJZ.js} +35 -34
  19. package/chunks/{acpAgent-KWLJFADK.js → acpAgent-DM6XRCDQ.js} +307 -183
  20. package/chunks/{agent-GSUPGEOL.js → agent-EF3IIYE3.js} +13 -13
  21. package/chunks/{agent-headless-HNYCQUJB.js → agent-headless-5J2KFYR4.js} +13 -13
  22. package/chunks/{anthropicContentGenerator-I7LQZH26.js → anthropicContentGenerator-VIW2FG7G.js} +4 -4
  23. package/chunks/{artifact-tool-P52OKKEF.js → artifact-tool-G5LHNECG.js} +1 -1
  24. package/chunks/{askUserQuestion-I5W5S3D6.js → askUserQuestion-R3TXY77M.js} +1 -1
  25. package/chunks/{bridge-B7CV6RVI.js → bridge-LEMQM6QE.js} +21 -20
  26. package/chunks/{channel-management-service-TRTLQTSV.js → channel-management-service-TGF6XFXT.js} +4 -4
  27. package/chunks/{channel-settings-store-FW45IRUP.js → channel-settings-store-FV365JSF.js} +29 -28
  28. package/chunks/{channel-worker-group-PIYPVCTF.js → channel-worker-group-SQ5FRWOH.js} +5 -5
  29. package/chunks/{channel-worker-manager-FQHEDTD2.js → channel-worker-manager-TU4ZNWOE.js} +5 -5
  30. package/chunks/{channel-worker-supervisor-XJPZZ3VK.js → channel-worker-supervisor-EMITFMCP.js} +4 -4
  31. package/chunks/{chunk-3SH53ANB.js → chunk-22GORRNY.js} +12 -0
  32. package/chunks/{chunk-3LPJ776W.js → chunk-2HYOOFDS.js} +9 -6
  33. package/chunks/{chunk-S6QVI3MV.js → chunk-34VPADLG.js} +2 -2
  34. package/chunks/{chunk-WJDXKQIO.js → chunk-3A2IMUDH.js} +14 -2
  35. package/chunks/{chunk-DXQ6Z7AH.js → chunk-3O77M472.js} +224 -84
  36. package/chunks/{chunk-5CVY5Q2P.js → chunk-43EUMPKQ.js} +1 -1
  37. package/chunks/{chunk-ZNO5BUAD.js → chunk-4DIMJKWU.js} +46 -37
  38. package/chunks/{chunk-O2JBJQCF.js → chunk-5HV2HPO7.js} +1 -1
  39. package/chunks/{chunk-RXT4QBDX.js → chunk-5WBA3DEF.js} +1 -1
  40. package/chunks/{chunk-ARYNBBBM.js → chunk-6GAYNM3F.js} +3 -3
  41. package/chunks/{chunk-EEKU6COG.js → chunk-6S7YYUUH.js} +3 -3
  42. package/chunks/{chunk-OPMKGOLD.js → chunk-6VIATHL7.js} +1 -1
  43. package/chunks/{chunk-ENZDGHGJ.js → chunk-76I36BEM.js} +3 -3
  44. package/chunks/{chunk-B54PFQS5.js → chunk-7CLLH5TI.js} +1 -1
  45. package/chunks/{chunk-UHUT4IDM.js → chunk-7IDZFJAV.js} +9 -9
  46. package/chunks/{chunk-5Z4FCEPY.js → chunk-7K4GGN3D.js} +606 -109
  47. package/chunks/{chunk-ZPL2TZNA.js → chunk-7KZVXJ4U.js} +1 -1
  48. package/chunks/{chunk-FWRRUITH.js → chunk-7WCJEY3A.js} +4 -4
  49. package/chunks/{chunk-MFYH2VXV.js → chunk-A7QZIGRB.js} +2 -2
  50. package/chunks/{chunk-27LTEY6D.js → chunk-ATBLEXXV.js} +7 -2
  51. package/chunks/{chunk-3BTHHXXE.js → chunk-AUTUFD5X.js} +1 -1
  52. package/chunks/chunk-AXMWHKXA.js +42 -0
  53. package/chunks/{chunk-QZOXVQPK.js → chunk-AXWTG6R7.js} +2 -5
  54. package/chunks/{chunk-PDUMGZ2P.js → chunk-BDAVT6K2.js} +486 -409
  55. package/chunks/{chunk-2YS3NU4A.js → chunk-BDP3NTWD.js} +3 -3
  56. package/chunks/{chunk-IKG2YVRZ.js → chunk-BZUHZCUO.js} +2 -2
  57. package/chunks/{chunk-USN6VNTO.js → chunk-C24ZDDNY.js} +1 -1
  58. package/chunks/{chunk-RPFJJ33Z.js → chunk-CALTQWTZ.js} +1 -1
  59. package/chunks/{chunk-BF3RUIVP.js → chunk-CH2YDT6X.js} +36 -38
  60. package/chunks/{chunk-3VDLQUR2.js → chunk-D6AGS266.js} +1 -1
  61. package/chunks/{chunk-DO5SMV52.js → chunk-D7DFZAK2.js} +17 -11
  62. package/chunks/{chunk-GM44O6F7.js → chunk-DARWOZY6.js} +1 -1
  63. package/chunks/{chunk-HUX2DOTF.js → chunk-DGNRLJ6S.js} +3 -3
  64. package/chunks/{chunk-FW4E4QPG.js → chunk-DVOCOIS5.js} +1 -1
  65. package/chunks/{chunk-OESZTXTG.js → chunk-E4LXNQAK.js} +1 -1
  66. package/chunks/{chunk-TWAMIEQ2.js → chunk-EATP5QCN.js} +16 -18
  67. package/chunks/{chunk-DZ6D4B3K.js → chunk-EDSU3VUG.js} +12 -5
  68. package/chunks/{chunk-EOET4H7C.js → chunk-EE5ZD4XU.js} +3 -3
  69. package/chunks/{chunk-B3EL44K3.js → chunk-EN3Q2S3J.js} +3 -3
  70. package/chunks/{chunk-N7YQEKGX.js → chunk-EOLGAQ25.js} +16 -15
  71. package/chunks/{chunk-3YQMUBTS.js → chunk-EYCW6UF2.js} +7 -7
  72. package/chunks/{chunk-ZELCTN6Y.js → chunk-F23YN37B.js} +10 -0
  73. package/chunks/{chunk-FPGTNKCP.js → chunk-F3M6P6IQ.js} +199 -1
  74. package/chunks/{chunk-B44JBZBB.js → chunk-F4SAL7WM.js} +91 -3
  75. package/chunks/{chunk-XZ3Z43XL.js → chunk-FEEVHJOR.js} +3 -3
  76. package/chunks/{chunk-CHVU543W.js → chunk-FN4KHWCL.js} +1 -1
  77. package/chunks/{chunk-6QV7Z74P.js → chunk-FRS3P7MQ.js} +15 -2
  78. package/chunks/{chunk-FDOGGKAA.js → chunk-GSFV5RQW.js} +2 -0
  79. package/chunks/{chunk-XBVNNDPK.js → chunk-GSYD7MYP.js} +8 -3
  80. package/chunks/{chunk-VF6D6EGV.js → chunk-HSO6D4KX.js} +82 -25
  81. package/chunks/{chunk-L7V52QEZ.js → chunk-HUJJFSMO.js} +10 -10
  82. package/chunks/{chunk-CIKL2DQP.js → chunk-HW4MRP4V.js} +1 -1
  83. package/chunks/{chunk-TWWS7XUW.js → chunk-HWLLUDIA.js} +108 -16
  84. package/chunks/{chunk-75LBC7SV.js → chunk-IKK6NNS6.js} +32 -29
  85. package/chunks/{chunk-UXDVUFKU.js → chunk-JFAGT5YG.js} +2 -2
  86. package/chunks/{chunk-6SADVYQQ.js → chunk-JGTMTJSQ.js} +1 -1
  87. package/chunks/{chunk-45ROPFQY.js → chunk-JYGIJA4W.js} +1 -1
  88. package/chunks/{chunk-5WC2ECUK.js → chunk-KECCLCXM.js} +42 -8
  89. package/chunks/{chunk-CABDNUJ4.js → chunk-KEPC5BOL.js} +5 -5
  90. package/chunks/{chunk-WNISCNTA.js → chunk-L5VHJYHH.js} +2 -2
  91. package/chunks/{chunk-25CBAK3H.js → chunk-LKBOBUA2.js} +2 -2
  92. package/chunks/{chunk-6QILGINT.js → chunk-LOBKNYPR.js} +2 -2
  93. package/chunks/{chunk-2ZFO5JD7.js → chunk-LOVGQ3HZ.js} +9 -9
  94. package/chunks/{chunk-QK4K76T6.js → chunk-MUF4UGPB.js} +2 -2
  95. package/chunks/{chunk-JGDRB4FP.js → chunk-N3Z6Q7KC.js} +125 -10
  96. package/chunks/chunk-NFXXBWSE.js +463 -0
  97. package/chunks/{chunk-PQSCGZT2.js → chunk-NPKCVSXX.js} +26 -2
  98. package/chunks/{chunk-YCEKI7QX.js → chunk-NV4YYXFT.js} +1 -1
  99. package/chunks/{chunk-5IL2BZHW.js → chunk-O6BFERWN.js} +3 -3
  100. package/chunks/{chunk-TGC4264Q.js → chunk-OVTPETDL.js} +5 -5
  101. package/chunks/chunk-PLEBBGHL.js +1401 -0
  102. package/chunks/{chunk-3VWPPK5Q.js → chunk-PWR6BQ3U.js} +4 -4
  103. package/chunks/{chunk-D6AQNMUA.js → chunk-QA2B26PL.js} +3 -3
  104. package/chunks/{chunk-NFIDVZND.js → chunk-QB3KS3N3.js} +2 -21
  105. package/chunks/{chunk-LNCNUMJ5.js → chunk-SK6VACCM.js} +558 -158
  106. package/chunks/{chunk-YAC7H4K3.js → chunk-SM66GFKJ.js} +1 -1
  107. package/chunks/{chunk-MA5OUNN6.js → chunk-SNMUO5Z7.js} +1 -1
  108. package/chunks/{chunk-IRKQ4YYX.js → chunk-SVWWF5TZ.js} +29 -1
  109. package/chunks/{chunk-6JXHO7LG.js → chunk-SYKPMH2X.js} +3 -3
  110. package/chunks/{chunk-5HBA2Z7V.js → chunk-TGNNLRC3.js} +2 -3
  111. package/chunks/{chunk-EHTKOO6W.js → chunk-TRQNRP2H.js} +2 -2
  112. package/chunks/{chunk-LZGFVUWZ.js → chunk-UQOP2APG.js} +4 -24
  113. package/chunks/{chunk-T2IHCZLS.js → chunk-VAWM3A5N.js} +1 -1
  114. package/chunks/{chunk-M73KHGNR.js → chunk-VJJXG73H.js} +404 -226
  115. package/chunks/{chunk-WAASYFPK.js → chunk-VJWJOKOQ.js} +2 -2
  116. package/chunks/{chunk-WQMUGQ6G.js → chunk-VR6Y23FW.js} +1 -1
  117. package/chunks/{chunk-E7XSUYCZ.js → chunk-VX2NR3SD.js} +19 -4
  118. package/chunks/{chunk-XVTCSVBK.js → chunk-WDVV3LRM.js} +193 -169
  119. package/chunks/{chunk-RNYENHN5.js → chunk-WEU6O6VN.js} +2 -2
  120. package/chunks/{chunk-YHDGABDC.js → chunk-XKBFYTCD.js} +1 -1
  121. package/chunks/{chunk-66JBCTJF.js → chunk-Y7YHAY32.js} +23 -6
  122. package/chunks/{chunk-7SL55L5H.js → chunk-YIE6REQ5.js} +20 -15
  123. package/chunks/{chunk-ZU2T5JIS.js → chunk-ZEFWBG2C.js} +736 -1148
  124. package/chunks/{chunk-6TPVIESH.js → chunk-ZM2TCZZ7.js} +3 -3
  125. package/chunks/{chunk-2TMJRF46.js → chunk-ZZ7RVOTU.js} +50 -18
  126. package/chunks/{config-utils-KTDSQ4MU.js → config-utils-SXFK3G4X.js} +24 -23
  127. package/chunks/{contextCommand-UQ3KRYGK.js → contextCommand-QFPD26QO.js} +21 -20
  128. package/chunks/{core-runtime-JR34JAFH.js → core-runtime-VXKNBODM.js} +26 -24
  129. package/chunks/{create-sub-session-RGPJOI4S.js → create-sub-session-7WSQETFR.js} +20 -19
  130. package/chunks/{daemon-UI6SQSBV.js → daemon-U2456K5H.js} +2 -2
  131. package/chunks/{daemon-git-worktree-guard-H3OA26KQ.js → daemon-git-worktree-guard-I4DCSDUS.js} +20 -19
  132. package/chunks/{daemon-status-provider-6WZLKSZU.js → daemon-status-provider-5UV56RI4.js} +25 -24
  133. package/chunks/{daemon-trust-policy-3EDP2BYD.js → daemon-trust-policy-DKIBWTKU.js} +25 -24
  134. package/chunks/{daemon-trust-policy-monitor-CRHZPK52.js → daemon-trust-policy-monitor-CPSD7UKT.js} +25 -24
  135. package/chunks/{deferred-core-runtime-LO5NTQQ4.js → deferred-core-runtime-D2RF35BL.js} +20 -19
  136. package/chunks/{dist-STAGIFNB.js → dist-6YDUH3BB.js} +388 -102
  137. package/chunks/{dist-XJ25G6OH.js → dist-BNQVF565.js} +2 -8
  138. package/chunks/{dist-NQ2636VT.js → dist-F34J4FZX.js} +1 -1
  139. package/chunks/{dist-OR2ZQTXZ.js → dist-F6JLAJLE.js} +1 -1
  140. package/chunks/{dist-24TCWK5H.js → dist-K5GHMXIG.js} +2 -2
  141. package/chunks/{dist-WZTUKIDR.js → dist-NP7QKLVG.js} +2 -2
  142. package/chunks/{dist-M4CBX53H.js → dist-UFTFGI6I.js} +1 -1
  143. package/chunks/{dist-5I4HLUTO.js → dist-XLV33CLY.js} +1 -2
  144. package/chunks/{dist-FDISN4AK.js → dist-ZDNJK74R.js} +3 -7
  145. package/chunks/{edit-LB7Z7XK5.js → edit-4IBADZ3O.js} +13 -13
  146. package/chunks/{enterPlanMode-P6TVUFIY.js → enterPlanMode-YN3GPQU5.js} +13 -13
  147. package/chunks/{environment-QATJNNKI.js → environment-E272IJMF.js} +22 -21
  148. package/chunks/{errors-3XJ37PS2.js → errors-CVAH3RWQ.js} +22 -21
  149. package/chunks/{exitPlanMode-A3OKL5UO.js → exitPlanMode-24J5IHGC.js} +13 -13
  150. package/chunks/{fast-path-DBIT5YQQ.js → fast-path-M5IDBMXF.js} +3 -3
  151. package/chunks/{glob-73EDTXUE.js → glob-ERBD7JYP.js} +13 -13
  152. package/chunks/{goal-tools-DFI6YMSD.js → goal-tools-245ULLQT.js} +13 -13
  153. package/chunks/{handleAutoUpdate-2FUNJO3B.js → handleAutoUpdate-JDZHHZKK.js} +22 -21
  154. package/chunks/{i18n-FDIA6KFI.js → i18n-LA4D5IXM.js} +20 -19
  155. package/chunks/{initializer-4MJTJOTW.js → initializer-SHPTSWUZ.js} +25 -24
  156. package/chunks/{installationInfo-232RA2OK.js → installationInfo-QEQEPB3G.js} +20 -19
  157. package/chunks/{list-WN6WSGEB.js → list-IBHCQWTF.js} +28 -27
  158. package/chunks/{list-agents-I5TRH3J7.js → list-agents-EDPZCGKN.js} +5 -4
  159. package/chunks/{llm-UDFWQWZA.js → llm-JAWCQLA4.js} +68 -62
  160. package/chunks/{llm-content-generator-VLMZ2A7A.js → llm-content-generator-GOV3A23T.js} +2 -2
  161. package/chunks/{loadedSettingsAdapter-OBQEIXM7.js → loadedSettingsAdapter-RVE2GNVU.js} +25 -24
  162. package/chunks/{loggingContentGenerator-RGVUMUVX.js → loggingContentGenerator-SSHNN5YW.js} +15 -15
  163. package/chunks/{managed-npm-update-QBAJYCFU.js → managed-npm-update-BHSTITQO.js} +20 -19
  164. package/chunks/{mcp-OTIZZCPY.js → mcp-6ZZ7P2HU.js} +25 -24
  165. package/chunks/{monitor-BV5XF6LL.js → monitor-RKK6GSHG.js} +13 -13
  166. package/chunks/{nonInteractiveCli-W6MUKDVJ.js → nonInteractiveCli-UQHP3G6P.js} +58 -57
  167. package/chunks/{notebook-edit-HGBEKGTE.js → notebook-edit-YM47A7WO.js} +13 -13
  168. package/chunks/{open-with-auth-D6JD6LDS.js → open-with-auth-6MVIHMXB.js} +1 -1
  169. package/chunks/{openaiContentGenerator-NSU3ERBH.js → openaiContentGenerator-FHKDWNI2.js} +9 -9
  170. package/chunks/{pidfile-LE3TU4GE.js → pidfile-SIIEJEEH.js} +23 -20
  171. package/chunks/{processUtils-YFBGJK67.js → processUtils-JF7CWBJC.js} +2 -2
  172. package/chunks/{prompt-terminal-ledger-4W4W7DSO.js → prompt-terminal-ledger-FXXHAEQU.js} +21 -20
  173. package/chunks/{qwenContentGenerator-HTA57WFC.js → qwenContentGenerator-KFJ77JP6.js} +16 -16
  174. package/chunks/{read-file-KHPQ2MB6.js → read-file-S2NOCBIL.js} +4 -4
  175. package/chunks/{resumeHistoryUtils-K7RV3QBN.js → resumeHistoryUtils-QHHPSQWU.js} +22 -21
  176. package/chunks/{ripGrep-NBBVCMG4.js → ripGrep-F6TNOJUO.js} +5 -5
  177. package/chunks/{run-qwen-serve-A3JBOZCM.js → run-qwen-serve-KYBDQRDD.js} +216 -64
  178. package/chunks/{runtime-7YOU2KJ3.js → runtime-3WNOFLCR.js} +32 -29
  179. package/chunks/{scheduled-tasks-52LXK7LN.js → scheduled-tasks-RNBH56DJ.js} +23 -22
  180. package/chunks/{scheduler-J44M72VM.js → scheduler-ERMW7Q7B.js} +22 -21
  181. package/chunks/{send-message-AWKUDJBH.js → send-message-V5T3NMFM.js} +3 -3
  182. package/chunks/{serve-TRC6XJUB.js → serve-7NV46RMP.js} +25 -24
  183. package/chunks/{server-YPNTJLX2.js → server-6RZJR5QF.js} +106 -154
  184. package/chunks/{session-FMMIBFYX.js → session-Z4EV7NVV.js} +91 -63
  185. package/chunks/{session-attachments-root-LDJMNK7K.js → session-attachments-root-SG5FC52X.js} +20 -19
  186. package/chunks/{session-pr-refresh-NLR4EK2J.js → session-pr-refresh-ILC4Z3ZM.js} +22 -21
  187. package/chunks/{settings-A46L577J.js → settings-Y47SPE3X.js} +24 -23
  188. package/chunks/{shell-Q5LSQPPY.js → shell-YBVCOPVO.js} +13 -13
  189. package/chunks/{skill-75KPJRCM.js → skill-AXC63EBA.js} +4 -4
  190. package/chunks/{skill-settings-775YT4YR.js → skill-settings-AFPAYGLO.js} +24 -23
  191. package/chunks/{spawnChannel-XY73I5CU.js → spawnChannel-ZFL4J2V3.js} +20 -19
  192. package/chunks/{standalone-update-L46XXNQ2.js → standalone-update-Y2OZPLNJ.js} +21 -20
  193. package/chunks/{start-opentui-ui-WLV43247.js → start-opentui-ui-G6TKT4LI.js} +449 -210
  194. package/chunks/{startInteractiveUI-F5DKMLOV.js → startInteractiveUI-YTNDPW7J.js} +1182 -1245
  195. package/chunks/{task-create-PMAFST2T.js → task-create-MWXJFRRM.js} +3 -3
  196. package/chunks/{task-list-R2HSY2NC.js → task-list-EYO3FE57.js} +2 -2
  197. package/chunks/{task-update-JYC57USF.js → task-update-2JJJRHMT.js} +3 -3
  198. package/chunks/{team-create-2PATB77U.js → team-create-BUFLGGSH.js} +13 -13
  199. package/chunks/{team-delete-CBHVBTPB.js → team-delete-IQZ6XGFI.js} +2 -2
  200. package/chunks/{team-plan-approval-QTANEWOS.js → team-plan-approval-OUWWM42U.js} +13 -13
  201. package/chunks/{terminal-image-renderer-OGULCFNF.js → terminal-image-renderer-WH2WV5ES.js} +20 -19
  202. package/chunks/{theme-manager-CNO3QERP.js → theme-manager-5UDRARM2.js} +20 -19
  203. package/chunks/{tool-search-VXWEOZE7.js → tool-search-MCDIRPHN.js} +4 -4
  204. package/chunks/{total-session-admission-4KAADZPB.js → total-session-admission-VL27U74Z.js} +21 -20
  205. package/chunks/{trustedFolders-PPJSOPOT.js → trustedFolders-MSXT4VDD.js} +21 -20
  206. package/chunks/{update-relaunch-4PT4MW7B.js → update-relaunch-JKLEWVCB.js} +5 -5
  207. package/chunks/{updateCheck-WAVFLWNG.js → updateCheck-ARTHAJT2.js} +20 -19
  208. package/chunks/{useAutoAcceptIndicator-XNED4NRB.js → useAutoAcceptIndicator-YEAAGYVU.js} +26 -25
  209. package/chunks/{validateNonInterActiveAuth-J676DUQ2.js → validateNonInterActiveAuth-EMRQKH5S.js} +56 -55
  210. package/chunks/{version-J6SRRQB2.js → version-HFQU35WD.js} +3 -1
  211. package/chunks/{web-fetch-FMZZYX44.js → web-fetch-QBXAO6VF.js} +4 -4
  212. package/chunks/{web-search-3G2KXCX5.js → web-search-2URQXA3A.js} +186 -9
  213. package/chunks/{web-shell-static-POZHGGXE.js → web-shell-static-BFDESDD4.js} +5 -4
  214. package/chunks/{workflow-PPZZICQ7.js → workflow-JDD6WDAH.js} +204 -68
  215. package/chunks/{workspace-providers-status-IIYTAQST.js → workspace-providers-status-B4IKR6YJ.js} +27 -26
  216. package/chunks/{workspace-registration-store-VHCDXAV7.js → workspace-registration-store-PJ3YHR45.js} +1 -2
  217. package/chunks/{workspace-registry-I7VQIPS2.js → workspace-registry-WVYJ5UGB.js} +21 -20
  218. package/chunks/{workspace-runtime-coordinator-DBGNY32G.js → workspace-runtime-coordinator-DXL5YVAG.js} +21 -20
  219. package/chunks/{workspace-service-QSKB2T54.js → workspace-service-QNGAMVH7.js} +26 -25
  220. package/chunks/{workspace-skills-status-T7GPT65J.js → workspace-skills-status-BEISJIII.js} +25 -24
  221. package/chunks/{workspace-trust-reconciler-2PKRDAU4.js → workspace-trust-reconciler-ORYJF5L4.js} +26 -25
  222. package/chunks/{write-file-L76CGFTQ.js → write-file-DWLKFBTJ.js} +14 -14
  223. package/chunks/{zoom-image-TDJJY2VZ.js → zoom-image-BYVIXSNQ.js} +4 -4
  224. package/cli.js +12 -12
  225. package/export-transcript-document.js +106 -106
  226. package/package.json +4 -4
  227. package/web-shell/assets/{abnfDiagram-VCTEODGH-DHc6plZn.js → abnfDiagram-VCTEODGH-C_8kzsly.js} +1 -1
  228. package/web-shell/assets/{arc-BQ9m8TDV.js → arc-CDg7Zfpm.js} +1 -1
  229. package/web-shell/assets/{architectureDiagram-5GKGNRK7-D5ap3oVB.js → architectureDiagram-5GKGNRK7-DZzdCWyF.js} +1 -1
  230. package/web-shell/assets/{blockDiagram-NRAW4CY4-BIbnyNph.js → blockDiagram-NRAW4CY4-DI3B4gyR.js} +1 -1
  231. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BRsdx_iG.js → c4Diagram-UCG6FXSJ-CfOgwHZW.js} +1 -1
  232. package/web-shell/assets/channel-e4xwS72w.js +1 -0
  233. package/web-shell/assets/{chunk-2Q5K7J3B-3lf1fNlx.js → chunk-2Q5K7J3B-B_PUth0g.js} +1 -1
  234. package/web-shell/assets/{chunk-5VM5RSS4-DP8VNRc4.js → chunk-5VM5RSS4-CrKtvBIL.js} +1 -1
  235. package/web-shell/assets/{chunk-F27PBJKO-DrohDmZ6.js → chunk-F27PBJKO-B4z2n8Py.js} +1 -1
  236. package/web-shell/assets/{chunk-G27WJ6UU-UZ2QhSx6.js → chunk-G27WJ6UU-BUtrFEO8.js} +1 -1
  237. package/web-shell/assets/{chunk-JWPE2WC7-BIMHVcZK.js → chunk-JWPE2WC7-Cqw3aXW0.js} +1 -1
  238. package/web-shell/assets/{chunk-LCL6LL3I-izRxdSDd.js → chunk-LCL6LL3I-CZolnvls.js} +1 -1
  239. package/web-shell/assets/{chunk-POPQ4Y6H-CXADD4PP.js → chunk-POPQ4Y6H-DivgasCa.js} +1 -1
  240. package/web-shell/assets/{chunk-SVP7TREG-B96d8Y_1.js → chunk-SVP7TREG--seyb1B6.js} +1 -1
  241. package/web-shell/assets/{chunk-XXDRQBXY-CF2sVQpv.js → chunk-XXDRQBXY-D7pHtuVM.js} +1 -1
  242. package/web-shell/assets/classDiagram-DTDB5LWJ-CzXfUUOt.js +1 -0
  243. package/web-shell/assets/classDiagram-v2-JRS7N3AN-CzXfUUOt.js +1 -0
  244. package/web-shell/assets/{cose-bilkent-JH36ORCC-CT6tXVAS.js → cose-bilkent-JH36ORCC-4MWaRF_3.js} +1 -1
  245. package/web-shell/assets/{cynefin-OW5HDTMX-X1NS4vtV.js → cynefin-OW5HDTMX-nhJhAjgD.js} +1 -1
  246. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DNsKNOT4.js → cynefinDiagram-5FMLGOSQ-NF-PwXlq.js} +1 -1
  247. package/web-shell/assets/{dagre-3AP2YEHR-9-AHKqsb.js → dagre-3AP2YEHR-Bu0ncdWP.js} +1 -1
  248. package/web-shell/assets/{diagram-S7CK7UJ4-Bjgms7j6.js → diagram-S7CK7UJ4-CsvhFHZC.js} +1 -1
  249. package/web-shell/assets/{diagram-UQ7AKVKN-h6bCprbE.js → diagram-UQ7AKVKN-Ck61sIB3.js} +1 -1
  250. package/web-shell/assets/{diagram-VSXAHHWV-4SbQXVLt.js → diagram-VSXAHHWV-D0171zrb.js} +1 -1
  251. package/web-shell/assets/{diagram-VX7I27RA-B5gPCzzB.js → diagram-VX7I27RA-DvdxY4UL.js} +1 -1
  252. package/web-shell/assets/{diagram-Z3DM3KII-DFJXIA3A.js → diagram-Z3DM3KII-CGGpseiB.js} +1 -1
  253. package/web-shell/assets/{ebnfDiagram-PWID7BFC-FwyaU7VY.js → ebnfDiagram-PWID7BFC-K8-QMvY8.js} +1 -1
  254. package/web-shell/assets/{erDiagram-SSCWMZ5O-8vJQh2te.js → erDiagram-SSCWMZ5O-D316nAem.js} +1 -1
  255. package/web-shell/assets/{flowDiagram-A5DVABFB-BzA_1gMN.js → flowDiagram-A5DVABFB-B7siy_mn.js} +1 -1
  256. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-Co-ABbVX.js → ganttDiagram-EL5Y4UJY-BZQDxzTu.js} +1 -1
  257. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DW_FcyrX.js → gitGraphDiagram-WWUBYQGX-DZynLCSV.js} +1 -1
  258. package/web-shell/assets/{index-BbMXfhNG.js → index-9ie6xLTM.js} +1 -1
  259. package/web-shell/assets/{index-Bu-rZoJ-.js → index-DirkXQEg.js} +488 -474
  260. package/web-shell/assets/index-DzdST_7L.css +36 -0
  261. package/web-shell/assets/{infoDiagram-RXCK75RN-BEgfhUFN.js → infoDiagram-RXCK75RN-B0gr769A.js} +1 -1
  262. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DCsMxQmc.js → ishikawaDiagram-5VMMS53U-0pQFfjvX.js} +1 -1
  263. package/web-shell/assets/{journeyDiagram-EYS64GPL-DyIEYoHz.js → journeyDiagram-EYS64GPL-DEGtClWb.js} +1 -1
  264. package/web-shell/assets/{kanban-definition-3QL26DDD-CkxjqCNr.js → kanban-definition-3QL26DDD-CnN8gPzw.js} +1 -1
  265. package/web-shell/assets/{layout-BEWc0Al9.js → layout-C_70RhaT.js} +1 -1
  266. package/web-shell/assets/{linear-CNuNxirL.js → linear-BJ2ZLmcq.js} +1 -1
  267. package/web-shell/assets/{mermaid.core-DZBre674.js → mermaid.core-RlY0zPNC.js} +6 -6
  268. package/web-shell/assets/{mindmap-definition-FBJOCRG2-CpafFz_F.js → mindmap-definition-FBJOCRG2-CpVAxTNl.js} +1 -1
  269. package/web-shell/assets/{pegDiagram-XKGWAZYB-DfZqk_dq.js → pegDiagram-XKGWAZYB-DmrSv3hD.js} +1 -1
  270. package/web-shell/assets/{pieDiagram-E7YTZNPT-S0UWXlgC.js → pieDiagram-E7YTZNPT-CJmgp8KJ.js} +1 -1
  271. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-dd37_Ohj.js → quadrantDiagram-AXDQQJYC-UsgOyNco.js} +1 -1
  272. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH8NJZ7u.js → railroadDiagram-O6MQD6OU-DQ6gMs_W.js} +1 -1
  273. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CFdqWYih.js → requirementDiagram-EFPCY7ZU-DhqadamF.js} +1 -1
  274. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CsddcEGD.js → sankeyDiagram-P5KCCOFB-R4WnURaE.js} +1 -1
  275. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BZ270mGw.js → sequenceDiagram-WJ2MYXX4-D7BwMi_D.js} +1 -1
  276. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CGaS4DBV.js → sizeCapture-X5ZJPWSS-Bqngz088.js} +1 -1
  277. package/web-shell/assets/{stateDiagram-HBIQ2CUA-COpIzMu6.js → stateDiagram-HBIQ2CUA-DwaXPGqn.js} +1 -1
  278. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-8GCQZAvv.js +1 -0
  279. package/web-shell/assets/{swimlanes-XN3QIQJK-CMF889m3.js → swimlanes-XN3QIQJK-BsaLeRDY.js} +1 -1
  280. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-BoRBF2Yw.js +8 -0
  281. package/web-shell/assets/{timeline-definition-24CTP7MA-BelnxYz5.js → timeline-definition-24CTP7MA-NJ9G-NUU.js} +1 -1
  282. package/web-shell/assets/{vennDiagram-4TSXK5OY-CU-NRqIB.js → vennDiagram-4TSXK5OY-Ca3W4rSq.js} +1 -1
  283. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CDNKqWh-.js → wardleyDiagram-VM6X3IG4-OabvjC-6.js} +1 -1
  284. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CLqguL5D.js → xychartDiagram-S5SC5T6Z-C7rbjvpc.js} +1 -1
  285. package/web-shell/index.html +2 -2
  286. package/chunks/chunk-6YEOCHSE.js +0 -142
  287. package/chunks/chunk-X35VIWWJ.js +0 -276
  288. package/web-shell/assets/channel-uMMdTrYk.js +0 -1
  289. package/web-shell/assets/classDiagram-DTDB5LWJ-DcY-26Ig.js +0 -1
  290. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DcY-26Ig.js +0 -1
  291. package/web-shell/assets/index-CsPwZ1ut.css +0 -36
  292. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-D6qEVAji.js +0 -1
  293. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-mem5Jj4m.js +0 -8
@@ -0,0 +1,1401 @@
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) {
57
+ const cfg = {};
58
+ let hasAny = false;
59
+ if (advCfg?.enableThinking) {
60
+ cfg.extra_body = { enable_thinking: true };
61
+ hasAny = true;
62
+ }
63
+ if (advCfg?.multimodal && Object.values(advCfg.multimodal).some(Boolean)) {
64
+ cfg.modalities = advCfg.multimodal;
65
+ hasAny = true;
66
+ }
67
+ if (advCfg?.contextWindowSize && advCfg.contextWindowSize > 0) {
68
+ cfg.contextWindowSize = advCfg.contextWindowSize;
69
+ hasAny = true;
70
+ }
71
+ if (advCfg?.maxTokens && advCfg.maxTokens > 0) {
72
+ cfg.samplingParams = { max_tokens: advCfg.maxTokens };
73
+ hasAny = true;
74
+ }
75
+ return hasAny ? cfg : void 0;
76
+ }
77
+ __name(buildAdvancedGenerationConfig, "buildAdvancedGenerationConfig");
78
+ function specToModelConfig(spec, prefix, baseUrl, envKey) {
79
+ const genConfig = buildGenerationConfig(spec);
80
+ return {
81
+ id: spec.id,
82
+ name: prefix ? `[${prefix}] ${spec.id}` : spec.id,
83
+ ...spec.description ? { description: spec.description } : {},
84
+ ...spec.capabilities ? { capabilities: spec.capabilities } : {},
85
+ baseUrl,
86
+ envKey,
87
+ ...spec.supportsImageGeneration ? { supportsImageGeneration: true } : {},
88
+ ...spec.imageOnly ? { imageOnly: true } : {},
89
+ ...genConfig ? { generationConfig: genConfig } : {}
90
+ };
91
+ }
92
+ __name(specToModelConfig, "specToModelConfig");
93
+ function applyProviderCustomHeaders(models, config) {
94
+ if (!config.customHeaders) return models;
95
+ return models.map((model) => {
96
+ const existing = model.generationConfig ?? {};
97
+ return {
98
+ ...model,
99
+ generationConfig: {
100
+ ...existing,
101
+ customHeaders: {
102
+ ...config.customHeaders,
103
+ ...existing.customHeaders
104
+ }
105
+ }
106
+ };
107
+ });
108
+ }
109
+ __name(applyProviderCustomHeaders, "applyProviderCustomHeaders");
110
+ function buildModelConfigs(config, inputs) {
111
+ const envKey = resolveEnvKey(config, inputs);
112
+ const prefix = resolveModelNamePrefix(config, inputs.baseUrl);
113
+ let models;
114
+ if (config.models && !config.modelsEditable) {
115
+ models = config.models.map(
116
+ (spec) => specToModelConfig(spec, prefix, inputs.baseUrl, envKey)
117
+ );
118
+ } else if (config.models && config.modelsEditable) {
119
+ const specMap = new Map(config.models.map((s) => [s.id.toLowerCase(), s]));
120
+ models = inputs.modelIds.map((id) => {
121
+ const spec = specMap.get(id.toLowerCase());
122
+ if (spec) {
123
+ return specToModelConfig(
124
+ { ...spec, id },
125
+ prefix,
126
+ inputs.baseUrl,
127
+ envKey
128
+ );
129
+ }
130
+ const genConfig = buildAdvancedGenerationConfig(inputs.advancedConfig);
131
+ return {
132
+ id,
133
+ name: prefix ? `[${prefix}] ${id}` : id,
134
+ baseUrl: inputs.baseUrl,
135
+ envKey,
136
+ ...genConfig ? { generationConfig: genConfig } : {}
137
+ };
138
+ });
139
+ } else {
140
+ const advCfg = inputs.advancedConfig;
141
+ const displayName = /* @__PURE__ */ __name((id) => prefix ? `[${prefix}] ${id}` : id, "displayName");
142
+ models = inputs.modelIds.map((id) => {
143
+ const genConfig = buildAdvancedGenerationConfig(advCfg);
144
+ return {
145
+ id,
146
+ name: displayName(id),
147
+ baseUrl: inputs.baseUrl,
148
+ envKey,
149
+ ...genConfig ? { generationConfig: genConfig } : {}
150
+ };
151
+ });
152
+ }
153
+ return applyProviderCustomHeaders(models, config);
154
+ }
155
+ __name(buildModelConfigs, "buildModelConfigs");
156
+ function resolveMetadataKey(config) {
157
+ if (!config.models) return void 0;
158
+ if (config.id.includes(".")) {
159
+ throw new Error(
160
+ `Provider id must not contain '.' (would corrupt providerMetadata.${config.id} dotted writes): ${config.id}`
161
+ );
162
+ }
163
+ return config.id;
164
+ }
165
+ __name(resolveMetadataKey, "resolveMetadataKey");
166
+ var PROVIDER_METADATA_NS = "providerMetadata";
167
+ function resolveProviderState(config, baseUrl, models) {
168
+ const key = resolveMetadataKey(config);
169
+ if (key) {
170
+ return {
171
+ [`${PROVIDER_METADATA_NS}.${key}`]: {
172
+ version: computeModelListVersion(models),
173
+ baseUrl
174
+ }
175
+ };
176
+ }
177
+ return void 0;
178
+ }
179
+ __name(resolveProviderState, "resolveProviderState");
180
+ function buildInstallPlan(config, inputs) {
181
+ const protocol = inputs.protocol ?? config.protocol;
182
+ const envKey = resolveEnvKey(config, inputs);
183
+ const models = inputs.prebuiltModels ?? buildModelConfigs(config, inputs);
184
+ const ownsModel = config.mergeModelsByIdentity ? void 0 : resolveOwnsModel(config);
185
+ const firstModel = models[0];
186
+ if (models.length === 0) {
187
+ throw new Error(
188
+ `No models configured for provider "${config.id}". Check model list or provider configuration.`
189
+ );
190
+ }
191
+ const firstModelId = firstModel?.id;
192
+ const modelSelection = firstModelId === void 0 ? void 0 : {
193
+ modelId: firstModelId,
194
+ ...config.mergeModelsByIdentity && firstModel.baseUrl ? { baseUrl: firstModel.baseUrl } : {}
195
+ };
196
+ return {
197
+ providerId: config.id,
198
+ authType: protocol,
199
+ env: { [envKey]: inputs.apiKey },
200
+ ...modelSelection ? { modelSelection } : {},
201
+ modelProviders: [
202
+ {
203
+ authType: protocol,
204
+ models,
205
+ mergeStrategy: "prepend-and-remove-owned",
206
+ ...ownsModel ? { ownsModel } : {}
207
+ }
208
+ ],
209
+ providerState: resolveProviderState(config, inputs.baseUrl, models)
210
+ };
211
+ }
212
+ __name(buildInstallPlan, "buildInstallPlan");
213
+ function computeModelListVersion(models) {
214
+ return createHash("sha256").update(JSON.stringify(models)).digest("hex");
215
+ }
216
+ __name(computeModelListVersion, "computeModelListVersion");
217
+ var DEFAULT_BASE_URLS = {
218
+ ["openai" /* USE_OPENAI */]: "https://api.openai.com/v1",
219
+ ["anthropic" /* USE_ANTHROPIC */]: "https://api.anthropic.com/v1",
220
+ ["gemini" /* USE_GEMINI */]: "https://generativelanguage.googleapis.com"
221
+ };
222
+ function getDefaultBaseUrlForProtocol(protocol) {
223
+ if (protocol === void 0) return "";
224
+ return DEFAULT_BASE_URLS[protocol] ?? "";
225
+ }
226
+ __name(getDefaultBaseUrlForProtocol, "getDefaultBaseUrlForProtocol");
227
+ function resolveBaseUrl(config, selectedBaseUrl) {
228
+ if (typeof config.baseUrl === "string") {
229
+ return config.baseUrl;
230
+ }
231
+ if (Array.isArray(config.baseUrl)) {
232
+ const normalizedSelectedBaseUrl = normalizeBaseUrlForMatching(selectedBaseUrl);
233
+ const match = config.baseUrl.find(
234
+ (opt) => normalizeBaseUrlForMatching(opt.url) === normalizedSelectedBaseUrl
235
+ );
236
+ if (match) return match.url;
237
+ return config.baseUrl[0]?.url ?? selectedBaseUrl ?? "";
238
+ }
239
+ return selectedBaseUrl ?? "";
240
+ }
241
+ __name(resolveBaseUrl, "resolveBaseUrl");
242
+ function normalizeBaseUrlForMatching(baseUrl) {
243
+ if (baseUrl === void 0) return "";
244
+ let end = baseUrl.length;
245
+ while (end > 0 && baseUrl.charCodeAt(end - 1) === 47) {
246
+ end--;
247
+ }
248
+ return end === baseUrl.length ? baseUrl : baseUrl.slice(0, end);
249
+ }
250
+ __name(normalizeBaseUrlForMatching, "normalizeBaseUrlForMatching");
251
+ function getDefaultModelIds(config) {
252
+ return config.models?.map((s) => s.id) ?? [];
253
+ }
254
+ __name(getDefaultModelIds, "getDefaultModelIds");
255
+ function isProviderModelConfig(value) {
256
+ return typeof value === "object" && value !== null && typeof value.id === "string";
257
+ }
258
+ __name(isProviderModelConfig, "isProviderModelConfig");
259
+ function findExistingProviderModels(config, modelProviders) {
260
+ const ownsModel = resolveOwnsModel(config);
261
+ if (!ownsModel || !modelProviders) return void 0;
262
+ const protocols = config.protocolOptions?.length ? config.protocolOptions : [config.protocol];
263
+ for (const protocol of protocols) {
264
+ const raw = modelProviders[protocol];
265
+ if (!Array.isArray(raw)) continue;
266
+ const models = raw.filter(
267
+ (m) => isProviderModelConfig(m) && ownsModel(m)
268
+ );
269
+ if (models.length > 0) return { protocol, models };
270
+ }
271
+ return void 0;
272
+ }
273
+ __name(findExistingProviderModels, "findExistingProviderModels");
274
+ function shouldShowStep(config, step) {
275
+ switch (step) {
276
+ case "protocol":
277
+ return Array.isArray(config.protocolOptions) && config.protocolOptions.length > 1;
278
+ case "baseUrl":
279
+ return config.baseUrl === void 0 || Array.isArray(config.baseUrl);
280
+ case "apiKey":
281
+ return true;
282
+ case "models":
283
+ return !config.models || config.modelsEditable === true;
284
+ case "advancedConfig":
285
+ return config.showAdvancedConfig === true;
286
+ default:
287
+ return false;
288
+ }
289
+ }
290
+ __name(shouldShowStep, "shouldShowStep");
291
+ function providerMatchesCredentials(config, baseUrl, envKey) {
292
+ let configEnvKey;
293
+ if (typeof config.envKey === "string") {
294
+ configEnvKey = config.envKey;
295
+ } else if (typeof config.envKey === "function" && baseUrl) {
296
+ const protocols = config.protocolOptions?.length ? config.protocolOptions : [config.protocol];
297
+ for (const proto of protocols) {
298
+ try {
299
+ const derived = config.envKey(proto, baseUrl);
300
+ if (derived === envKey) {
301
+ configEnvKey = derived;
302
+ break;
303
+ }
304
+ } catch (err) {
305
+ let safeHost;
306
+ try {
307
+ safeHost = new URL(baseUrl).hostname;
308
+ } catch {
309
+ safeHost = "[invalid]";
310
+ }
311
+ console.warn(
312
+ `[providerMatchesCredentials] envKey(${proto}, ${safeHost}) threw (${err instanceof Error ? err.constructor.name : typeof err}); skipping this protocol`
313
+ );
314
+ }
315
+ }
316
+ }
317
+ if (configEnvKey !== envKey) {
318
+ return false;
319
+ }
320
+ if (typeof config.baseUrl === "string") {
321
+ return config.baseUrl === baseUrl;
322
+ }
323
+ if (Array.isArray(config.baseUrl)) {
324
+ return config.baseUrl.some((opt) => opt.url === baseUrl);
325
+ }
326
+ if (config.baseUrl === void 0 && configEnvKey !== void 0) {
327
+ return Boolean(baseUrl);
328
+ }
329
+ return false;
330
+ }
331
+ __name(providerMatchesCredentials, "providerMatchesCredentials");
332
+ function buildProviderTemplate(config, baseUrl) {
333
+ const resolved = resolveBaseUrl(config, baseUrl);
334
+ return buildModelConfigs(config, {
335
+ baseUrl: resolved,
336
+ apiKey: "",
337
+ modelIds: getDefaultModelIds(config)
338
+ });
339
+ }
340
+ __name(buildProviderTemplate, "buildProviderTemplate");
341
+
342
+ // packages/core/src/providers/all-providers.ts
343
+ init_esbuild_shims();
344
+
345
+ // packages/core/src/providers/presets/alibaba-coding-plan.ts
346
+ init_esbuild_shims();
347
+ var CODING_PLAN_ENV_KEY = "BAILIAN_CODING_PLAN_API_KEY";
348
+ var CODING_PLAN_CHINA_BASE_URL = "https://coding.dashscope.aliyuncs.com/v1";
349
+ var CODING_PLAN_GLOBAL_BASE_URL = "https://coding-intl.dashscope.aliyuncs.com/v1";
350
+ var MODELSTUDIO_MODELS = [
351
+ {
352
+ id: "qwen3.5-plus",
353
+ capabilities: {
354
+ reasoning: {
355
+ thinking: true,
356
+ toggleOnly: true,
357
+ disableField: "enable_thinking"
358
+ }
359
+ },
360
+ contextWindowSize: 1e6,
361
+ enableThinking: true,
362
+ modalities: { image: true, video: true }
363
+ },
364
+ {
365
+ id: "qwen3.6-plus",
366
+ capabilities: {
367
+ reasoning: {
368
+ thinking: true,
369
+ toggleOnly: true,
370
+ disableField: "enable_thinking"
371
+ }
372
+ },
373
+ description: "Currently available to Pro subscribers only.",
374
+ contextWindowSize: 1e6,
375
+ enableThinking: true,
376
+ modalities: { image: true, video: true }
377
+ },
378
+ {
379
+ id: "qwen3.7-plus",
380
+ capabilities: {
381
+ reasoning: {
382
+ thinking: true,
383
+ toggleOnly: true,
384
+ disableField: "enable_thinking"
385
+ }
386
+ },
387
+ contextWindowSize: 1e6,
388
+ enableThinking: true
389
+ },
390
+ { id: "glm-5", contextWindowSize: 202752, enableThinking: true },
391
+ {
392
+ id: "kimi-k2.5",
393
+ capabilities: {
394
+ reasoning: {
395
+ thinking: true,
396
+ toggleOnly: true,
397
+ disableField: "enable_thinking"
398
+ }
399
+ },
400
+ contextWindowSize: 262144,
401
+ enableThinking: true,
402
+ modalities: { image: true, video: true }
403
+ },
404
+ { id: "MiniMax-M2.5", contextWindowSize: 196608, enableThinking: true },
405
+ { id: "qwen3-coder-plus", contextWindowSize: 1e6 },
406
+ { id: "qwen3-coder-next", contextWindowSize: 262144 },
407
+ {
408
+ id: "qwen3-max-2026-01-23",
409
+ capabilities: {
410
+ reasoning: {
411
+ thinking: true,
412
+ toggleOnly: true,
413
+ disableField: "enable_thinking"
414
+ }
415
+ },
416
+ contextWindowSize: 262144,
417
+ enableThinking: true
418
+ },
419
+ { id: "glm-4.7", contextWindowSize: 202752, enableThinking: true }
420
+ ];
421
+ var codingPlanProvider = {
422
+ id: "coding-plan",
423
+ label: "Coding Plan",
424
+ description: "For individual developers \xB7 Weekly quota included",
425
+ protocol: "openai" /* USE_OPENAI */,
426
+ baseUrl: [
427
+ {
428
+ id: "aliyun",
429
+ label: "China (Beijing)",
430
+ url: CODING_PLAN_CHINA_BASE_URL,
431
+ documentationUrl: "https://help.aliyun.com/zh/model-studio/coding-plan"
432
+ },
433
+ {
434
+ id: "alibabacloud",
435
+ label: "Singapore (International)",
436
+ url: CODING_PLAN_GLOBAL_BASE_URL,
437
+ documentationUrl: "https://www.alibabacloud.com/help/en/model-studio/coding-plan"
438
+ }
439
+ ],
440
+ envKey: CODING_PLAN_ENV_KEY,
441
+ models: MODELSTUDIO_MODELS,
442
+ modelsEditable: true,
443
+ supportsModelDiscovery: true,
444
+ modelNamePrefix: /* @__PURE__ */ __name((baseUrl) => baseUrl === CODING_PLAN_GLOBAL_BASE_URL ? "ModelStudio Coding Plan for Global/Intl" : "ModelStudio Coding Plan", "modelNamePrefix"),
445
+ apiKeyPlaceholder: "sk-sp-...",
446
+ validateApiKey: /* @__PURE__ */ __name((key) => !key.startsWith("sk-sp-") ? 'Invalid API key. Coding Plan API keys start with "sk-sp-". Please check.' : null, "validateApiKey"),
447
+ 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"),
448
+ uiGroup: "alibaba",
449
+ uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
450
+ };
451
+
452
+ // packages/core/src/providers/presets/alibaba-token-plan.ts
453
+ init_esbuild_shims();
454
+ var TOKEN_PLAN_ENV_KEY = "BAILIAN_TOKEN_PLAN_API_KEY";
455
+ var TOKEN_PLAN_CHINA_BASE_URL = "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1";
456
+ var TOKEN_PLAN_GLOBAL_BASE_URL = "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1";
457
+ var TOKEN_PLAN_MODELS = [
458
+ {
459
+ id: "qwen3.7-plus",
460
+ capabilities: {
461
+ reasoning: {
462
+ thinking: true,
463
+ toggleOnly: true,
464
+ disableField: "enable_thinking"
465
+ }
466
+ },
467
+ contextWindowSize: 1e6,
468
+ enableThinking: true,
469
+ modalities: { image: true, video: true }
470
+ },
471
+ {
472
+ id: "qwen3.6-plus",
473
+ capabilities: {
474
+ reasoning: {
475
+ thinking: true,
476
+ toggleOnly: true,
477
+ disableField: "enable_thinking"
478
+ }
479
+ },
480
+ contextWindowSize: 1e6,
481
+ enableThinking: true,
482
+ modalities: { image: true, video: true }
483
+ },
484
+ {
485
+ id: "qwen3.7-max",
486
+ capabilities: {
487
+ reasoning: {
488
+ thinking: true,
489
+ toggleOnly: true,
490
+ disableField: "enable_thinking"
491
+ }
492
+ },
493
+ contextWindowSize: 1e6,
494
+ enableThinking: true
495
+ },
496
+ {
497
+ id: "qwen3.8-max",
498
+ capabilities: {
499
+ reasoning: {
500
+ thinking: true,
501
+ efforts: ["low", "medium", "xhigh"],
502
+ defaultEffort: "xhigh",
503
+ canDisable: false,
504
+ disableField: "reasoning_effort"
505
+ }
506
+ },
507
+ contextWindowSize: 1e6,
508
+ enableThinking: true,
509
+ thinkingMandatory: true,
510
+ modalities: { image: true, video: true }
511
+ },
512
+ {
513
+ id: "qwen3.8-max-preview",
514
+ capabilities: {
515
+ reasoning: {
516
+ thinking: true,
517
+ efforts: ["low", "medium", "xhigh"],
518
+ defaultEffort: "xhigh",
519
+ canDisable: false,
520
+ disableField: "reasoning_effort"
521
+ }
522
+ },
523
+ contextWindowSize: 1e6,
524
+ enableThinking: true,
525
+ thinkingMandatory: true,
526
+ modalities: { image: true, video: true }
527
+ },
528
+ {
529
+ id: "qwen3.6-flash",
530
+ capabilities: {
531
+ reasoning: {
532
+ thinking: true,
533
+ toggleOnly: true,
534
+ disableField: "enable_thinking"
535
+ }
536
+ },
537
+ contextWindowSize: 1e6,
538
+ enableThinking: true
539
+ },
540
+ {
541
+ id: "deepseek-v4-pro",
542
+ capabilities: {
543
+ reasoning: {
544
+ thinking: true,
545
+ efforts: ["high", "max"],
546
+ defaultEffort: "high",
547
+ disableField: "enable_thinking"
548
+ }
549
+ },
550
+ contextWindowSize: 1e6
551
+ },
552
+ {
553
+ id: "deepseek-v4-flash-0731",
554
+ capabilities: {
555
+ reasoning: {
556
+ thinking: true,
557
+ efforts: ["low", "high", "max"],
558
+ defaultEffort: "high",
559
+ disableField: "enable_thinking"
560
+ }
561
+ },
562
+ contextWindowSize: 1e6
563
+ },
564
+ {
565
+ id: "deepseek-v3.2",
566
+ capabilities: {
567
+ reasoning: {
568
+ thinking: true,
569
+ toggleOnly: true,
570
+ disableField: "enable_thinking"
571
+ }
572
+ },
573
+ contextWindowSize: 131072
574
+ },
575
+ {
576
+ id: "kimi-k2.7-code",
577
+ capabilities: {
578
+ reasoning: {
579
+ thinking: true,
580
+ toggleOnly: true,
581
+ canDisable: false,
582
+ disableField: "enable_thinking"
583
+ }
584
+ },
585
+ contextWindowSize: 262144,
586
+ enableThinking: true,
587
+ modalities: { image: true, video: true },
588
+ thinkingMandatory: true
589
+ },
590
+ {
591
+ id: "kimi-k2.6",
592
+ capabilities: {
593
+ reasoning: {
594
+ thinking: true,
595
+ toggleOnly: true,
596
+ disableField: "enable_thinking"
597
+ }
598
+ },
599
+ contextWindowSize: 262144,
600
+ enableThinking: true
601
+ },
602
+ {
603
+ id: "kimi-k2.5",
604
+ capabilities: {
605
+ reasoning: {
606
+ thinking: true,
607
+ toggleOnly: true,
608
+ disableField: "enable_thinking"
609
+ }
610
+ },
611
+ contextWindowSize: 262144,
612
+ enableThinking: true,
613
+ modalities: { image: true, video: true }
614
+ },
615
+ { id: "glm-5.2", contextWindowSize: 1e6, enableThinking: true },
616
+ { id: "glm-5.1", contextWindowSize: 202752, enableThinking: true },
617
+ { id: "glm-5", contextWindowSize: 202752, enableThinking: true },
618
+ { id: "MiniMax-M2.5", contextWindowSize: 196608 },
619
+ {
620
+ id: "qwen3.8-flash",
621
+ contextWindowSize: 1e6,
622
+ capabilities: {
623
+ reasoning: {
624
+ thinking: true,
625
+ efforts: ["low", "medium", "xhigh"],
626
+ defaultEffort: "xhigh",
627
+ disableField: "reasoning_effort"
628
+ }
629
+ },
630
+ modalities: { image: true, video: true }
631
+ },
632
+ {
633
+ id: "deepseek-v4-pro-0813",
634
+ contextWindowSize: 1e6,
635
+ capabilities: {
636
+ reasoning: {
637
+ thinking: true,
638
+ efforts: ["low", "high", "max"],
639
+ defaultEffort: "high",
640
+ disableField: "enable_thinking"
641
+ }
642
+ }
643
+ }
644
+ ];
645
+ var tokenPlanProvider = {
646
+ id: "token-plan",
647
+ label: "Token Plan",
648
+ description: "For teams and companies \xB7 Usage-based billing with dedicated endpoint",
649
+ protocol: "openai" /* USE_OPENAI */,
650
+ baseUrl: [
651
+ {
652
+ id: "cn-beijing",
653
+ label: "China (Beijing)",
654
+ url: TOKEN_PLAN_CHINA_BASE_URL,
655
+ documentationUrl: "https://bailian.console.aliyun.com/cn-beijing?tab=doc#/doc/?type=model&url=3028856"
656
+ },
657
+ {
658
+ id: "ap-southeast-1",
659
+ label: "Singapore (International)",
660
+ url: TOKEN_PLAN_GLOBAL_BASE_URL,
661
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model"
662
+ }
663
+ ],
664
+ envKey: TOKEN_PLAN_ENV_KEY,
665
+ models: TOKEN_PLAN_MODELS,
666
+ modelsEditable: true,
667
+ supportsModelDiscovery: true,
668
+ modelNamePrefix: /* @__PURE__ */ __name((baseUrl) => baseUrl === TOKEN_PLAN_GLOBAL_BASE_URL ? "ModelStudio Token Plan for Global/Intl" : "ModelStudio Token Plan", "modelNamePrefix"),
669
+ 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"),
670
+ // Same server-side search tools as the Standard endpoints, billed against
671
+ // the plan's quota (probe 2026-09-08: `web_search` + `web_extractor` both
672
+ // execute and are reported under `usage.x_tools`).
673
+ webSearch: { backend: "dashscope" },
674
+ uiGroup: "alibaba",
675
+ uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
676
+ };
677
+
678
+ // packages/core/src/providers/presets/alibaba-standard.ts
679
+ init_esbuild_shims();
680
+ var alibabaStandardProvider = {
681
+ id: "alibabaStandard",
682
+ label: "Standard API Key",
683
+ description: "Connect with an existing ModelStudio API key",
684
+ protocol: "openai" /* USE_OPENAI */,
685
+ baseUrl: [
686
+ {
687
+ id: "cn-beijing",
688
+ label: "China (Beijing)",
689
+ url: "https://dashscope.aliyuncs.com/compatible-mode/v1",
690
+ documentationUrl: "https://bailian.console.aliyun.com/cn-beijing?tab=api#/api"
691
+ },
692
+ {
693
+ id: "sg-singapore",
694
+ label: "Singapore",
695
+ url: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
696
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=api#/api/?type=model&url=2712195"
697
+ },
698
+ {
699
+ id: "us-virginia",
700
+ label: "US (Virginia)",
701
+ url: "https://dashscope-us.aliyuncs.com/compatible-mode/v1",
702
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/us-east-1?tab=api#/api/?type=model&url=2712195"
703
+ },
704
+ {
705
+ id: "cn-hongkong",
706
+ label: "China (Hong Kong)",
707
+ url: "https://cn-hongkong.dashscope.aliyuncs.com/compatible-mode/v1",
708
+ documentationUrl: "https://modelstudio.console.alibabacloud.com/cn-hongkong?tab=api#/api/?type=model&url=2712195"
709
+ }
710
+ ],
711
+ envKey: "DASHSCOPE_API_KEY",
712
+ models: [
713
+ {
714
+ id: "qwen3.6-plus",
715
+ capabilities: {
716
+ reasoning: {
717
+ thinking: true,
718
+ toggleOnly: true,
719
+ disableField: "enable_thinking"
720
+ }
721
+ },
722
+ contextWindowSize: 1e6,
723
+ enableThinking: true
724
+ },
725
+ {
726
+ id: "qwen3.7-plus",
727
+ capabilities: {
728
+ reasoning: {
729
+ thinking: true,
730
+ toggleOnly: true,
731
+ disableField: "enable_thinking"
732
+ }
733
+ },
734
+ contextWindowSize: 1e6,
735
+ enableThinking: true
736
+ },
737
+ {
738
+ id: "qwen3.7-max",
739
+ capabilities: {
740
+ reasoning: {
741
+ thinking: true,
742
+ toggleOnly: true,
743
+ disableField: "enable_thinking"
744
+ }
745
+ },
746
+ contextWindowSize: 1e6,
747
+ enableThinking: true
748
+ },
749
+ { id: "glm-5.1", contextWindowSize: 202752, enableThinking: true },
750
+ {
751
+ id: "deepseek-v4-pro",
752
+ capabilities: {
753
+ reasoning: {
754
+ thinking: true,
755
+ efforts: ["high", "max"],
756
+ defaultEffort: "high",
757
+ disableField: "enable_thinking"
758
+ }
759
+ },
760
+ contextWindowSize: 1e6
761
+ },
762
+ {
763
+ id: "deepseek-v4-flash",
764
+ capabilities: {
765
+ reasoning: {
766
+ thinking: true,
767
+ efforts: ["high", "max"],
768
+ defaultEffort: "high",
769
+ disableField: "enable_thinking"
770
+ }
771
+ },
772
+ contextWindowSize: 1e6
773
+ },
774
+ {
775
+ id: "qwen3.8-max",
776
+ contextWindowSize: 1e6,
777
+ capabilities: {
778
+ reasoning: {
779
+ thinking: true,
780
+ efforts: ["low", "medium", "xhigh"],
781
+ defaultEffort: "xhigh",
782
+ disableField: "reasoning_effort"
783
+ }
784
+ },
785
+ modalities: { image: true, video: true }
786
+ },
787
+ {
788
+ id: "qwen3.8-max-0902",
789
+ contextWindowSize: 1e6,
790
+ capabilities: {
791
+ reasoning: {
792
+ thinking: true,
793
+ efforts: ["low", "medium", "xhigh"],
794
+ defaultEffort: "xhigh",
795
+ disableField: "reasoning_effort"
796
+ }
797
+ },
798
+ modalities: { image: true, video: true }
799
+ },
800
+ {
801
+ id: "qwen3.8-flash",
802
+ contextWindowSize: 1e6,
803
+ capabilities: {
804
+ reasoning: {
805
+ thinking: true,
806
+ efforts: ["low", "medium", "xhigh"],
807
+ defaultEffort: "xhigh",
808
+ disableField: "reasoning_effort"
809
+ }
810
+ },
811
+ modalities: { image: true, video: true }
812
+ },
813
+ {
814
+ id: "deepseek-v4-pro-0813",
815
+ contextWindowSize: 1e6,
816
+ capabilities: {
817
+ reasoning: {
818
+ thinking: true,
819
+ efforts: ["low", "high", "max"],
820
+ defaultEffort: "high",
821
+ disableField: "enable_thinking"
822
+ }
823
+ }
824
+ },
825
+ {
826
+ id: "deepseek-v4-flash-0731",
827
+ contextWindowSize: 1e6,
828
+ capabilities: {
829
+ reasoning: {
830
+ thinking: true,
831
+ efforts: ["low", "high", "max"],
832
+ defaultEffort: "high",
833
+ disableField: "enable_thinking"
834
+ }
835
+ }
836
+ },
837
+ {
838
+ id: "kimi-k3",
839
+ thinkingMandatory: true,
840
+ contextWindowSize: 1e6,
841
+ capabilities: {
842
+ reasoning: {
843
+ thinking: true,
844
+ efforts: ["low", "high", "max"],
845
+ defaultEffort: "max",
846
+ canDisable: false,
847
+ disableField: "reasoning_effort"
848
+ }
849
+ },
850
+ modalities: { image: true }
851
+ },
852
+ {
853
+ id: "kimi-k2.7-code",
854
+ thinkingMandatory: true,
855
+ enableThinking: true,
856
+ contextWindowSize: 262144,
857
+ capabilities: {
858
+ reasoning: {
859
+ thinking: true,
860
+ toggleOnly: true,
861
+ canDisable: false,
862
+ disableField: "enable_thinking"
863
+ }
864
+ },
865
+ modalities: { image: true, video: true }
866
+ },
867
+ {
868
+ id: "kimi-k2.6",
869
+ enableThinking: true,
870
+ contextWindowSize: 262144,
871
+ capabilities: {
872
+ reasoning: {
873
+ thinking: true,
874
+ toggleOnly: true,
875
+ disableField: "enable_thinking"
876
+ }
877
+ },
878
+ modalities: { image: true, video: true }
879
+ }
880
+ ],
881
+ modelsEditable: true,
882
+ modelNamePrefix: "ModelStudio Standard",
883
+ // The Responses API on these endpoints serves the server-side `web_search`
884
+ // / `web_extractor` tools with the same key, so the built-in tool needs no
885
+ // extra configuration.
886
+ webSearch: { backend: "dashscope" },
887
+ uiGroup: "alibaba",
888
+ uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
889
+ };
890
+
891
+ // packages/core/src/providers/presets/openrouter.ts
892
+ init_esbuild_shims();
893
+ var OPENROUTER_ENV_KEY = "OPENROUTER_API_KEY";
894
+ var OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1";
895
+ var openRouterProvider = {
896
+ id: "openrouter",
897
+ label: "OpenRouter",
898
+ description: "Connect with an OpenRouter API key (get one from openrouter.ai/keys)",
899
+ protocol: "openai" /* USE_OPENAI */,
900
+ baseUrl: OPENROUTER_BASE_URL,
901
+ envKey: OPENROUTER_ENV_KEY,
902
+ models: [
903
+ { id: "z-ai/glm-4.5-air:free", contextWindowSize: 128e3 },
904
+ { id: "openai/gpt-oss-120b:free", contextWindowSize: 131072 }
905
+ ],
906
+ modelsEditable: true,
907
+ modelNamePrefix: "OpenRouter",
908
+ ownsModel: /* @__PURE__ */ __name((model) => {
909
+ if (model.envKey !== OPENROUTER_ENV_KEY) return false;
910
+ try {
911
+ const host = new URL(model.baseUrl ?? "").hostname;
912
+ return host === "openrouter.ai" || host.endsWith(".openrouter.ai");
913
+ } catch {
914
+ return false;
915
+ }
916
+ }, "ownsModel"),
917
+ customHeaders: {
918
+ "HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
919
+ "X-OpenRouter-Title": "Qwen Code"
920
+ },
921
+ documentationUrl: "https://openrouter.ai/docs",
922
+ uiGroup: "third-party"
923
+ };
924
+
925
+ // packages/core/src/providers/presets/requesty.ts
926
+ init_esbuild_shims();
927
+ var REQUESTY_ENV_KEY = "REQUESTY_API_KEY";
928
+ var REQUESTY_BASE_URL = "https://router.requesty.ai/v1";
929
+ var requestyProvider = {
930
+ id: "requesty",
931
+ label: "Requesty",
932
+ description: "Connect with a Requesty API key (get one from app.requesty.ai/api-keys)",
933
+ protocol: "openai" /* USE_OPENAI */,
934
+ baseUrl: REQUESTY_BASE_URL,
935
+ envKey: REQUESTY_ENV_KEY,
936
+ models: [
937
+ { id: "openai/gpt-4o-mini", contextWindowSize: 128e3 },
938
+ { id: "openai/gpt-4o", contextWindowSize: 128e3 }
939
+ ],
940
+ modelsEditable: true,
941
+ modelNamePrefix: "Requesty",
942
+ ownsModel: /* @__PURE__ */ __name((model) => {
943
+ if (model.envKey !== REQUESTY_ENV_KEY) return false;
944
+ try {
945
+ const host = new URL(model.baseUrl ?? "").hostname;
946
+ return host === "router.requesty.ai" || host.endsWith(".requesty.ai");
947
+ } catch {
948
+ return false;
949
+ }
950
+ }, "ownsModel"),
951
+ customHeaders: {
952
+ "HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
953
+ "X-Title": "Qwen Code"
954
+ },
955
+ documentationUrl: "https://docs.requesty.ai",
956
+ uiGroup: "third-party"
957
+ };
958
+
959
+ // packages/core/src/providers/presets/deepseek.ts
960
+ init_esbuild_shims();
961
+ var deepseekProvider = {
962
+ id: "deepseek",
963
+ label: "DeepSeek API Key",
964
+ description: "Quick setup for DeepSeek (deepseek-v4-flash, deepseek-v4-pro)",
965
+ protocol: "openai" /* USE_OPENAI */,
966
+ baseUrl: "https://api.deepseek.com",
967
+ envKey: "DEEPSEEK_API_KEY",
968
+ models: [
969
+ {
970
+ id: "deepseek-v4-pro",
971
+ contextWindowSize: 1e6,
972
+ capabilities: {
973
+ reasoning: {
974
+ thinking: true,
975
+ efforts: ["low", "high", "max"],
976
+ defaultEffort: "high",
977
+ disableField: "thinking"
978
+ }
979
+ }
980
+ },
981
+ {
982
+ id: "deepseek-v4-flash",
983
+ capabilities: {
984
+ reasoning: {
985
+ thinking: true,
986
+ efforts: ["low", "high", "max"],
987
+ defaultEffort: "high",
988
+ disableField: "thinking"
989
+ }
990
+ },
991
+ contextWindowSize: 1e6
992
+ }
993
+ ],
994
+ modelsEditable: true,
995
+ modelNamePrefix: "DeepSeek",
996
+ documentationUrl: "https://api-docs.deepseek.com/zh-cn/",
997
+ uiGroup: "third-party"
998
+ };
999
+
1000
+ // packages/core/src/providers/presets/grok.ts
1001
+ init_esbuild_shims();
1002
+ var GROK_ENV_KEY = "XAI_API_KEY";
1003
+ var GROK_BASE_URL = "https://api.x.ai/v1";
1004
+ var grokProvider = {
1005
+ id: "grok",
1006
+ label: "Grok (xAI) API Key",
1007
+ description: "Quick setup for xAI Grok chat & code models",
1008
+ protocol: "openai" /* USE_OPENAI */,
1009
+ baseUrl: GROK_BASE_URL,
1010
+ envKey: GROK_ENV_KEY,
1011
+ // xAI's API follows the standard OpenAI format. Grok models reason by
1012
+ // default (grok-4.5 exposes an optional reasoning_effort knob, default
1013
+ // high) and have no Qwen-style enable_thinking toggle, so the preset
1014
+ // carries only each model's context window.
1015
+ models: [
1016
+ { id: "grok-4.5", contextWindowSize: 5e5 },
1017
+ { id: "grok-4.3", contextWindowSize: 1e6 },
1018
+ { id: "grok-4.20-0309-reasoning", contextWindowSize: 1e6 },
1019
+ { id: "grok-4.20-0309-non-reasoning", contextWindowSize: 1e6 },
1020
+ { id: "grok-4.20-multi-agent-0309", contextWindowSize: 1e6 },
1021
+ { id: "grok-build-0.1", contextWindowSize: 262144 }
1022
+ ],
1023
+ modelsEditable: true,
1024
+ modelNamePrefix: "Grok",
1025
+ documentationUrl: "https://docs.x.ai/docs",
1026
+ uiGroup: "third-party"
1027
+ };
1028
+
1029
+ // packages/core/src/providers/presets/minimax.ts
1030
+ init_esbuild_shims();
1031
+ var minimaxProvider = {
1032
+ id: "minimax",
1033
+ label: "MiniMax API Key",
1034
+ description: "Quick setup for MiniMax models",
1035
+ protocol: "openai" /* USE_OPENAI */,
1036
+ baseUrl: [
1037
+ {
1038
+ id: "international",
1039
+ label: "International",
1040
+ url: "https://api.minimax.io/v1",
1041
+ documentationUrl: "https://www.minimax.io/platform"
1042
+ },
1043
+ {
1044
+ id: "china",
1045
+ label: "China",
1046
+ url: "https://api.minimaxi.com/v1",
1047
+ documentationUrl: "https://platform.minimaxi.com"
1048
+ }
1049
+ ],
1050
+ envKey: "MINIMAX_API_KEY",
1051
+ models: [
1052
+ {
1053
+ id: "MiniMax-M3",
1054
+ contextWindowSize: 1e6,
1055
+ modalities: { image: true, video: true }
1056
+ },
1057
+ { id: "MiniMax-M2.7", contextWindowSize: 204800 },
1058
+ { id: "MiniMax-M2.7-highspeed", contextWindowSize: 204800 },
1059
+ { id: "MiniMax-M2.5", contextWindowSize: 196608 },
1060
+ { id: "MiniMax-M2.5-highspeed", contextWindowSize: 196608 },
1061
+ { id: "image-01", imageOnly: true },
1062
+ { id: "image-01-live", imageOnly: true }
1063
+ ],
1064
+ modelsEditable: true,
1065
+ modelNamePrefix: "MiniMax",
1066
+ uiGroup: "third-party"
1067
+ };
1068
+
1069
+ // packages/core/src/providers/presets/zai.ts
1070
+ init_esbuild_shims();
1071
+ var zaiProvider = {
1072
+ id: "zai",
1073
+ label: "Z.AI API Key",
1074
+ description: "Quick setup for Z.AI models",
1075
+ protocol: "openai" /* USE_OPENAI */,
1076
+ baseUrl: [
1077
+ {
1078
+ id: "standard-api-key",
1079
+ label: "Standard API Key",
1080
+ url: "https://api.z.ai/api/paas/v4",
1081
+ documentationUrl: "https://docs.z.ai/"
1082
+ },
1083
+ {
1084
+ id: "coding-plan",
1085
+ label: "Coding Plan",
1086
+ url: "https://api.z.ai/api/coding/paas/v4",
1087
+ documentationUrl: "https://docs.z.ai/"
1088
+ }
1089
+ ],
1090
+ envKey: "ZAI_API_KEY",
1091
+ models: [
1092
+ { id: "GLM-5.2", contextWindowSize: 1e6, enableThinking: true },
1093
+ { id: "GLM-5.1", contextWindowSize: 204800, enableThinking: true },
1094
+ { id: "GLM-5", contextWindowSize: 204800 },
1095
+ { id: "GLM-5-Turbo", contextWindowSize: 204800 }
1096
+ ],
1097
+ modelsEditable: true,
1098
+ modelNamePrefix: "Z.AI",
1099
+ uiGroup: "third-party"
1100
+ };
1101
+
1102
+ // packages/core/src/providers/presets/moonshot.ts
1103
+ init_esbuild_shims();
1104
+ var moonshotProvider = {
1105
+ id: "moonshot",
1106
+ label: "Kimi (Moonshot AI) API Key",
1107
+ description: "Quick setup for Kimi models",
1108
+ protocol: "openai" /* USE_OPENAI */,
1109
+ baseUrl: [
1110
+ {
1111
+ id: "international",
1112
+ label: "International",
1113
+ url: "https://api.moonshot.ai/v1",
1114
+ documentationUrl: "https://platform.kimi.ai/docs"
1115
+ },
1116
+ {
1117
+ id: "china",
1118
+ label: "China",
1119
+ url: "https://api.moonshot.cn/v1",
1120
+ documentationUrl: "https://platform.moonshot.cn/docs"
1121
+ }
1122
+ ],
1123
+ envKey: "MOONSHOT_API_KEY",
1124
+ models: [
1125
+ {
1126
+ id: "kimi-k3",
1127
+ capabilities: {
1128
+ reasoning: {
1129
+ thinking: true,
1130
+ efforts: ["low", "high", "max"],
1131
+ defaultEffort: "max",
1132
+ canDisable: false,
1133
+ disableField: "reasoning_effort"
1134
+ }
1135
+ },
1136
+ contextWindowSize: 1e6,
1137
+ // K3 always thinks: the API exposes `reasoning_effort` but no way to
1138
+ // turn thinking off, so never emit a disable shape on the wire.
1139
+ thinkingMandatory: true,
1140
+ modalities: { image: true, video: true }
1141
+ },
1142
+ {
1143
+ id: "kimi-k2.7-code",
1144
+ capabilities: {
1145
+ reasoning: {
1146
+ thinking: true,
1147
+ toggleOnly: true,
1148
+ canDisable: false,
1149
+ disableField: "thinking"
1150
+ }
1151
+ },
1152
+ contextWindowSize: 262144,
1153
+ modalities: { image: true, video: true },
1154
+ thinkingMandatory: true
1155
+ },
1156
+ {
1157
+ id: "kimi-k2.7-code-highspeed",
1158
+ capabilities: {
1159
+ reasoning: {
1160
+ thinking: true,
1161
+ toggleOnly: true,
1162
+ canDisable: false,
1163
+ disableField: "thinking"
1164
+ }
1165
+ },
1166
+ contextWindowSize: 262144,
1167
+ modalities: { image: true, video: true },
1168
+ thinkingMandatory: true
1169
+ },
1170
+ {
1171
+ id: "kimi-k2.6",
1172
+ capabilities: {
1173
+ reasoning: {
1174
+ thinking: true,
1175
+ toggleOnly: true,
1176
+ disableField: "thinking"
1177
+ }
1178
+ },
1179
+ contextWindowSize: 262144,
1180
+ modalities: { image: true, video: true }
1181
+ }
1182
+ ],
1183
+ modelsEditable: true,
1184
+ modelNamePrefix: "Kimi",
1185
+ uiGroup: "third-party"
1186
+ };
1187
+
1188
+ // packages/core/src/providers/presets/idealab.ts
1189
+ init_esbuild_shims();
1190
+ var idealabProvider = {
1191
+ id: "idealab",
1192
+ label: "Idealab API Key",
1193
+ description: "Alibaba internal LLM service (Qwen3.6-Plus-DogFooding, DeepSeek V4, Kimi K2.6)",
1194
+ protocol: "openai" /* USE_OPENAI */,
1195
+ baseUrl: "https://idealab.alibaba-inc.com/api/openai/v1",
1196
+ envKey: "IDEALAB_API_KEY",
1197
+ models: [
1198
+ {
1199
+ id: "Qwen3.6-Plus-DogFooding",
1200
+ contextWindowSize: 1e6,
1201
+ enableThinking: true,
1202
+ modalities: { image: true, video: true }
1203
+ },
1204
+ {
1205
+ id: "bailian/deepseek-v4-pro",
1206
+ contextWindowSize: 1e6,
1207
+ enableThinking: true
1208
+ },
1209
+ {
1210
+ id: "bailian/deepseek-v4-flash",
1211
+ contextWindowSize: 1e6,
1212
+ enableThinking: true
1213
+ },
1214
+ {
1215
+ id: "bailian/kimi-k2.6",
1216
+ contextWindowSize: 262144,
1217
+ enableThinking: true
1218
+ }
1219
+ ],
1220
+ modelsEditable: true,
1221
+ modelNamePrefix: "Idealab",
1222
+ uiGroup: "third-party"
1223
+ };
1224
+
1225
+ // packages/core/src/providers/presets/modelscope.ts
1226
+ init_esbuild_shims();
1227
+ var modelscopeProvider = {
1228
+ id: "modelscope",
1229
+ label: "ModelScope API Key",
1230
+ description: "Quick setup for ModelScope API Inference",
1231
+ protocol: "openai" /* USE_OPENAI */,
1232
+ baseUrl: "https://api-inference.modelscope.cn/v1",
1233
+ envKey: "MODELSCOPE_API_KEY",
1234
+ models: [
1235
+ {
1236
+ id: "deepseek-ai/DeepSeek-V4-Flash",
1237
+ contextWindowSize: 1e6,
1238
+ enableThinking: true
1239
+ },
1240
+ {
1241
+ id: "Qwen/Qwen3.5-397B-A17B",
1242
+ contextWindowSize: 1e6,
1243
+ enableThinking: true
1244
+ },
1245
+ {
1246
+ id: "ZhipuAI/GLM-5.1",
1247
+ contextWindowSize: 1e6,
1248
+ enableThinking: true
1249
+ }
1250
+ ],
1251
+ modelsEditable: true,
1252
+ modelNamePrefix: "ModelScope",
1253
+ documentationUrl: "https://modelscope.cn/docs/model-service/API-Inference/intro",
1254
+ uiGroup: "third-party"
1255
+ };
1256
+
1257
+ // packages/core/src/providers/presets/custom-provider.ts
1258
+ init_esbuild_shims();
1259
+ import { createHash as createHash2 } from "node:crypto";
1260
+ var CUSTOM_API_KEY_ENV_PREFIX = "QWEN_CUSTOM_API_KEY_";
1261
+ function normalizeEnvSegment(value) {
1262
+ const upper = value.trim().toUpperCase();
1263
+ let result = "";
1264
+ let prevWasUnderscore = false;
1265
+ for (let i = 0; i < upper.length; i++) {
1266
+ const code = upper.charCodeAt(i);
1267
+ const isAlphaNum = code >= 65 && code <= 90 || code >= 48 && code <= 57;
1268
+ if (isAlphaNum) {
1269
+ result += upper[i];
1270
+ prevWasUnderscore = false;
1271
+ } else if (!prevWasUnderscore) {
1272
+ result += "_";
1273
+ prevWasUnderscore = true;
1274
+ }
1275
+ }
1276
+ let start = 0;
1277
+ let end = result.length;
1278
+ while (start < end && result.charCodeAt(start) === 95) start++;
1279
+ while (end > start && result.charCodeAt(end - 1) === 95) end--;
1280
+ return result.slice(start, end);
1281
+ }
1282
+ __name(normalizeEnvSegment, "normalizeEnvSegment");
1283
+ function stripTrailingSlashes(value) {
1284
+ let end = value.length;
1285
+ while (end > 0 && value.charCodeAt(end - 1) === 47) end--;
1286
+ return value.slice(0, end);
1287
+ }
1288
+ __name(stripTrailingSlashes, "stripTrailingSlashes");
1289
+ function generateCustomEnvKey(protocol, baseUrl) {
1290
+ const canonicalBaseUrl = stripTrailingSlashes(baseUrl.trim());
1291
+ const suffix = createHash2("sha256").update(`${protocol}\0${canonicalBaseUrl}`).digest("hex").slice(0, 12).toUpperCase();
1292
+ return `${CUSTOM_API_KEY_ENV_PREFIX}${normalizeEnvSegment(
1293
+ protocol
1294
+ )}_${normalizeEnvSegment(baseUrl)}_${suffix}`;
1295
+ }
1296
+ __name(generateCustomEnvKey, "generateCustomEnvKey");
1297
+ var customProvider = {
1298
+ id: "custom-openai-compatible",
1299
+ label: "Custom Provider",
1300
+ description: "Manually connect a local server, proxy, or unsupported provider",
1301
+ protocol: "openai" /* USE_OPENAI */,
1302
+ protocolOptions: [
1303
+ "openai" /* USE_OPENAI */,
1304
+ "anthropic" /* USE_ANTHROPIC */,
1305
+ "gemini" /* USE_GEMINI */
1306
+ ],
1307
+ baseUrl: void 0,
1308
+ envKey: generateCustomEnvKey,
1309
+ models: void 0,
1310
+ modelNamePrefix: "",
1311
+ showAdvancedConfig: true,
1312
+ // Detect existing custom entries by our env-key namespace for UI/ACP flows,
1313
+ // but merge installs by id+baseUrl so /auth can add another custom model
1314
+ // without deleting models from other endpoints or different models on the
1315
+ // same endpoint.
1316
+ ownsModel: /* @__PURE__ */ __name((model) => typeof model.envKey === "string" && model.envKey.startsWith(CUSTOM_API_KEY_ENV_PREFIX), "ownsModel"),
1317
+ mergeModelsByIdentity: true,
1318
+ uiGroup: "custom"
1319
+ };
1320
+
1321
+ // packages/core/src/providers/all-providers.ts
1322
+ var ALL_PROVIDERS = [
1323
+ codingPlanProvider,
1324
+ tokenPlanProvider,
1325
+ alibabaStandardProvider,
1326
+ deepseekProvider,
1327
+ grokProvider,
1328
+ minimaxProvider,
1329
+ zaiProvider,
1330
+ moonshotProvider,
1331
+ idealabProvider,
1332
+ modelscopeProvider,
1333
+ openRouterProvider,
1334
+ requestyProvider,
1335
+ customProvider
1336
+ ];
1337
+ var ALIBABA_PROVIDERS = ALL_PROVIDERS.filter(
1338
+ (p) => p.uiGroup === "alibaba"
1339
+ );
1340
+ var THIRD_PARTY_PROVIDERS = ALL_PROVIDERS.filter(
1341
+ (p) => p.uiGroup === "third-party"
1342
+ );
1343
+ function findProviderById(id) {
1344
+ return ALL_PROVIDERS.find((p) => p.id === id);
1345
+ }
1346
+ __name(findProviderById, "findProviderById");
1347
+ function findProviderByCredentials(baseUrl, envKey) {
1348
+ return ALL_PROVIDERS.find(
1349
+ (p) => providerMatchesCredentials(p, baseUrl, envKey)
1350
+ );
1351
+ }
1352
+ __name(findProviderByCredentials, "findProviderByCredentials");
1353
+ function getAllProviderBaseUrls() {
1354
+ return ALL_PROVIDERS.flatMap((p) => {
1355
+ if (typeof p.baseUrl === "string") return [p.baseUrl];
1356
+ if (Array.isArray(p.baseUrl))
1357
+ return p.baseUrl.map((o) => o.url);
1358
+ return [];
1359
+ });
1360
+ }
1361
+ __name(getAllProviderBaseUrls, "getAllProviderBaseUrls");
1362
+
1363
+ export {
1364
+ resolveOwnsModel,
1365
+ resolveMetadataKey,
1366
+ PROVIDER_METADATA_NS,
1367
+ buildInstallPlan,
1368
+ computeModelListVersion,
1369
+ getDefaultBaseUrlForProtocol,
1370
+ resolveBaseUrl,
1371
+ getDefaultModelIds,
1372
+ findExistingProviderModels,
1373
+ shouldShowStep,
1374
+ providerMatchesCredentials,
1375
+ buildProviderTemplate,
1376
+ customProvider,
1377
+ ALL_PROVIDERS,
1378
+ ALIBABA_PROVIDERS,
1379
+ THIRD_PARTY_PROVIDERS,
1380
+ findProviderById,
1381
+ findProviderByCredentials,
1382
+ getAllProviderBaseUrls
1383
+ };
1384
+ /**
1385
+ * @license
1386
+ * Copyright 2026 Qwen Team
1387
+ * SPDX-License-Identifier: Apache-2.0
1388
+ */
1389
+ /**
1390
+ * @license
1391
+ * Copyright 2025 Qwen Team
1392
+ * SPDX-License-Identifier: Apache-2.0
1393
+ */
1394
+ /**
1395
+ * @license
1396
+ * Copyright 2026 Qwen Team
1397
+ * SPDX-License-Identifier: Apache-2.0
1398
+ *
1399
+ * Provider registry — imports all provider definitions and assembles the
1400
+ * lookup tables used by the UI and CLI commands.
1401
+ */