@qwen-code/qwen-code 0.23.2-preview.0 → 0.23.2
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.
- package/bundled/qc-helper/docs/configuration/auth.md +1 -1
- package/bundled/qc-helper/docs/configuration/model-providers.md +19 -15
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
- package/bundled/qc-helper/docs/features/channels/github.md +1 -9
- package/bundled/qc-helper/docs/features/channels/overview.md +26 -51
- package/bundled/qc-helper/docs/features/channels/qqbot.md +1 -2
- package/bundled/qc-helper/docs/features/commands.md +48 -9
- package/bundled/qc-helper/docs/features/goals.md +2 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +8 -0
- package/bundled/qc-helper/docs/qwen-serve.md +62 -48
- package/chunks/{MaxSizedBox-ZZJT3PJF.js → MaxSizedBox-4C3BKKKY.js} +17 -16
- package/chunks/{StandaloneSessionPicker-DIOSZTMX.js → StandaloneSessionPicker-TXVF65YW.js} +32 -31
- package/chunks/{acpAgent-62JUP5A7.js → acpAgent-H5XBKGB4.js} +301 -166
- package/chunks/{agent-NLPEQQDZ.js → agent-T5LEFJIU.js} +10 -10
- package/chunks/{agent-headless-Y2GR5F2Q.js → agent-headless-VZKSRH36.js} +10 -10
- package/chunks/{anthropicContentGenerator-I7LQZH26.js → anthropicContentGenerator-PRJWWVYJ.js} +2 -2
- package/chunks/{artifact-tool-P52OKKEF.js → artifact-tool-G5LHNECG.js} +1 -1
- package/chunks/{bridge-Q66BD62H.js → bridge-AOX5IY44.js} +18 -17
- package/chunks/{channel-management-service-TRTLQTSV.js → channel-management-service-MWQGHPAS.js} +4 -4
- package/chunks/{channel-settings-store-R5STFWUW.js → channel-settings-store-XZCGDGHW.js} +26 -25
- package/chunks/{channel-worker-group-PIYPVCTF.js → channel-worker-group-SQ5FRWOH.js} +5 -5
- package/chunks/{channel-worker-manager-FQHEDTD2.js → channel-worker-manager-TU4ZNWOE.js} +5 -5
- package/chunks/{channel-worker-supervisor-XJPZZ3VK.js → channel-worker-supervisor-EMITFMCP.js} +4 -4
- package/chunks/{chunk-3SH53ANB.js → chunk-22GORRNY.js} +12 -0
- package/chunks/{chunk-7L35FKPF.js → chunk-2BMXHB6N.js} +2 -2
- package/chunks/chunk-2WC3Y7YY.js +1033 -0
- package/chunks/{chunk-WZ4YULVF.js → chunk-3OAXF3UK.js} +210 -80
- package/chunks/{chunk-W673V2H3.js → chunk-46MMBZHI.js} +3 -3
- package/chunks/{chunk-6GRDHIVI.js → chunk-4I3WFI3U.js} +4 -4
- package/chunks/{chunk-QXXBW2G4.js → chunk-4JNHNVAZ.js} +3 -3
- package/chunks/{chunk-R2266LQ5.js → chunk-4WMGYG3F.js} +2 -2
- package/chunks/{chunk-Y6ZWXM44.js → chunk-5BH2AIEY.js} +1 -1
- package/chunks/{chunk-EA4NFWVG.js → chunk-5OZUKLL7.js} +3 -3
- package/chunks/{chunk-RX3FYFCN.js → chunk-67XTVRVB.js} +1 -1
- package/chunks/{chunk-MA5OUNN6.js → chunk-6G4V7SE4.js} +1 -1
- package/chunks/{chunk-B54PFQS5.js → chunk-7CLLH5TI.js} +1 -1
- package/chunks/{chunk-7GZCCHJL.js → chunk-7LTCFO6T.js} +3 -3
- package/chunks/{chunk-33MLFMCL.js → chunk-7NDZKE2M.js} +2 -2
- package/chunks/{chunk-5WC2ECUK.js → chunk-7PD7ZMX5.js} +17 -4
- package/chunks/{chunk-ZUNWKOAP.js → chunk-7SVM3RP2.js} +4 -24
- package/chunks/{chunk-5GD7LYOH.js → chunk-A7EFXK7P.js} +1 -1
- package/chunks/{chunk-RDV4NLI3.js → chunk-AO2VMS72.js} +2 -2
- package/chunks/{chunk-XAXTQURR.js → chunk-APXIW2TF.js} +3 -3
- package/chunks/{chunk-3BTHHXXE.js → chunk-AUTUFD5X.js} +1 -1
- package/chunks/{chunk-VH764G6B.js → chunk-B25JYXZE.js} +2 -2
- package/chunks/{chunk-MMMA36MN.js → chunk-BK7D2JR6.js} +3 -3
- package/chunks/{chunk-RPFJJ33Z.js → chunk-CALTQWTZ.js} +1 -1
- package/chunks/{chunk-EUXF6URV.js → chunk-CCBTNJB4.js} +16 -18
- package/chunks/{chunk-BF3RUIVP.js → chunk-CH2YDT6X.js} +36 -38
- package/chunks/{chunk-L6ZME3W7.js → chunk-CMWU6P4D.js} +1 -1
- package/chunks/{chunk-QJAFSFYA.js → chunk-CWVZBIZJ.js} +1 -1
- package/chunks/{chunk-JDPBJIKI.js → chunk-DAI65CMX.js} +1 -1
- package/chunks/{chunk-GM44O6F7.js → chunk-DARWOZY6.js} +1 -1
- package/chunks/{chunk-J4ECGDA3.js → chunk-ELD3OBPU.js} +3 -3
- package/chunks/{chunk-ZELCTN6Y.js → chunk-F23YN37B.js} +10 -0
- package/chunks/{chunk-OIPUQE3S.js → chunk-F2NYVASI.js} +14 -1
- package/chunks/{chunk-ODBNTMZW.js → chunk-FAJPLSYF.js} +36 -29
- package/chunks/{chunk-GXIHBIHC.js → chunk-FGHPZGOP.js} +29 -24
- package/chunks/{chunk-TK4XHPKW.js → chunk-G37O7YO6.js} +2 -2
- package/chunks/{chunk-4JKLPTV6.js → chunk-G3ZUMSFS.js} +12 -5
- package/chunks/{chunk-743XE7N7.js → chunk-G5VOXCRX.js} +1 -1
- package/chunks/{chunk-BL6B2QS2.js → chunk-GOEVQADN.js} +618 -1122
- package/chunks/{chunk-XI7RST4D.js → chunk-GOKAOSCN.js} +1 -1
- package/chunks/{chunk-FDOGGKAA.js → chunk-GSFV5RQW.js} +2 -0
- package/chunks/{chunk-43CI6YWJ.js → chunk-HJ5UJQQL.js} +1384 -1245
- package/chunks/{chunk-LUVXLLMS.js → chunk-IR6JKBAP.js} +1 -1
- package/chunks/{chunk-CPJRFFPH.js → chunk-IRGDIDGJ.js} +558 -158
- package/chunks/{chunk-DCPRCDSR.js → chunk-IWABUX6T.js} +1 -1
- package/chunks/{chunk-DTB5BXRG.js → chunk-JO77FGNZ.js} +16 -15
- package/chunks/{chunk-45ROPFQY.js → chunk-JYGIJA4W.js} +1 -1
- package/chunks/{chunk-M6YLOETP.js → chunk-KCF2436G.js} +1 -1
- package/chunks/{chunk-CABDNUJ4.js → chunk-KEPC5BOL.js} +5 -5
- package/chunks/{chunk-RN6V5HKE.js → chunk-KFECPHLV.js} +3 -3
- package/chunks/{chunk-WIRYFL2L.js → chunk-LEAOJ43M.js} +17 -15
- package/chunks/{chunk-IUJLW6ZI.js → chunk-LUNC5KCL.js} +3 -3
- package/chunks/{chunk-WZS3X663.js → chunk-LWX4WDFF.js} +2 -5
- package/chunks/{chunk-ISPBBKJN.js → chunk-MV5DTLJV.js} +7 -2
- package/chunks/chunk-NFXXBWSE.js +463 -0
- package/chunks/{chunk-PQSCGZT2.js → chunk-NPKCVSXX.js} +26 -2
- package/chunks/{chunk-7RXOEUFF.js → chunk-NX7ZTXFF.js} +1 -1
- package/chunks/{chunk-G5QLLD53.js → chunk-OXR34GCD.js} +14 -2
- package/chunks/{chunk-VHPG7BH6.js → chunk-PDN7FJZV.js} +1 -1
- package/chunks/{chunk-UHUT4IDM.js → chunk-PFKGV6PO.js} +9 -9
- package/chunks/{chunk-NFIDVZND.js → chunk-QB3KS3N3.js} +2 -21
- package/chunks/{chunk-QLM7D7W3.js → chunk-QFJZAY7W.js} +7 -7
- package/chunks/{chunk-NVS4Z6GT.js → chunk-QHLHE2OT.js} +1 -1
- package/chunks/{chunk-B44JBZBB.js → chunk-QQK4L3UU.js} +1 -1
- package/chunks/{chunk-63ACHB2H.js → chunk-QTB4VP4K.js} +50 -18
- package/chunks/{chunk-4BLTSTF6.js → chunk-R3JIDRUL.js} +4 -4
- package/chunks/{chunk-VEQBVJYH.js → chunk-R457KFV7.js} +3 -3
- package/chunks/{chunk-CG2PDIGD.js → chunk-RM244SCQ.js} +1 -1
- package/chunks/{chunk-W7PXLIZJ.js → chunk-RNAJVXUG.js} +5 -5
- package/chunks/{chunk-VF6D6EGV.js → chunk-S5QR6CB5.js} +52 -6
- package/chunks/{chunk-IRKQ4YYX.js → chunk-SVWWF5TZ.js} +29 -1
- package/chunks/{chunk-5HBA2Z7V.js → chunk-TGNNLRC3.js} +2 -3
- package/chunks/{chunk-ORREXWOM.js → chunk-TODNHE76.js} +3 -3
- package/chunks/{chunk-W3ONSAYO.js → chunk-TOOOLHVS.js} +2 -2
- package/chunks/{chunk-EHTKOO6W.js → chunk-TRQNRP2H.js} +2 -2
- package/chunks/{chunk-PQWM4SX2.js → chunk-U6REWGVR.js} +2 -2
- package/chunks/{chunk-UXDVUFKU.js → chunk-ULZECEIP.js} +2 -2
- package/chunks/{chunk-6YEOCHSE.js → chunk-VBLAI2HA.js} +101 -0
- package/chunks/{chunk-M73KHGNR.js → chunk-VJJXG73H.js} +404 -226
- package/chunks/{chunk-Q2F43WTJ.js → chunk-WBU2PIZ5.js} +23 -6
- package/chunks/{chunk-UULHYZ4W.js → chunk-WDN64MVT.js} +74 -15
- package/chunks/{chunk-XVTCSVBK.js → chunk-WDVV3LRM.js} +193 -169
- package/chunks/{chunk-LBKYQ33T.js → chunk-WK7P62DV.js} +16 -10
- package/chunks/{chunk-ULY4ISY2.js → chunk-WXD7INFV.js} +19 -4
- package/chunks/{chunk-ZIPYCXQP.js → chunk-WXPPUPHM.js} +1 -1
- package/chunks/{chunk-5Z4FCEPY.js → chunk-X7LFJF5D.js} +600 -46
- package/chunks/{chunk-YHDGABDC.js → chunk-XKBFYTCD.js} +1 -1
- package/chunks/{chunk-MWEF5MUK.js → chunk-XSOXPG2L.js} +8 -8
- package/chunks/{chunk-5VZFJTL2.js → chunk-YLOHCA6I.js} +2 -2
- package/chunks/{chunk-LN3WBOKU.js → chunk-YQGW3M6Z.js} +2 -2
- package/chunks/{chunk-2OR32P5M.js → chunk-ZN5TKAVR.js} +125 -10
- package/chunks/{chunk-XBLG564H.js → chunk-ZP5XDLSA.js} +10 -10
- package/chunks/{config-utils-37FHWPTP.js → config-utils-GPLIABL2.js} +21 -20
- package/chunks/{contextCommand-R4JUBV5N.js → contextCommand-NCUQUDBY.js} +18 -17
- package/chunks/{core-runtime-6U4OXU5C.js → core-runtime-WKYKWVYU.js} +23 -21
- package/chunks/{create-sub-session-LLUYAGZN.js → create-sub-session-PPLXB3JJ.js} +17 -16
- package/chunks/{daemon-UI6SQSBV.js → daemon-2CKIAO3I.js} +2 -2
- package/chunks/{daemon-git-worktree-guard-O2UTNFJC.js → daemon-git-worktree-guard-73ZWOLKL.js} +17 -16
- package/chunks/{daemon-status-provider-7GMAKSTX.js → daemon-status-provider-OK7VONJG.js} +22 -21
- package/chunks/{daemon-trust-policy-VNP76VMO.js → daemon-trust-policy-CAUCREG2.js} +22 -21
- package/chunks/{daemon-trust-policy-monitor-TD5O3BZA.js → daemon-trust-policy-monitor-3Y36OOEQ.js} +22 -21
- package/chunks/{deferred-core-runtime-NJM63YJS.js → deferred-core-runtime-Q7WFWYD3.js} +17 -16
- package/chunks/{dist-STAGIFNB.js → dist-6YDUH3BB.js} +388 -102
- package/chunks/{dist-XJ25G6OH.js → dist-BNQVF565.js} +2 -8
- package/chunks/{dist-NQ2636VT.js → dist-F34J4FZX.js} +1 -1
- package/chunks/{dist-OR2ZQTXZ.js → dist-F6JLAJLE.js} +1 -1
- package/chunks/{dist-WZTUKIDR.js → dist-NP7QKLVG.js} +2 -2
- package/chunks/{dist-M4CBX53H.js → dist-UFTFGI6I.js} +1 -1
- package/chunks/{dist-5I4HLUTO.js → dist-XLV33CLY.js} +1 -2
- package/chunks/{dist-24TCWK5H.js → dist-Y5KC3IHW.js} +1 -2
- package/chunks/{dist-FDISN4AK.js → dist-ZDNJK74R.js} +3 -7
- package/chunks/{edit-GL7OA6RV.js → edit-YJD6IETK.js} +10 -10
- package/chunks/{enterPlanMode-VC4BCSZE.js → enterPlanMode-EFPVTWIH.js} +10 -10
- package/chunks/{environment-BI6IBAZJ.js → environment-HP3AXFTB.js} +19 -18
- package/chunks/{errors-D6G2ZM2R.js → errors-22ON46G7.js} +19 -18
- package/chunks/{exitPlanMode-DX446CA6.js → exitPlanMode-MOQUNCBH.js} +10 -10
- package/chunks/{fast-path-MAYDLJIP.js → fast-path-2X7BPMXX.js} +3 -3
- package/chunks/{glob-TVKRFY36.js → glob-Y7ACIB3P.js} +10 -10
- package/chunks/{goal-tools-CA6YANRN.js → goal-tools-DABMICUC.js} +10 -10
- package/chunks/{handleAutoUpdate-AW4ZAHON.js → handleAutoUpdate-MCAMHYDI.js} +19 -18
- package/chunks/{i18n-IH5CRAY7.js → i18n-C3GDCALP.js} +17 -16
- package/chunks/{initializer-UBR37ZNM.js → initializer-4URDQL2G.js} +22 -21
- package/chunks/{installationInfo-Y52756EC.js → installationInfo-LBOL6SBV.js} +17 -16
- package/chunks/{list-7V5JDZPO.js → list-JOGBAC2R.js} +25 -24
- package/chunks/{list-agents-I5TRH3J7.js → list-agents-2CXPGJUE.js} +3 -3
- package/chunks/{llm-QDB6JVF5.js → llm-2KPNSAVY.js} +65 -59
- package/chunks/{llm-content-generator-EO6MZCEO.js → llm-content-generator-GR3FOHLB.js} +2 -2
- package/chunks/{loadedSettingsAdapter-I3YQKMC4.js → loadedSettingsAdapter-DVKROEJD.js} +22 -21
- package/chunks/{loggingContentGenerator-MNXYUGDG.js → loggingContentGenerator-P4K6K5W4.js} +12 -12
- package/chunks/{managed-npm-update-EA3EXPTO.js → managed-npm-update-VWBKHNIN.js} +17 -16
- package/chunks/{mcp-QTAJ544Y.js → mcp-6YYNSYLK.js} +22 -21
- package/chunks/{monitor-6FQKQOTP.js → monitor-A255TNZR.js} +10 -10
- package/chunks/{nonInteractiveCli-MRCTZL5X.js → nonInteractiveCli-LXGIKQAT.js} +55 -54
- package/chunks/{notebook-edit-BQQCKI7K.js → notebook-edit-5UYHS2DM.js} +10 -10
- package/chunks/{open-with-auth-D6JD6LDS.js → open-with-auth-6MVIHMXB.js} +1 -1
- package/chunks/{openaiContentGenerator-TTSKXNVH.js → openaiContentGenerator-A6MAMEO5.js} +7 -7
- package/chunks/{pidfile-KPIS6RIT.js → pidfile-B7DZC4TP.js} +20 -17
- package/chunks/{processUtils-ZCASPKK4.js → processUtils-BPZ2MCZS.js} +2 -2
- package/chunks/{prompt-terminal-ledger-D6HM6TV7.js → prompt-terminal-ledger-FYYTAOXS.js} +18 -17
- package/chunks/{qwenContentGenerator-GGZEFLBD.js → qwenContentGenerator-4IOJFD4S.js} +13 -13
- package/chunks/{read-file-VE5GDFLP.js → read-file-A4H4O3VQ.js} +2 -2
- package/chunks/{resumeHistoryUtils-HSSGMYDC.js → resumeHistoryUtils-YQQ43E4N.js} +19 -18
- package/chunks/{ripGrep-SEJE7AA6.js → ripGrep-W32NWFTA.js} +3 -3
- package/chunks/{run-qwen-serve-OJYVH7N6.js → run-qwen-serve-WBSWWIRV.js} +216 -64
- package/chunks/{runtime-KGMQQFJD.js → runtime-VRVBX2E5.js} +29 -26
- package/chunks/{scheduled-tasks-7H5HWHYD.js → scheduled-tasks-D65KJDA3.js} +20 -19
- package/chunks/{scheduler-BE42AKDG.js → scheduler-M2YPN7Z7.js} +19 -18
- package/chunks/{send-message-AWKUDJBH.js → send-message-76BKWKFZ.js} +3 -3
- package/chunks/{serve-KZVKYMSL.js → serve-BE3H2P6P.js} +22 -21
- package/chunks/{server-PJRALPJQ.js → server-FLY5JERG.js} +84 -148
- package/chunks/{session-IHITXU2S.js → session-JVN62R5K.js} +85 -57
- package/chunks/{session-attachments-root-GQ2TUI3Y.js → session-attachments-root-7ACGLHXA.js} +17 -16
- package/chunks/{session-pr-refresh-H43LULTE.js → session-pr-refresh-TQS57SDK.js} +19 -18
- package/chunks/{settings-RKEQQDFC.js → settings-D44YMZFT.js} +21 -20
- package/chunks/{shell-6PJ444U5.js → shell-3VE6I4V5.js} +10 -10
- package/chunks/{skill-Q3UP7B5V.js → skill-FHEGRRZU.js} +2 -2
- package/chunks/{skill-settings-LZR5YRRW.js → skill-settings-VHEJMBFL.js} +21 -20
- package/chunks/{spawnChannel-WM3DT2BF.js → spawnChannel-T6MX2ZDN.js} +17 -16
- package/chunks/{standalone-update-E5474IBI.js → standalone-update-QUGHFMCS.js} +18 -17
- package/chunks/{start-opentui-ui-WLWZNQ2I.js → start-opentui-ui-IHIIZ2LE.js} +438 -203
- package/chunks/{startInteractiveUI-FBQSGWGO.js → startInteractiveUI-LR7K2ARZ.js} +1171 -1234
- package/chunks/{task-create-PMAFST2T.js → task-create-MWXJFRRM.js} +3 -3
- package/chunks/{task-list-R2HSY2NC.js → task-list-EYO3FE57.js} +2 -2
- package/chunks/{task-update-JYC57USF.js → task-update-2JJJRHMT.js} +3 -3
- package/chunks/{team-create-VIGUFUT4.js → team-create-GY3VFY47.js} +10 -10
- package/chunks/{team-delete-CBHVBTPB.js → team-delete-IQZ6XGFI.js} +2 -2
- package/chunks/{team-plan-approval-HQVZA3MD.js → team-plan-approval-BQPGZOT5.js} +10 -10
- package/chunks/{terminal-image-renderer-LUKNCOVM.js → terminal-image-renderer-YNYW5CQG.js} +17 -16
- package/chunks/{theme-manager-LOENKYLY.js → theme-manager-U6CIK3GM.js} +17 -16
- package/chunks/{tool-search-ZIFAQCE2.js → tool-search-XI3QWD5I.js} +2 -2
- package/chunks/{total-session-admission-FUUJH3QH.js → total-session-admission-3SNSJJ32.js} +18 -17
- package/chunks/{trustedFolders-C76KYROP.js → trustedFolders-OVAQKNV5.js} +18 -17
- package/chunks/{update-relaunch-4G2SRXKX.js → update-relaunch-XV5O74E3.js} +5 -5
- package/chunks/{updateCheck-EIZIO7HI.js → updateCheck-CHUYWD6L.js} +17 -16
- package/chunks/{useAutoAcceptIndicator-EAA6KSY4.js → useAutoAcceptIndicator-VKSVIXZC.js} +23 -22
- package/chunks/{validateNonInterActiveAuth-BRX22QCN.js → validateNonInterActiveAuth-ZNUTD3E5.js} +53 -52
- package/chunks/{version-E56RU7PR.js → version-EK7VAGSI.js} +3 -1
- package/chunks/{web-fetch-AAUCD7RM.js → web-fetch-24KZO763.js} +2 -2
- package/chunks/{web-search-HFUQF44Q.js → web-search-CRNXKZ2X.js} +184 -7
- package/chunks/{web-shell-static-POZHGGXE.js → web-shell-static-BFDESDD4.js} +5 -4
- package/chunks/{workflow-3MABM53N.js → workflow-HD5NYMW5.js} +201 -65
- package/chunks/{workspace-providers-status-2FRLBZ5I.js → workspace-providers-status-MAM42IZS.js} +24 -23
- package/chunks/{workspace-registration-store-YL7HLYYI.js → workspace-registration-store-HKLJEDQX.js} +1 -2
- package/chunks/{workspace-registry-BNRP2ELW.js → workspace-registry-7RDDOBLN.js} +18 -17
- package/chunks/{workspace-runtime-coordinator-WKGF7VHS.js → workspace-runtime-coordinator-LEPDPXJO.js} +18 -17
- package/chunks/{workspace-service-4MYO72MM.js → workspace-service-5IFDCNN3.js} +23 -22
- package/chunks/{workspace-skills-status-SU66TJLZ.js → workspace-skills-status-FJ3HNH4H.js} +22 -21
- package/chunks/{workspace-trust-reconciler-D5QT7WQB.js → workspace-trust-reconciler-PQFHIWLR.js} +23 -22
- package/chunks/{write-file-NVPQE2AZ.js → write-file-ERG67ZFX.js} +11 -11
- package/chunks/{zoom-image-RJHC66WG.js → zoom-image-WQYEC3SR.js} +2 -2
- package/cli.js +12 -12
- package/export-transcript-document.js +82 -82
- package/package.json +4 -4
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DHc6plZn.js → abnfDiagram-VCTEODGH-BRLgQbnT.js} +1 -1
- package/web-shell/assets/{arc-BQ9m8TDV.js → arc-qAF9_XsR.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-D5ap3oVB.js → architectureDiagram-5GKGNRK7-BorUttEz.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-BIbnyNph.js → blockDiagram-NRAW4CY4-Bj0qZVxu.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BRsdx_iG.js → c4Diagram-UCG6FXSJ-BTqJis32.js} +1 -1
- package/web-shell/assets/channel-COIuCrVH.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-3lf1fNlx.js → chunk-2Q5K7J3B-RrQ5X8m-.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-DP8VNRc4.js → chunk-5VM5RSS4-uUjDl8wO.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-DrohDmZ6.js → chunk-F27PBJKO-C3JhpyzI.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-UZ2QhSx6.js → chunk-G27WJ6UU-C8ZNFs7F.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-BIMHVcZK.js → chunk-JWPE2WC7-DNpXtEOs.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-izRxdSDd.js → chunk-LCL6LL3I-DagA2ZLw.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-CXADD4PP.js → chunk-POPQ4Y6H-R23uH7Xm.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-B96d8Y_1.js → chunk-SVP7TREG-Qz9RN_BR.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-CF2sVQpv.js → chunk-XXDRQBXY-jYb1_hni.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DoX6OYqu.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DoX6OYqu.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CT6tXVAS.js → cose-bilkent-JH36ORCC-Cv2OunpE.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-X1NS4vtV.js → cynefin-OW5HDTMX-LH42KFJx.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DNsKNOT4.js → cynefinDiagram-5FMLGOSQ-Dha4_OoR.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-9-AHKqsb.js → dagre-3AP2YEHR-Br5lnUKD.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-Bjgms7j6.js → diagram-S7CK7UJ4-dpKq2bBX.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-h6bCprbE.js → diagram-UQ7AKVKN-BAgHWpXr.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-4SbQXVLt.js → diagram-VSXAHHWV-GRRzpyE2.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-B5gPCzzB.js → diagram-VX7I27RA-BNFiaYpG.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-DFJXIA3A.js → diagram-Z3DM3KII-BisZzB_h.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-FwyaU7VY.js → ebnfDiagram-PWID7BFC-B1xbwycf.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-8vJQh2te.js → erDiagram-SSCWMZ5O-CQMzbGE5.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-BzA_1gMN.js → flowDiagram-A5DVABFB-CZ_Zondl.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-Co-ABbVX.js → ganttDiagram-EL5Y4UJY-BTh2ShxS.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DW_FcyrX.js → gitGraphDiagram-WWUBYQGX-oHOB-Uxt.js} +1 -1
- package/web-shell/assets/{index-Bu-rZoJ-.js → index-CI1ysIEv.js} +478 -474
- package/web-shell/assets/index-CpxXGH-8.css +36 -0
- package/web-shell/assets/{index-BbMXfhNG.js → index-DWoFMu5x.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-BEgfhUFN.js → infoDiagram-RXCK75RN-C0QpudbG.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DCsMxQmc.js → ishikawaDiagram-5VMMS53U-a6B741uT.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-DyIEYoHz.js → journeyDiagram-EYS64GPL-Dbht9ICp.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-CkxjqCNr.js → kanban-definition-3QL26DDD-D4OFR8-h.js} +1 -1
- package/web-shell/assets/{layout-BEWc0Al9.js → layout-Dvdh5jRH.js} +1 -1
- package/web-shell/assets/{linear-CNuNxirL.js → linear-Dvc6KIW2.js} +1 -1
- package/web-shell/assets/{mermaid.core-DZBre674.js → mermaid.core-CB36RfIb.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-CpafFz_F.js → mindmap-definition-FBJOCRG2-Fmqo1CjP.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DfZqk_dq.js → pegDiagram-XKGWAZYB-CCxYBoA4.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-S0UWXlgC.js → pieDiagram-E7YTZNPT-BVHKQFzt.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-dd37_Ohj.js → quadrantDiagram-AXDQQJYC-l95IznwR.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH8NJZ7u.js → railroadDiagram-O6MQD6OU-BlLdRdXp.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CFdqWYih.js → requirementDiagram-EFPCY7ZU-BkDLBR5w.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CsddcEGD.js → sankeyDiagram-P5KCCOFB-jAIqRp65.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BZ270mGw.js → sequenceDiagram-WJ2MYXX4-f-soZYPr.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CGaS4DBV.js → sizeCapture-X5ZJPWSS-BzOuAfB2.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-COpIzMu6.js → stateDiagram-HBIQ2CUA-BPLSs12r.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-IRul-LaT.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-CMF889m3.js → swimlanes-XN3QIQJK-D-9E_RIR.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-D6lgKepA.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-BelnxYz5.js → timeline-definition-24CTP7MA-CT56K-gV.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-CU-NRqIB.js → vennDiagram-4TSXK5OY-B-vi4IyO.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CDNKqWh-.js → wardleyDiagram-VM6X3IG4-C9O7Ju98.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CLqguL5D.js → xychartDiagram-S5SC5T6Z-6d8w3jg2.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-X35VIWWJ.js +0 -276
- package/web-shell/assets/channel-uMMdTrYk.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DcY-26Ig.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DcY-26Ig.js +0 -1
- package/web-shell/assets/index-CsPwZ1ut.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-D6qEVAji.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-mem5Jj4m.js +0 -8
|
@@ -0,0 +1,1033 @@
|
|
|
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
|
+
contextWindowSize: 1e6,
|
|
354
|
+
enableThinking: true,
|
|
355
|
+
modalities: { image: true, video: true }
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: "qwen3.6-plus",
|
|
359
|
+
description: "Currently available to Pro subscribers only.",
|
|
360
|
+
contextWindowSize: 1e6,
|
|
361
|
+
enableThinking: true,
|
|
362
|
+
modalities: { image: true, video: true }
|
|
363
|
+
},
|
|
364
|
+
{ id: "qwen3.7-plus", contextWindowSize: 1e6, enableThinking: true },
|
|
365
|
+
{ id: "glm-5", contextWindowSize: 202752, enableThinking: true },
|
|
366
|
+
{
|
|
367
|
+
id: "kimi-k2.5",
|
|
368
|
+
contextWindowSize: 262144,
|
|
369
|
+
enableThinking: true,
|
|
370
|
+
modalities: { image: true, video: true }
|
|
371
|
+
},
|
|
372
|
+
{ id: "MiniMax-M2.5", contextWindowSize: 196608, enableThinking: true },
|
|
373
|
+
{ id: "qwen3-coder-plus", contextWindowSize: 1e6 },
|
|
374
|
+
{ id: "qwen3-coder-next", contextWindowSize: 262144 },
|
|
375
|
+
{
|
|
376
|
+
id: "qwen3-max-2026-01-23",
|
|
377
|
+
contextWindowSize: 262144,
|
|
378
|
+
enableThinking: true
|
|
379
|
+
},
|
|
380
|
+
{ id: "glm-4.7", contextWindowSize: 202752, enableThinking: true }
|
|
381
|
+
];
|
|
382
|
+
var codingPlanProvider = {
|
|
383
|
+
id: "coding-plan",
|
|
384
|
+
label: "Coding Plan",
|
|
385
|
+
description: "For individual developers \xB7 Weekly quota included",
|
|
386
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
387
|
+
baseUrl: [
|
|
388
|
+
{
|
|
389
|
+
id: "aliyun",
|
|
390
|
+
label: "China (Beijing)",
|
|
391
|
+
url: CODING_PLAN_CHINA_BASE_URL,
|
|
392
|
+
documentationUrl: "https://help.aliyun.com/zh/model-studio/coding-plan"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
id: "alibabacloud",
|
|
396
|
+
label: "Singapore (International)",
|
|
397
|
+
url: CODING_PLAN_GLOBAL_BASE_URL,
|
|
398
|
+
documentationUrl: "https://www.alibabacloud.com/help/en/model-studio/coding-plan"
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
envKey: CODING_PLAN_ENV_KEY,
|
|
402
|
+
models: MODELSTUDIO_MODELS,
|
|
403
|
+
modelsEditable: true,
|
|
404
|
+
supportsModelDiscovery: true,
|
|
405
|
+
modelNamePrefix: /* @__PURE__ */ __name((baseUrl) => baseUrl === CODING_PLAN_GLOBAL_BASE_URL ? "ModelStudio Coding Plan for Global/Intl" : "ModelStudio Coding Plan", "modelNamePrefix"),
|
|
406
|
+
apiKeyPlaceholder: "sk-sp-...",
|
|
407
|
+
validateApiKey: /* @__PURE__ */ __name((key) => !key.startsWith("sk-sp-") ? 'Invalid API key. Coding Plan API keys start with "sk-sp-". Please check.' : null, "validateApiKey"),
|
|
408
|
+
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"),
|
|
409
|
+
uiGroup: "alibaba",
|
|
410
|
+
uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
// packages/core/src/providers/presets/alibaba-token-plan.ts
|
|
414
|
+
init_esbuild_shims();
|
|
415
|
+
var TOKEN_PLAN_ENV_KEY = "BAILIAN_TOKEN_PLAN_API_KEY";
|
|
416
|
+
var TOKEN_PLAN_CHINA_BASE_URL = "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1";
|
|
417
|
+
var TOKEN_PLAN_GLOBAL_BASE_URL = "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1";
|
|
418
|
+
var TOKEN_PLAN_MODELS = [
|
|
419
|
+
{
|
|
420
|
+
id: "qwen3.7-plus",
|
|
421
|
+
contextWindowSize: 1e6,
|
|
422
|
+
enableThinking: true,
|
|
423
|
+
modalities: { image: true, video: true }
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
id: "qwen3.6-plus",
|
|
427
|
+
contextWindowSize: 1e6,
|
|
428
|
+
enableThinking: true,
|
|
429
|
+
modalities: { image: true, video: true }
|
|
430
|
+
},
|
|
431
|
+
{ id: "qwen3.7-max", contextWindowSize: 1e6, enableThinking: true },
|
|
432
|
+
{
|
|
433
|
+
id: "qwen3.8-max",
|
|
434
|
+
contextWindowSize: 1e6,
|
|
435
|
+
enableThinking: true,
|
|
436
|
+
thinkingMandatory: true,
|
|
437
|
+
modalities: { image: true, video: true }
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
id: "qwen3.8-max-preview",
|
|
441
|
+
contextWindowSize: 1e6,
|
|
442
|
+
enableThinking: true,
|
|
443
|
+
thinkingMandatory: true,
|
|
444
|
+
modalities: { image: true, video: true }
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
id: "qwen3.6-flash",
|
|
448
|
+
contextWindowSize: 1e6,
|
|
449
|
+
enableThinking: true
|
|
450
|
+
},
|
|
451
|
+
{ id: "deepseek-v4-pro", contextWindowSize: 1e6 },
|
|
452
|
+
{ id: "deepseek-v4-flash-0731", contextWindowSize: 1e6 },
|
|
453
|
+
{ id: "deepseek-v3.2", contextWindowSize: 131072 },
|
|
454
|
+
{
|
|
455
|
+
id: "kimi-k2.7-code",
|
|
456
|
+
contextWindowSize: 262144,
|
|
457
|
+
enableThinking: true,
|
|
458
|
+
modalities: { image: true, video: true }
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
id: "kimi-k2.6",
|
|
462
|
+
contextWindowSize: 262144,
|
|
463
|
+
enableThinking: true
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
id: "kimi-k2.5",
|
|
467
|
+
contextWindowSize: 262144,
|
|
468
|
+
enableThinking: true,
|
|
469
|
+
modalities: { image: true, video: true }
|
|
470
|
+
},
|
|
471
|
+
{ id: "glm-5.2", contextWindowSize: 1e6, enableThinking: true },
|
|
472
|
+
{ id: "glm-5.1", contextWindowSize: 202752, enableThinking: true },
|
|
473
|
+
{ id: "glm-5", contextWindowSize: 202752, enableThinking: true },
|
|
474
|
+
{ id: "MiniMax-M2.5", contextWindowSize: 196608 }
|
|
475
|
+
];
|
|
476
|
+
var tokenPlanProvider = {
|
|
477
|
+
id: "token-plan",
|
|
478
|
+
label: "Token Plan",
|
|
479
|
+
description: "For teams and companies \xB7 Usage-based billing with dedicated endpoint",
|
|
480
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
481
|
+
baseUrl: [
|
|
482
|
+
{
|
|
483
|
+
id: "cn-beijing",
|
|
484
|
+
label: "China (Beijing)",
|
|
485
|
+
url: TOKEN_PLAN_CHINA_BASE_URL,
|
|
486
|
+
documentationUrl: "https://bailian.console.aliyun.com/cn-beijing?tab=doc#/doc/?type=model&url=3028856"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
id: "ap-southeast-1",
|
|
490
|
+
label: "Singapore (International)",
|
|
491
|
+
url: TOKEN_PLAN_GLOBAL_BASE_URL,
|
|
492
|
+
documentationUrl: "https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
envKey: TOKEN_PLAN_ENV_KEY,
|
|
496
|
+
models: TOKEN_PLAN_MODELS,
|
|
497
|
+
modelsEditable: true,
|
|
498
|
+
supportsModelDiscovery: true,
|
|
499
|
+
modelNamePrefix: /* @__PURE__ */ __name((baseUrl) => baseUrl === TOKEN_PLAN_GLOBAL_BASE_URL ? "ModelStudio Token Plan for Global/Intl" : "ModelStudio Token Plan", "modelNamePrefix"),
|
|
500
|
+
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"),
|
|
501
|
+
// Same server-side search tools as the Standard endpoints, billed against
|
|
502
|
+
// the plan's quota (probe 2026-09-08: `web_search` + `web_extractor` both
|
|
503
|
+
// execute and are reported under `usage.x_tools`).
|
|
504
|
+
webSearch: { backend: "dashscope" },
|
|
505
|
+
uiGroup: "alibaba",
|
|
506
|
+
uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
// packages/core/src/providers/presets/alibaba-standard.ts
|
|
510
|
+
init_esbuild_shims();
|
|
511
|
+
var alibabaStandardProvider = {
|
|
512
|
+
id: "alibabaStandard",
|
|
513
|
+
label: "Standard API Key",
|
|
514
|
+
description: "Connect with an existing ModelStudio API key",
|
|
515
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
516
|
+
baseUrl: [
|
|
517
|
+
{
|
|
518
|
+
id: "cn-beijing",
|
|
519
|
+
label: "China (Beijing)",
|
|
520
|
+
url: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
521
|
+
documentationUrl: "https://bailian.console.aliyun.com/cn-beijing?tab=api#/api"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
id: "sg-singapore",
|
|
525
|
+
label: "Singapore",
|
|
526
|
+
url: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
|
|
527
|
+
documentationUrl: "https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=api#/api/?type=model&url=2712195"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
id: "us-virginia",
|
|
531
|
+
label: "US (Virginia)",
|
|
532
|
+
url: "https://dashscope-us.aliyuncs.com/compatible-mode/v1",
|
|
533
|
+
documentationUrl: "https://modelstudio.console.alibabacloud.com/us-east-1?tab=api#/api/?type=model&url=2712195"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
id: "cn-hongkong",
|
|
537
|
+
label: "China (Hong Kong)",
|
|
538
|
+
url: "https://cn-hongkong.dashscope.aliyuncs.com/compatible-mode/v1",
|
|
539
|
+
documentationUrl: "https://modelstudio.console.alibabacloud.com/cn-hongkong?tab=api#/api/?type=model&url=2712195"
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
envKey: "DASHSCOPE_API_KEY",
|
|
543
|
+
models: [
|
|
544
|
+
{ id: "qwen3.6-plus", contextWindowSize: 1e6, enableThinking: true },
|
|
545
|
+
{ id: "qwen3.7-plus", contextWindowSize: 1e6, enableThinking: true },
|
|
546
|
+
{ id: "qwen3.7-max", contextWindowSize: 1e6, enableThinking: true },
|
|
547
|
+
{ id: "glm-5.1", contextWindowSize: 202752, enableThinking: true },
|
|
548
|
+
{
|
|
549
|
+
id: "deepseek-v4-pro",
|
|
550
|
+
contextWindowSize: 1e6,
|
|
551
|
+
enableThinking: true
|
|
552
|
+
},
|
|
553
|
+
{ id: "deepseek-v4-flash", contextWindowSize: 1e6 }
|
|
554
|
+
],
|
|
555
|
+
modelsEditable: true,
|
|
556
|
+
modelNamePrefix: "ModelStudio Standard",
|
|
557
|
+
// The Responses API on these endpoints serves the server-side `web_search`
|
|
558
|
+
// / `web_extractor` tools with the same key, so the built-in tool needs no
|
|
559
|
+
// extra configuration.
|
|
560
|
+
webSearch: { backend: "dashscope" },
|
|
561
|
+
uiGroup: "alibaba",
|
|
562
|
+
uiLabels: { flowTitle: "Alibaba ModelStudio", baseUrlStepTitle: "Region" }
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
// packages/core/src/providers/presets/openrouter.ts
|
|
566
|
+
init_esbuild_shims();
|
|
567
|
+
var OPENROUTER_ENV_KEY = "OPENROUTER_API_KEY";
|
|
568
|
+
var OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1";
|
|
569
|
+
var openRouterProvider = {
|
|
570
|
+
id: "openrouter",
|
|
571
|
+
label: "OpenRouter",
|
|
572
|
+
description: "Connect with an OpenRouter API key (get one from openrouter.ai/keys)",
|
|
573
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
574
|
+
baseUrl: OPENROUTER_BASE_URL,
|
|
575
|
+
envKey: OPENROUTER_ENV_KEY,
|
|
576
|
+
models: [
|
|
577
|
+
{ id: "z-ai/glm-4.5-air:free", contextWindowSize: 128e3 },
|
|
578
|
+
{ id: "openai/gpt-oss-120b:free", contextWindowSize: 131072 }
|
|
579
|
+
],
|
|
580
|
+
modelsEditable: true,
|
|
581
|
+
modelNamePrefix: "OpenRouter",
|
|
582
|
+
ownsModel: /* @__PURE__ */ __name((model) => {
|
|
583
|
+
if (model.envKey !== OPENROUTER_ENV_KEY) return false;
|
|
584
|
+
try {
|
|
585
|
+
const host = new URL(model.baseUrl ?? "").hostname;
|
|
586
|
+
return host === "openrouter.ai" || host.endsWith(".openrouter.ai");
|
|
587
|
+
} catch {
|
|
588
|
+
return false;
|
|
589
|
+
}
|
|
590
|
+
}, "ownsModel"),
|
|
591
|
+
customHeaders: {
|
|
592
|
+
"HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
|
|
593
|
+
"X-OpenRouter-Title": "Qwen Code"
|
|
594
|
+
},
|
|
595
|
+
documentationUrl: "https://openrouter.ai/docs",
|
|
596
|
+
uiGroup: "third-party"
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
// packages/core/src/providers/presets/requesty.ts
|
|
600
|
+
init_esbuild_shims();
|
|
601
|
+
var REQUESTY_ENV_KEY = "REQUESTY_API_KEY";
|
|
602
|
+
var REQUESTY_BASE_URL = "https://router.requesty.ai/v1";
|
|
603
|
+
var requestyProvider = {
|
|
604
|
+
id: "requesty",
|
|
605
|
+
label: "Requesty",
|
|
606
|
+
description: "Connect with a Requesty API key (get one from app.requesty.ai/api-keys)",
|
|
607
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
608
|
+
baseUrl: REQUESTY_BASE_URL,
|
|
609
|
+
envKey: REQUESTY_ENV_KEY,
|
|
610
|
+
models: [
|
|
611
|
+
{ id: "openai/gpt-4o-mini", contextWindowSize: 128e3 },
|
|
612
|
+
{ id: "openai/gpt-4o", contextWindowSize: 128e3 }
|
|
613
|
+
],
|
|
614
|
+
modelsEditable: true,
|
|
615
|
+
modelNamePrefix: "Requesty",
|
|
616
|
+
ownsModel: /* @__PURE__ */ __name((model) => {
|
|
617
|
+
if (model.envKey !== REQUESTY_ENV_KEY) return false;
|
|
618
|
+
try {
|
|
619
|
+
const host = new URL(model.baseUrl ?? "").hostname;
|
|
620
|
+
return host === "router.requesty.ai" || host.endsWith(".requesty.ai");
|
|
621
|
+
} catch {
|
|
622
|
+
return false;
|
|
623
|
+
}
|
|
624
|
+
}, "ownsModel"),
|
|
625
|
+
customHeaders: {
|
|
626
|
+
"HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
|
|
627
|
+
"X-Title": "Qwen Code"
|
|
628
|
+
},
|
|
629
|
+
documentationUrl: "https://docs.requesty.ai",
|
|
630
|
+
uiGroup: "third-party"
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
// packages/core/src/providers/presets/deepseek.ts
|
|
634
|
+
init_esbuild_shims();
|
|
635
|
+
var deepseekProvider = {
|
|
636
|
+
id: "deepseek",
|
|
637
|
+
label: "DeepSeek API Key",
|
|
638
|
+
description: "Quick setup for DeepSeek (deepseek-v4-flash, deepseek-v4-pro)",
|
|
639
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
640
|
+
baseUrl: "https://api.deepseek.com",
|
|
641
|
+
envKey: "DEEPSEEK_API_KEY",
|
|
642
|
+
models: [
|
|
643
|
+
{
|
|
644
|
+
id: "deepseek-v4-pro",
|
|
645
|
+
contextWindowSize: 1e6,
|
|
646
|
+
capabilities: {
|
|
647
|
+
reasoning: {
|
|
648
|
+
thinking: true,
|
|
649
|
+
efforts: ["high", "max"],
|
|
650
|
+
defaultEffort: "high",
|
|
651
|
+
disableField: "thinking"
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
{ id: "deepseek-v4-flash", contextWindowSize: 1e6 }
|
|
656
|
+
],
|
|
657
|
+
modelsEditable: true,
|
|
658
|
+
modelNamePrefix: "DeepSeek",
|
|
659
|
+
documentationUrl: "https://api-docs.deepseek.com/zh-cn/",
|
|
660
|
+
uiGroup: "third-party"
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
// packages/core/src/providers/presets/grok.ts
|
|
664
|
+
init_esbuild_shims();
|
|
665
|
+
var GROK_ENV_KEY = "XAI_API_KEY";
|
|
666
|
+
var GROK_BASE_URL = "https://api.x.ai/v1";
|
|
667
|
+
var grokProvider = {
|
|
668
|
+
id: "grok",
|
|
669
|
+
label: "Grok (xAI) API Key",
|
|
670
|
+
description: "Quick setup for xAI Grok chat & code models",
|
|
671
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
672
|
+
baseUrl: GROK_BASE_URL,
|
|
673
|
+
envKey: GROK_ENV_KEY,
|
|
674
|
+
// xAI's API follows the standard OpenAI format. Grok models reason by
|
|
675
|
+
// default (grok-4.5 exposes an optional reasoning_effort knob, default
|
|
676
|
+
// high) and have no Qwen-style enable_thinking toggle, so the preset
|
|
677
|
+
// carries only each model's context window.
|
|
678
|
+
models: [
|
|
679
|
+
{ id: "grok-4.5", contextWindowSize: 5e5 },
|
|
680
|
+
{ id: "grok-4.3", contextWindowSize: 1e6 },
|
|
681
|
+
{ id: "grok-4.20-0309-reasoning", contextWindowSize: 1e6 },
|
|
682
|
+
{ id: "grok-4.20-0309-non-reasoning", contextWindowSize: 1e6 },
|
|
683
|
+
{ id: "grok-4.20-multi-agent-0309", contextWindowSize: 1e6 },
|
|
684
|
+
{ id: "grok-build-0.1", contextWindowSize: 262144 }
|
|
685
|
+
],
|
|
686
|
+
modelsEditable: true,
|
|
687
|
+
modelNamePrefix: "Grok",
|
|
688
|
+
documentationUrl: "https://docs.x.ai/docs",
|
|
689
|
+
uiGroup: "third-party"
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
// packages/core/src/providers/presets/minimax.ts
|
|
693
|
+
init_esbuild_shims();
|
|
694
|
+
var minimaxProvider = {
|
|
695
|
+
id: "minimax",
|
|
696
|
+
label: "MiniMax API Key",
|
|
697
|
+
description: "Quick setup for MiniMax models",
|
|
698
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
699
|
+
baseUrl: [
|
|
700
|
+
{
|
|
701
|
+
id: "international",
|
|
702
|
+
label: "International",
|
|
703
|
+
url: "https://api.minimax.io/v1",
|
|
704
|
+
documentationUrl: "https://www.minimax.io/platform"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
id: "china",
|
|
708
|
+
label: "China",
|
|
709
|
+
url: "https://api.minimaxi.com/v1",
|
|
710
|
+
documentationUrl: "https://platform.minimaxi.com"
|
|
711
|
+
}
|
|
712
|
+
],
|
|
713
|
+
envKey: "MINIMAX_API_KEY",
|
|
714
|
+
models: [
|
|
715
|
+
{
|
|
716
|
+
id: "MiniMax-M3",
|
|
717
|
+
contextWindowSize: 1e6,
|
|
718
|
+
modalities: { image: true, video: true }
|
|
719
|
+
},
|
|
720
|
+
{ id: "MiniMax-M2.7", contextWindowSize: 204800 },
|
|
721
|
+
{ id: "MiniMax-M2.7-highspeed", contextWindowSize: 204800 },
|
|
722
|
+
{ id: "MiniMax-M2.5", contextWindowSize: 196608 },
|
|
723
|
+
{ id: "MiniMax-M2.5-highspeed", contextWindowSize: 196608 },
|
|
724
|
+
{ id: "image-01", imageOnly: true },
|
|
725
|
+
{ id: "image-01-live", imageOnly: true }
|
|
726
|
+
],
|
|
727
|
+
modelsEditable: true,
|
|
728
|
+
modelNamePrefix: "MiniMax",
|
|
729
|
+
uiGroup: "third-party"
|
|
730
|
+
};
|
|
731
|
+
|
|
732
|
+
// packages/core/src/providers/presets/zai.ts
|
|
733
|
+
init_esbuild_shims();
|
|
734
|
+
var zaiProvider = {
|
|
735
|
+
id: "zai",
|
|
736
|
+
label: "Z.AI API Key",
|
|
737
|
+
description: "Quick setup for Z.AI models",
|
|
738
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
739
|
+
baseUrl: [
|
|
740
|
+
{
|
|
741
|
+
id: "standard-api-key",
|
|
742
|
+
label: "Standard API Key",
|
|
743
|
+
url: "https://api.z.ai/api/paas/v4",
|
|
744
|
+
documentationUrl: "https://docs.z.ai/"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
id: "coding-plan",
|
|
748
|
+
label: "Coding Plan",
|
|
749
|
+
url: "https://api.z.ai/api/coding/paas/v4",
|
|
750
|
+
documentationUrl: "https://docs.z.ai/"
|
|
751
|
+
}
|
|
752
|
+
],
|
|
753
|
+
envKey: "ZAI_API_KEY",
|
|
754
|
+
models: [
|
|
755
|
+
{ id: "GLM-5.2", contextWindowSize: 1e6, enableThinking: true },
|
|
756
|
+
{ id: "GLM-5.1", contextWindowSize: 204800, enableThinking: true },
|
|
757
|
+
{ id: "GLM-5", contextWindowSize: 204800 },
|
|
758
|
+
{ id: "GLM-5-Turbo", contextWindowSize: 204800 }
|
|
759
|
+
],
|
|
760
|
+
modelsEditable: true,
|
|
761
|
+
modelNamePrefix: "Z.AI",
|
|
762
|
+
uiGroup: "third-party"
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
// packages/core/src/providers/presets/moonshot.ts
|
|
766
|
+
init_esbuild_shims();
|
|
767
|
+
var moonshotProvider = {
|
|
768
|
+
id: "moonshot",
|
|
769
|
+
label: "Kimi (Moonshot AI) API Key",
|
|
770
|
+
description: "Quick setup for Kimi models",
|
|
771
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
772
|
+
baseUrl: [
|
|
773
|
+
{
|
|
774
|
+
id: "international",
|
|
775
|
+
label: "International",
|
|
776
|
+
url: "https://api.moonshot.ai/v1",
|
|
777
|
+
documentationUrl: "https://platform.kimi.ai/docs"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
id: "china",
|
|
781
|
+
label: "China",
|
|
782
|
+
url: "https://api.moonshot.cn/v1",
|
|
783
|
+
documentationUrl: "https://platform.moonshot.cn/docs"
|
|
784
|
+
}
|
|
785
|
+
],
|
|
786
|
+
envKey: "MOONSHOT_API_KEY",
|
|
787
|
+
models: [
|
|
788
|
+
{
|
|
789
|
+
id: "kimi-k3",
|
|
790
|
+
contextWindowSize: 1e6,
|
|
791
|
+
// K3 always thinks: the API exposes `reasoning_effort` but no way to
|
|
792
|
+
// turn thinking off, so never emit a disable shape on the wire.
|
|
793
|
+
thinkingMandatory: true,
|
|
794
|
+
modalities: { image: true, video: true }
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
id: "kimi-k2.7-code",
|
|
798
|
+
contextWindowSize: 262144,
|
|
799
|
+
enableThinking: true,
|
|
800
|
+
modalities: { image: true, video: true }
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
id: "kimi-k2.7-code-highspeed",
|
|
804
|
+
contextWindowSize: 262144,
|
|
805
|
+
enableThinking: true,
|
|
806
|
+
modalities: { image: true, video: true }
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
id: "kimi-k2.6",
|
|
810
|
+
contextWindowSize: 262144,
|
|
811
|
+
enableThinking: true,
|
|
812
|
+
modalities: { image: true, video: true }
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
modelsEditable: true,
|
|
816
|
+
modelNamePrefix: "Kimi",
|
|
817
|
+
uiGroup: "third-party"
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
// packages/core/src/providers/presets/idealab.ts
|
|
821
|
+
init_esbuild_shims();
|
|
822
|
+
var idealabProvider = {
|
|
823
|
+
id: "idealab",
|
|
824
|
+
label: "Idealab API Key",
|
|
825
|
+
description: "Alibaba internal LLM service (Qwen3.6-Plus-DogFooding, DeepSeek V4, Kimi K2.6)",
|
|
826
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
827
|
+
baseUrl: "https://idealab.alibaba-inc.com/api/openai/v1",
|
|
828
|
+
envKey: "IDEALAB_API_KEY",
|
|
829
|
+
models: [
|
|
830
|
+
{
|
|
831
|
+
id: "Qwen3.6-Plus-DogFooding",
|
|
832
|
+
contextWindowSize: 1e6,
|
|
833
|
+
enableThinking: true,
|
|
834
|
+
modalities: { image: true, video: true }
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
id: "bailian/deepseek-v4-pro",
|
|
838
|
+
contextWindowSize: 1e6,
|
|
839
|
+
enableThinking: true
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
id: "bailian/deepseek-v4-flash",
|
|
843
|
+
contextWindowSize: 1e6,
|
|
844
|
+
enableThinking: true
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
id: "bailian/kimi-k2.6",
|
|
848
|
+
contextWindowSize: 262144,
|
|
849
|
+
enableThinking: true
|
|
850
|
+
}
|
|
851
|
+
],
|
|
852
|
+
modelsEditable: true,
|
|
853
|
+
modelNamePrefix: "Idealab",
|
|
854
|
+
uiGroup: "third-party"
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
// packages/core/src/providers/presets/modelscope.ts
|
|
858
|
+
init_esbuild_shims();
|
|
859
|
+
var modelscopeProvider = {
|
|
860
|
+
id: "modelscope",
|
|
861
|
+
label: "ModelScope API Key",
|
|
862
|
+
description: "Quick setup for ModelScope API Inference",
|
|
863
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
864
|
+
baseUrl: "https://api-inference.modelscope.cn/v1",
|
|
865
|
+
envKey: "MODELSCOPE_API_KEY",
|
|
866
|
+
models: [
|
|
867
|
+
{
|
|
868
|
+
id: "deepseek-ai/DeepSeek-V4-Flash",
|
|
869
|
+
contextWindowSize: 1e6,
|
|
870
|
+
enableThinking: true
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
id: "Qwen/Qwen3.5-397B-A17B",
|
|
874
|
+
contextWindowSize: 1e6,
|
|
875
|
+
enableThinking: true
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
id: "ZhipuAI/GLM-5.1",
|
|
879
|
+
contextWindowSize: 1e6,
|
|
880
|
+
enableThinking: true
|
|
881
|
+
}
|
|
882
|
+
],
|
|
883
|
+
modelsEditable: true,
|
|
884
|
+
modelNamePrefix: "ModelScope",
|
|
885
|
+
documentationUrl: "https://modelscope.cn/docs/model-service/API-Inference/intro",
|
|
886
|
+
uiGroup: "third-party"
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
// packages/core/src/providers/presets/custom-provider.ts
|
|
890
|
+
init_esbuild_shims();
|
|
891
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
892
|
+
var CUSTOM_API_KEY_ENV_PREFIX = "QWEN_CUSTOM_API_KEY_";
|
|
893
|
+
function normalizeEnvSegment(value) {
|
|
894
|
+
const upper = value.trim().toUpperCase();
|
|
895
|
+
let result = "";
|
|
896
|
+
let prevWasUnderscore = false;
|
|
897
|
+
for (let i = 0; i < upper.length; i++) {
|
|
898
|
+
const code = upper.charCodeAt(i);
|
|
899
|
+
const isAlphaNum = code >= 65 && code <= 90 || code >= 48 && code <= 57;
|
|
900
|
+
if (isAlphaNum) {
|
|
901
|
+
result += upper[i];
|
|
902
|
+
prevWasUnderscore = false;
|
|
903
|
+
} else if (!prevWasUnderscore) {
|
|
904
|
+
result += "_";
|
|
905
|
+
prevWasUnderscore = true;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
let start = 0;
|
|
909
|
+
let end = result.length;
|
|
910
|
+
while (start < end && result.charCodeAt(start) === 95) start++;
|
|
911
|
+
while (end > start && result.charCodeAt(end - 1) === 95) end--;
|
|
912
|
+
return result.slice(start, end);
|
|
913
|
+
}
|
|
914
|
+
__name(normalizeEnvSegment, "normalizeEnvSegment");
|
|
915
|
+
function stripTrailingSlashes(value) {
|
|
916
|
+
let end = value.length;
|
|
917
|
+
while (end > 0 && value.charCodeAt(end - 1) === 47) end--;
|
|
918
|
+
return value.slice(0, end);
|
|
919
|
+
}
|
|
920
|
+
__name(stripTrailingSlashes, "stripTrailingSlashes");
|
|
921
|
+
function generateCustomEnvKey(protocol, baseUrl) {
|
|
922
|
+
const canonicalBaseUrl = stripTrailingSlashes(baseUrl.trim());
|
|
923
|
+
const suffix = createHash2("sha256").update(`${protocol}\0${canonicalBaseUrl}`).digest("hex").slice(0, 12).toUpperCase();
|
|
924
|
+
return `${CUSTOM_API_KEY_ENV_PREFIX}${normalizeEnvSegment(
|
|
925
|
+
protocol
|
|
926
|
+
)}_${normalizeEnvSegment(baseUrl)}_${suffix}`;
|
|
927
|
+
}
|
|
928
|
+
__name(generateCustomEnvKey, "generateCustomEnvKey");
|
|
929
|
+
var customProvider = {
|
|
930
|
+
id: "custom-openai-compatible",
|
|
931
|
+
label: "Custom Provider",
|
|
932
|
+
description: "Manually connect a local server, proxy, or unsupported provider",
|
|
933
|
+
protocol: "openai" /* USE_OPENAI */,
|
|
934
|
+
protocolOptions: [
|
|
935
|
+
"openai" /* USE_OPENAI */,
|
|
936
|
+
"anthropic" /* USE_ANTHROPIC */,
|
|
937
|
+
"gemini" /* USE_GEMINI */
|
|
938
|
+
],
|
|
939
|
+
baseUrl: void 0,
|
|
940
|
+
envKey: generateCustomEnvKey,
|
|
941
|
+
models: void 0,
|
|
942
|
+
modelNamePrefix: "",
|
|
943
|
+
showAdvancedConfig: true,
|
|
944
|
+
// Detect existing custom entries by our env-key namespace for UI/ACP flows,
|
|
945
|
+
// but merge installs by id+baseUrl so /auth can add another custom model
|
|
946
|
+
// without deleting models from other endpoints or different models on the
|
|
947
|
+
// same endpoint.
|
|
948
|
+
ownsModel: /* @__PURE__ */ __name((model) => typeof model.envKey === "string" && model.envKey.startsWith(CUSTOM_API_KEY_ENV_PREFIX), "ownsModel"),
|
|
949
|
+
mergeModelsByIdentity: true,
|
|
950
|
+
uiGroup: "custom"
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
// packages/core/src/providers/all-providers.ts
|
|
954
|
+
var ALL_PROVIDERS = [
|
|
955
|
+
codingPlanProvider,
|
|
956
|
+
tokenPlanProvider,
|
|
957
|
+
alibabaStandardProvider,
|
|
958
|
+
deepseekProvider,
|
|
959
|
+
grokProvider,
|
|
960
|
+
minimaxProvider,
|
|
961
|
+
zaiProvider,
|
|
962
|
+
moonshotProvider,
|
|
963
|
+
idealabProvider,
|
|
964
|
+
modelscopeProvider,
|
|
965
|
+
openRouterProvider,
|
|
966
|
+
requestyProvider,
|
|
967
|
+
customProvider
|
|
968
|
+
];
|
|
969
|
+
var ALIBABA_PROVIDERS = ALL_PROVIDERS.filter(
|
|
970
|
+
(p) => p.uiGroup === "alibaba"
|
|
971
|
+
);
|
|
972
|
+
var THIRD_PARTY_PROVIDERS = ALL_PROVIDERS.filter(
|
|
973
|
+
(p) => p.uiGroup === "third-party"
|
|
974
|
+
);
|
|
975
|
+
function findProviderById(id) {
|
|
976
|
+
return ALL_PROVIDERS.find((p) => p.id === id);
|
|
977
|
+
}
|
|
978
|
+
__name(findProviderById, "findProviderById");
|
|
979
|
+
function findProviderByCredentials(baseUrl, envKey) {
|
|
980
|
+
return ALL_PROVIDERS.find(
|
|
981
|
+
(p) => providerMatchesCredentials(p, baseUrl, envKey)
|
|
982
|
+
);
|
|
983
|
+
}
|
|
984
|
+
__name(findProviderByCredentials, "findProviderByCredentials");
|
|
985
|
+
function getAllProviderBaseUrls() {
|
|
986
|
+
return ALL_PROVIDERS.flatMap((p) => {
|
|
987
|
+
if (typeof p.baseUrl === "string") return [p.baseUrl];
|
|
988
|
+
if (Array.isArray(p.baseUrl))
|
|
989
|
+
return p.baseUrl.map((o) => o.url);
|
|
990
|
+
return [];
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
__name(getAllProviderBaseUrls, "getAllProviderBaseUrls");
|
|
994
|
+
|
|
995
|
+
export {
|
|
996
|
+
resolveOwnsModel,
|
|
997
|
+
resolveMetadataKey,
|
|
998
|
+
PROVIDER_METADATA_NS,
|
|
999
|
+
buildInstallPlan,
|
|
1000
|
+
computeModelListVersion,
|
|
1001
|
+
getDefaultBaseUrlForProtocol,
|
|
1002
|
+
resolveBaseUrl,
|
|
1003
|
+
getDefaultModelIds,
|
|
1004
|
+
findExistingProviderModels,
|
|
1005
|
+
shouldShowStep,
|
|
1006
|
+
providerMatchesCredentials,
|
|
1007
|
+
buildProviderTemplate,
|
|
1008
|
+
customProvider,
|
|
1009
|
+
ALL_PROVIDERS,
|
|
1010
|
+
ALIBABA_PROVIDERS,
|
|
1011
|
+
THIRD_PARTY_PROVIDERS,
|
|
1012
|
+
findProviderById,
|
|
1013
|
+
findProviderByCredentials,
|
|
1014
|
+
getAllProviderBaseUrls
|
|
1015
|
+
};
|
|
1016
|
+
/**
|
|
1017
|
+
* @license
|
|
1018
|
+
* Copyright 2026 Qwen Team
|
|
1019
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1020
|
+
*/
|
|
1021
|
+
/**
|
|
1022
|
+
* @license
|
|
1023
|
+
* Copyright 2025 Qwen Team
|
|
1024
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1025
|
+
*/
|
|
1026
|
+
/**
|
|
1027
|
+
* @license
|
|
1028
|
+
* Copyright 2026 Qwen Team
|
|
1029
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1030
|
+
*
|
|
1031
|
+
* Provider registry — imports all provider definitions and assembles the
|
|
1032
|
+
* lookup tables used by the UI and CLI commands.
|
|
1033
|
+
*/
|