@shadowob/cloud 1.1.6-dev.311
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/README.md +509 -0
- package/dist/agent-browser-CERTMCDL.js +117 -0
- package/dist/agent-browser-CIRZRIY4.js +118 -0
- package/dist/agent-pack-LF3O5TR4.js +1236 -0
- package/dist/agent-pack-RQT27V7R.js +1235 -0
- package/dist/airtable-BG2Q75G2.js +82 -0
- package/dist/airtable-JCQXFM5D.js +83 -0
- package/dist/alipay-MZX2XCDB.js +52 -0
- package/dist/alipay-TZQI34RB.js +51 -0
- package/dist/amap-5RQB3VGC.js +45 -0
- package/dist/amap-KPCLZYYL.js +44 -0
- package/dist/atlassian-LGOEWYC7.js +54 -0
- package/dist/atlassian-TVS2A4IU.js +55 -0
- package/dist/baidu-appbuilder-6UMESXHW.js +41 -0
- package/dist/baidu-appbuilder-QRRL3ETM.js +42 -0
- package/dist/baidu-maps-HEPMVP5D.js +44 -0
- package/dist/baidu-maps-HXC4FBVP.js +45 -0
- package/dist/baidu-netdisk-G5Q6B5NH.js +45 -0
- package/dist/baidu-netdisk-RS2K5W2M.js +44 -0
- package/dist/baidu-smartprogram-EWTK5WKK.js +41 -0
- package/dist/baidu-smartprogram-JHD3XWF6.js +40 -0
- package/dist/browserbase-IUIYVYI7.js +67 -0
- package/dist/browserbase-JFO2PCIA.js +68 -0
- package/dist/canva-3YOFL7JS.js +62 -0
- package/dist/canva-FMYN65SM.js +61 -0
- package/dist/chunk-6P2K6QZR.js +529 -0
- package/dist/chunk-7VMRQ7MG.js +90 -0
- package/dist/chunk-AD3JTIU3.js +17 -0
- package/dist/chunk-BF6CV2Y4.js +64 -0
- package/dist/chunk-CTNUKOQE.js +439 -0
- package/dist/chunk-EEFMJYKB.js +97 -0
- package/dist/chunk-EJKFQ35I.js +739 -0
- package/dist/chunk-HUICDC56.js +62 -0
- package/dist/chunk-JUPAE5IA.js +527 -0
- package/dist/chunk-JY2HTT7Q.js +437 -0
- package/dist/chunk-KEPTCLUO.js +121 -0
- package/dist/chunk-KKK5H7YX.js +3622 -0
- package/dist/chunk-POSVEKIY.js +210 -0
- package/dist/chunk-QET4LT4J.js +5769 -0
- package/dist/chunk-QV4XWO3P.js +30 -0
- package/dist/chunk-R52J3PH2.js +120 -0
- package/dist/chunk-R5U7XKVJ.js +16 -0
- package/dist/chunk-RECNVWMT.js +212 -0
- package/dist/chunk-RTPBU5HF.js +92 -0
- package/dist/chunk-SUZ2ATT6.js +5774 -0
- package/dist/chunk-SVMXSIMG.js +98 -0
- package/dist/chunk-TV3CBM7R.js +28 -0
- package/dist/chunk-V2LU736V.js +3495 -0
- package/dist/chunk-ZUYL3W53.js +741 -0
- package/dist/claude-plugin-577TAQVS.js +1463 -0
- package/dist/claude-plugin-L3MXJJ6J.js +1464 -0
- package/dist/cli.js +7021 -0
- package/dist/cloudflare-HBBABPK6.js +114 -0
- package/dist/cloudflare-RDFPKMM5.js +115 -0
- package/dist/cnb-FLP3QX46.js +44 -0
- package/dist/cnb-YAVVEYFB.js +45 -0
- package/dist/console/index.html +12 -0
- package/dist/console/logo.png +0 -0
- package/dist/console/static/css/5079.f9e0918d.css +1 -0
- package/dist/console/static/css/index.7f91f806.css +1 -0
- package/dist/console/static/font/codicon.5b7d6fac.ttf +0 -0
- package/dist/console/static/js/5079.72a51ca2.js +699 -0
- package/dist/console/static/js/5079.72a51ca2.js.LICENSE.txt +35 -0
- package/dist/console/static/js/7426.f8d483ea.js +1 -0
- package/dist/console/static/js/async/1008.4df521b7.js +1 -0
- package/dist/console/static/js/async/102.1d473ec7.js +1 -0
- package/dist/console/static/js/async/1134.3f9fd9e7.js +1 -0
- package/dist/console/static/js/async/1318.4b8e48e7.js +1 -0
- package/dist/console/static/js/async/1360.5606da88.js +7 -0
- package/dist/console/static/js/async/1546.045f484f.js +1 -0
- package/dist/console/static/js/async/1562.187de2a8.js +1 -0
- package/dist/console/static/js/async/168.456d4813.js +1 -0
- package/dist/console/static/js/async/1750.e6dc2664.js +1 -0
- package/dist/console/static/js/async/1994.3fc86066.js +1 -0
- package/dist/console/static/js/async/2348.613ae3d9.js +1 -0
- package/dist/console/static/js/async/2390.1b890b9d.js +1 -0
- package/dist/console/static/js/async/2414.9d040212.js +1 -0
- package/dist/console/static/js/async/2454.4c1784ab.js +1 -0
- package/dist/console/static/js/async/2498.f5f92030.js +1 -0
- package/dist/console/static/js/async/2924.b823cd1a.js +1 -0
- package/dist/console/static/js/async/3062.63fddea6.js +1 -0
- package/dist/console/static/js/async/3078.dd712008.js +1 -0
- package/dist/console/static/js/async/3198.1f307065.js +1 -0
- package/dist/console/static/js/async/3246.3d5a899f.js +1 -0
- package/dist/console/static/js/async/3286.871676eb.js +1 -0
- package/dist/console/static/js/async/342.10bf3b90.js +1 -0
- package/dist/console/static/js/async/3446.9681a4d7.js +1 -0
- package/dist/console/static/js/async/3698.ccfaabec.js +1 -0
- package/dist/console/static/js/async/3790.2a1106a6.js +1 -0
- package/dist/console/static/js/async/4231.b29784d4.js +1 -0
- package/dist/console/static/js/async/4551.515bd41d.js +1 -0
- package/dist/console/static/js/async/4596.40f6e71b.js +1 -0
- package/dist/console/static/js/async/4600.4aaebe6d.js +1 -0
- package/dist/console/static/js/async/4718.1aae022f.js +1 -0
- package/dist/console/static/js/async/4846.a347c020.js +1 -0
- package/dist/console/static/js/async/4860.83dadf89.js +1 -0
- package/dist/console/static/js/async/500.fcfa37cb.js +1 -0
- package/dist/console/static/js/async/5096.b360203d.js +1 -0
- package/dist/console/static/js/async/5222.043274fe.js +1 -0
- package/dist/console/static/js/async/5362.f498001c.js +1 -0
- package/dist/console/static/js/async/54.c94f0755.js +1 -0
- package/dist/console/static/js/async/5478.50dd9ef0.js +2 -0
- package/dist/console/static/js/async/5478.50dd9ef0.js.LICENSE.txt +3 -0
- package/dist/console/static/js/async/5507.a6a1f793.js +1 -0
- package/dist/console/static/js/async/5638.bc6b102d.js +1 -0
- package/dist/console/static/js/async/5722.e0029049.js +1 -0
- package/dist/console/static/js/async/5942.74635c6b.js +1 -0
- package/dist/console/static/js/async/5994.1c5629c1.js +1 -0
- package/dist/console/static/js/async/6054.6bddf720.js +1 -0
- package/dist/console/static/js/async/6118.45e754e5.js +1 -0
- package/dist/console/static/js/async/6127.adcbcbb6.js +1 -0
- package/dist/console/static/js/async/614.3f434c20.js +1 -0
- package/dist/console/static/js/async/6234.ba3b002d.js +1 -0
- package/dist/console/static/js/async/6310.6546a9ba.js +1 -0
- package/dist/console/static/js/async/6378.9f805419.js +1 -0
- package/dist/console/static/js/async/6380.e4433c49.js +1 -0
- package/dist/console/static/js/async/6418.f23bcfda.js +1 -0
- package/dist/console/static/js/async/6428.77c86114.js +1 -0
- package/dist/console/static/js/async/6443.83318a6c.js +1 -0
- package/dist/console/static/js/async/6508.2b445d62.js +3 -0
- package/dist/console/static/js/async/6542.e82a26c8.js +1 -0
- package/dist/console/static/js/async/6544.62111ecb.js +1 -0
- package/dist/console/static/js/async/6612.a0c9fcf4.js +1 -0
- package/dist/console/static/js/async/6740.695aebf0.js +1 -0
- package/dist/console/static/js/async/6822.dbbb32bc.js +1 -0
- package/dist/console/static/js/async/6824.ad3540ab.js +1 -0
- package/dist/console/static/js/async/6930.585dab94.js +1 -0
- package/dist/console/static/js/async/6982.c81b95e6.js +1 -0
- package/dist/console/static/js/async/7046.ab2378c1.js +1 -0
- package/dist/console/static/js/async/7110.a603277f.js +1 -0
- package/dist/console/static/js/async/7142.4a21366f.js +1 -0
- package/dist/console/static/js/async/7348.15cc6148.js +1373 -0
- package/dist/console/static/js/async/7348.15cc6148.js.LICENSE.txt +14 -0
- package/dist/console/static/js/async/7374.b1ac5c44.js +1 -0
- package/dist/console/static/js/async/742.847f17ca.js +1 -0
- package/dist/console/static/js/async/7446.743954d8.js +1 -0
- package/dist/console/static/js/async/7673.59bbbaac.js +1 -0
- package/dist/console/static/js/async/7684.c5760c8c.js +1 -0
- package/dist/console/static/js/async/7714.c30d0f94.js +1 -0
- package/dist/console/static/js/async/8118.36d5a3bf.js +298 -0
- package/dist/console/static/js/async/8145.4bcf043a.js +1 -0
- package/dist/console/static/js/async/8246.408de938.js +1 -0
- package/dist/console/static/js/async/8390.bdae1f7d.js +1 -0
- package/dist/console/static/js/async/8422.fd94dbe1.js +1 -0
- package/dist/console/static/js/async/8434.94a0e2ae.js +1 -0
- package/dist/console/static/js/async/8518.3158de13.js +1 -0
- package/dist/console/static/js/async/8564.fc2eb841.js +1 -0
- package/dist/console/static/js/async/8678.73af4c9b.js +1 -0
- package/dist/console/static/js/async/8694.79747168.js +1 -0
- package/dist/console/static/js/async/8756.1de37b83.js +1 -0
- package/dist/console/static/js/async/8804.7fe6bdf9.js +3 -0
- package/dist/console/static/js/async/8883.e717ee94.js +1 -0
- package/dist/console/static/js/async/8886.fe6e876c.js +1 -0
- package/dist/console/static/js/async/9030.fc1ae402.js +1 -0
- package/dist/console/static/js/async/9094.5598d084.js +1 -0
- package/dist/console/static/js/async/9218.ee7b84b7.js +1 -0
- package/dist/console/static/js/async/94.9b80bc35.js +1 -0
- package/dist/console/static/js/async/9526.92aba34c.js +1 -0
- package/dist/console/static/js/async/9762.f83bc4f3.js +1 -0
- package/dist/console/static/js/async/984.e11c113a.js +1 -0
- package/dist/console/static/js/async/9846.246653cd.js +1 -0
- package/dist/console/static/js/index.4487e1ff.js +1 -0
- package/dist/console/static/js/lib-react.15d7ca9a.js +2 -0
- package/dist/console/static/js/lib-react.15d7ca9a.js.LICENSE.txt +49 -0
- package/dist/coze-C6PMDPBI.js +49 -0
- package/dist/coze-E6VGRNLV.js +48 -0
- package/dist/dashboard.command-J7XOZNXU.js +8 -0
- package/dist/dashboard.command-RV2NHDKW.js +7 -0
- package/dist/dingtalk-JNRNRN7E.js +77 -0
- package/dist/dingtalk-WZGGIAHJ.js +76 -0
- package/dist/douyin-miniprogram-AIJPPIZH.js +41 -0
- package/dist/douyin-miniprogram-HCYZ5NBW.js +42 -0
- package/dist/figma-2YYNSCDX.js +103 -0
- package/dist/figma-RYOBMENP.js +102 -0
- package/dist/firebase-2IJDDBXX.js +112 -0
- package/dist/firebase-OYSY6HPT.js +111 -0
- package/dist/firecrawl-2T3SBUW7.js +66 -0
- package/dist/firecrawl-IYYXLAZM.js +65 -0
- package/dist/flyai-7FJ4TRAG.js +81 -0
- package/dist/flyai-QS5Q6FJR.js +82 -0
- package/dist/gitagent-MWI75OIX.js +725 -0
- package/dist/gitagent-YBMWY7NZ.js +726 -0
- package/dist/gitee-3N7OFOM7.js +53 -0
- package/dist/gitee-KVNK6KLZ.js +54 -0
- package/dist/github-LUEC2LID.js +143 -0
- package/dist/github-XRO5Z3GC.js +142 -0
- package/dist/google-ads-A3QAJI4D.js +88 -0
- package/dist/google-ads-VPKWTX67.js +89 -0
- package/dist/google-analytics-C4UR5ZR2.js +50 -0
- package/dist/google-analytics-XDYZA2B7.js +49 -0
- package/dist/google-workspace-LL3EWVHH.js +320 -0
- package/dist/google-workspace-YX35SHHX.js +321 -0
- package/dist/huawei-xiaoyi-6BSMGJHR.js +40 -0
- package/dist/huawei-xiaoyi-KPWLTSHB.js +41 -0
- package/dist/hubspot-DIUHGEDI.js +45 -0
- package/dist/hubspot-FTIEMNZO.js +44 -0
- package/dist/huggingface-MJCOXA7E.js +116 -0
- package/dist/huggingface-UUXK2RHK.js +117 -0
- package/dist/index.d.ts +3013 -0
- package/dist/index.js +15649 -0
- package/dist/inference-ai-image-generation-CMI6R5T3.js +106 -0
- package/dist/inference-ai-image-generation-PXV6IG4U.js +107 -0
- package/dist/inference-sh-7AZOLEFI.js +94 -0
- package/dist/inference-sh-ABQOD3YF.js +95 -0
- package/dist/init.command-6E24K4H3.js +9 -0
- package/dist/init.command-O4HG4HKR.js +10 -0
- package/dist/klaviyo-6K5YEFNH.js +45 -0
- package/dist/klaviyo-LDPBWBSS.js +44 -0
- package/dist/kuaidi100-HGFM5VK2.js +42 -0
- package/dist/kuaidi100-UHPFCVXP.js +41 -0
- package/dist/lark-6LNA3LUQ.js +103 -0
- package/dist/lark-URVBZNS4.js +102 -0
- package/dist/linear-7QFSFPOD.js +57 -0
- package/dist/linear-T4ORUP7N.js +56 -0
- package/dist/lovart-PDUXRUHJ.js +99 -0
- package/dist/lovart-QO3SK55T.js +100 -0
- package/dist/meta-ads-SCNFI45S.js +42 -0
- package/dist/meta-ads-V6XPZWX3.js +41 -0
- package/dist/miclaw-5CNTW7VV.js +36 -0
- package/dist/miclaw-TPPPS2WN.js +35 -0
- package/dist/model-provider-AVSFJSZP.js +393 -0
- package/dist/model-provider-KFB76XV5.js +392 -0
- package/dist/notion-FZK76MN2.js +69 -0
- package/dist/notion-WFA7KGZZ.js +70 -0
- package/dist/oceanengine-3JZUS3PP.js +43 -0
- package/dist/oceanengine-5BRIJVJE.js +42 -0
- package/dist/opencli-PFXHGCS2.js +81 -0
- package/dist/opencli-VIGRJTGH.js +80 -0
- package/dist/paypal-33UADIPR.js +54 -0
- package/dist/paypal-Z5JYHIWD.js +55 -0
- package/dist/playwright-MG5WHK47.js +58 -0
- package/dist/playwright-SQAQ3DZG.js +59 -0
- package/dist/plugins-HZBWK3WQ.js +120 -0
- package/dist/plugins-I4GD5SZX.js +121 -0
- package/dist/posthog-MU5MAJOQ.js +79 -0
- package/dist/posthog-RJRRKDWB.js +80 -0
- package/dist/salesforce-34FVIJTG.js +82 -0
- package/dist/salesforce-3QZ6OFVO.js +83 -0
- package/dist/sentry-MCIRMACU.js +111 -0
- package/dist/sentry-PIWW46VA.js +110 -0
- package/dist/seo-suite-4SQ3I67Q.js +54 -0
- package/dist/seo-suite-WJXMA3S4.js +55 -0
- package/dist/serve.command-5FMIPQRY.js +10 -0
- package/dist/serve.command-DNE6GPMK.js +9 -0
- package/dist/shadowob-JELOWHWX.js +1068 -0
- package/dist/shadowob-PRSMI5MW.js +1069 -0
- package/dist/sherlock-2PKY2E2Y.js +66 -0
- package/dist/sherlock-C5ZWPPVT.js +67 -0
- package/dist/shopify-GL3NFVGE.js +94 -0
- package/dist/shopify-R4G3UXM6.js +93 -0
- package/dist/skill-discovery-7INAUP4D.js +77 -0
- package/dist/skill-discovery-YPXXV622.js +78 -0
- package/dist/state-7MCZBTR5.js +17 -0
- package/dist/state-FGOFLFBE.js +18 -0
- package/dist/stripe-C22RR4ZS.js +83 -0
- package/dist/stripe-LJNPQ3CQ.js +82 -0
- package/dist/supabase-IRNQ54FJ.js +98 -0
- package/dist/supabase-N4ONFJNQ.js +97 -0
- package/dist/taobao-aipaas-LRR4GMO3.js +45 -0
- package/dist/taobao-aipaas-RVKORSF4.js +46 -0
- package/dist/tapd-3JPVJ7XH.js +46 -0
- package/dist/tapd-TMQRSMFG.js +47 -0
- package/dist/tencent-ads-IGD33LO7.js +42 -0
- package/dist/tencent-ads-UHC6OPBV.js +43 -0
- package/dist/tencent-docs-C3A4J3CJ.js +47 -0
- package/dist/tencent-docs-O2SC4FHL.js +48 -0
- package/dist/tencent-maps-HMMWMNF4.js +37 -0
- package/dist/tencent-maps-OQOKHVW2.js +36 -0
- package/dist/vercel-KOXDDTHX.js +73 -0
- package/dist/vercel-OLNVDWMG.js +74 -0
- package/dist/webflow-FULU5Q2I.js +114 -0
- package/dist/webflow-OMJKZM54.js +115 -0
- package/dist/wechat-miniprogram-skyline-KYCDMQNW.js +74 -0
- package/dist/wechat-miniprogram-skyline-VR4FVIQL.js +75 -0
- package/dist/wechat-pay-BCMAJ6UW.js +50 -0
- package/dist/wechat-pay-YQQKXVUI.js +51 -0
- package/dist/wonda-NGWIORYN.js +81 -0
- package/dist/wonda-RBABXFNM.js +82 -0
- package/dist/wordpress-woocommerce-RDIUTHYT.js +57 -0
- package/dist/wordpress-woocommerce-RNA5HB3N.js +58 -0
- package/dist/wps-DAEFQHDE.js +47 -0
- package/dist/wps-LUWHMZQQ.js +48 -0
- package/dist/yuque-HCHTJWNI.js +72 -0
- package/dist/yuque-KRH5O74J.js +71 -0
- package/images/RUNNERS.md +270 -0
- package/images/cc-connect-runner/entrypoint.mjs +311 -0
- package/images/claude-runner/Dockerfile +88 -0
- package/images/claude-runner/RUNNER.md +222 -0
- package/images/claude-runner/entrypoint.mjs +2 -0
- package/images/codex-runner/Dockerfile +87 -0
- package/images/codex-runner/RUNNER.md +226 -0
- package/images/codex-runner/entrypoint.mjs +2 -0
- package/images/gemini-runner/Dockerfile +87 -0
- package/images/gemini-runner/RUNNER.md +218 -0
- package/images/gemini-runner/entrypoint.mjs +2 -0
- package/images/hermes-runner/Dockerfile +74 -0
- package/images/hermes-runner/RUNNER.md +243 -0
- package/images/hermes-runner/entrypoint.mjs +283 -0
- package/images/openclaw-runner/Dockerfile +212 -0
- package/images/openclaw-runner/RUNNER.md +170 -0
- package/images/openclaw-runner/entrypoint.mjs +1113 -0
- package/images/openclaw-runner/warm-runtime-deps.mjs +95 -0
- package/images/opencode-runner/Dockerfile +87 -0
- package/images/opencode-runner/RUNNER.md +202 -0
- package/images/opencode-runner/entrypoint.mjs +2 -0
- package/package.json +121 -0
- package/templates/agent-marketplace-buddy.template.json +131 -0
- package/templates/ai-werewolf.template.json +92 -0
- package/templates/bmad-method-buddy.template.json +123 -0
- package/templates/brain-fix.template.json +92 -0
- package/templates/claude-ads-buddy.template.json +123 -0
- package/templates/claude-financial-services-buddy.template.json +111 -0
- package/templates/claude-seo-buddy.template.json +123 -0
- package/templates/code-arena.template.json +92 -0
- package/templates/daily-brief.template.json +92 -0
- package/templates/e-wife.template.json +92 -0
- package/templates/everything-claude-code-buddy.template.json +125 -0
- package/templates/financial-freedom.template.json +92 -0
- package/templates/gitstory.template.json +92 -0
- package/templates/google-workspace-buddy.template.json +88 -0
- package/templates/gsd-buddy.template.json +119 -0
- package/templates/gstack-buddy.template.json +143 -0
- package/templates/gstack.template.json +92 -0
- package/templates/little-match-girl.template.json +114 -0
- package/templates/lovart-buddy.template.json +110 -0
- package/templates/marketingskills-buddy.template.json +102 -0
- package/templates/retire-buddy.template.json +92 -0
- package/templates/scientific-skills-buddy.template.json +119 -0
- package/templates/seomachine-buddy.template.json +113 -0
- package/templates/shadow-server-app-demo.template.json +105 -0
- package/templates/slavingia-skills-buddy.template.json +102 -0
- package/templates/superclaude-buddy.template.json +146 -0
- package/templates/superpowers-buddy.template.json +108 -0
- package/templates/world-pulse.template.json +92 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
definePlugin
|
|
4
|
+
} from "./chunk-CTNUKOQE.js";
|
|
5
|
+
import "./chunk-AD3JTIU3.js";
|
|
6
|
+
|
|
7
|
+
// src/plugins/model-provider/manifest.json
|
|
8
|
+
var manifest_default = {
|
|
9
|
+
id: "model-provider",
|
|
10
|
+
name: "Model Provider",
|
|
11
|
+
description: "Auto-discovers AI model providers from environment variables. Injects provider configs for any detected API keys (Anthropic, OpenAI, DeepSeek, Gemini, Grok, OpenRouter, or custom OpenAI-compatible endpoints) \u2014 no manual registry.providers needed.",
|
|
12
|
+
version: "1.0.0",
|
|
13
|
+
category: "ai-provider",
|
|
14
|
+
icon: "cpu",
|
|
15
|
+
auth: {
|
|
16
|
+
type: "none",
|
|
17
|
+
fields: []
|
|
18
|
+
},
|
|
19
|
+
config: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {}
|
|
22
|
+
},
|
|
23
|
+
capabilities: ["auth-provider", "config-builder"],
|
|
24
|
+
tags: ["ai", "llm", "models", "provider", "model-selection"]
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// src/plugins/model-provider/index.ts
|
|
28
|
+
var PROVIDER_PROFILE_MODELS_ENV_KEY = "SHADOW_PROVIDER_PROFILE_MODELS_JSON";
|
|
29
|
+
var ALL_TAGS = ["default", "fast", "flash", "reasoning", "vision"];
|
|
30
|
+
var BUILTIN_PROVIDER_CATALOGS = [
|
|
31
|
+
{
|
|
32
|
+
id: "anthropic",
|
|
33
|
+
api: "anthropic-messages",
|
|
34
|
+
envKey: "ANTHROPIC_API_KEY",
|
|
35
|
+
envKeyAliases: ["ANTHROPIC_AUTH_TOKEN"],
|
|
36
|
+
baseUrl: "https://api.anthropic.com/v1",
|
|
37
|
+
baseUrlEnvKey: "ANTHROPIC_BASE_URL",
|
|
38
|
+
modelEnvKey: "ANTHROPIC_MODEL",
|
|
39
|
+
priority: 10,
|
|
40
|
+
models: [
|
|
41
|
+
{ id: "claude-sonnet-4-5", tags: ["default", "vision"] },
|
|
42
|
+
{ id: "claude-3-5-haiku-20241022", tags: ["flash"] },
|
|
43
|
+
{ id: "claude-opus-4-5", tags: ["reasoning"] }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "openai",
|
|
48
|
+
api: "openai-completions",
|
|
49
|
+
envKey: "OPENAI_API_KEY",
|
|
50
|
+
baseUrl: "https://api.openai.com/v1",
|
|
51
|
+
priority: 20,
|
|
52
|
+
models: [
|
|
53
|
+
{ id: "gpt-4o", tags: ["default", "vision"] },
|
|
54
|
+
{ id: "gpt-4o-mini", tags: ["flash"] },
|
|
55
|
+
{ id: "o3", tags: ["reasoning"] }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "gemini",
|
|
60
|
+
api: "google-generative-ai",
|
|
61
|
+
envKey: "GEMINI_API_KEY",
|
|
62
|
+
envKeyAliases: ["GOOGLE_API_KEY", "GOOGLE_AI_API_KEY"],
|
|
63
|
+
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
|
|
64
|
+
priority: 30,
|
|
65
|
+
models: [
|
|
66
|
+
{ id: "gemini-2.0-flash", tags: ["default", "flash", "vision"] },
|
|
67
|
+
{ id: "gemini-2.5-pro", tags: ["reasoning"] }
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "deepseek",
|
|
72
|
+
api: "openai-completions",
|
|
73
|
+
envKey: "DEEPSEEK_API_KEY",
|
|
74
|
+
baseUrl: "https://api.deepseek.com/v1",
|
|
75
|
+
priority: 50,
|
|
76
|
+
models: [
|
|
77
|
+
{ id: "deepseek-chat", tags: ["default", "flash"] },
|
|
78
|
+
{ id: "deepseek-reasoner", tags: ["reasoning"] }
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "qwen",
|
|
83
|
+
api: "openai-completions",
|
|
84
|
+
envKey: "DASHSCOPE_API_KEY",
|
|
85
|
+
envKeyAliases: ["ALIBABA_API_KEY", "QWEN_API_KEY"],
|
|
86
|
+
baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
87
|
+
priority: 52,
|
|
88
|
+
models: [
|
|
89
|
+
{ id: "qwen-turbo", name: "Qwen Turbo", tags: ["fast", "flash"] },
|
|
90
|
+
{ id: "qwen-plus", name: "Qwen Plus", tags: ["default"] },
|
|
91
|
+
{ id: "qwen-max", name: "Qwen Max", tags: ["reasoning"] },
|
|
92
|
+
{ id: "qwen-vl-plus", name: "Qwen VL Plus", tags: ["vision"] }
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "minimax",
|
|
97
|
+
api: "openai-completions",
|
|
98
|
+
envKey: "MINIMAX_API_KEY",
|
|
99
|
+
baseUrl: "https://api.minimax.io/v1",
|
|
100
|
+
priority: 54,
|
|
101
|
+
models: [
|
|
102
|
+
{ id: "MiniMax-M2.1", name: "MiniMax M2.1", tags: ["default"] },
|
|
103
|
+
{
|
|
104
|
+
id: "MiniMax-M2.1-highspeed",
|
|
105
|
+
name: "MiniMax M2.1 Highspeed",
|
|
106
|
+
tags: ["fast", "flash"]
|
|
107
|
+
},
|
|
108
|
+
{ id: "MiniMax-M2.5", name: "MiniMax M2.5", tags: ["reasoning"] }
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "moonshot",
|
|
113
|
+
api: "openai-completions",
|
|
114
|
+
envKey: "MOONSHOT_API_KEY",
|
|
115
|
+
envKeyAliases: ["KIMI_API_KEY"],
|
|
116
|
+
baseUrl: "https://api.moonshot.ai/v1",
|
|
117
|
+
priority: 56,
|
|
118
|
+
models: [
|
|
119
|
+
{ id: "moonshot-v1-8k", name: "Moonshot 8K", tags: ["fast", "flash"] },
|
|
120
|
+
{ id: "moonshot-v1-32k", name: "Moonshot 32K", tags: ["default"] },
|
|
121
|
+
{ id: "moonshot-v1-128k", name: "Moonshot 128K", tags: ["reasoning"] }
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "zai",
|
|
126
|
+
api: "openai-completions",
|
|
127
|
+
envKey: "ZAI_API_KEY",
|
|
128
|
+
envKeyAliases: ["ZHIPUAI_API_KEY", "GLM_API_KEY", "BIGMODEL_API_KEY"],
|
|
129
|
+
baseUrl: "https://api.z.ai/api/paas/v4",
|
|
130
|
+
priority: 58,
|
|
131
|
+
models: [
|
|
132
|
+
{
|
|
133
|
+
id: "glm-4.5-air",
|
|
134
|
+
name: "GLM 4.5 Air",
|
|
135
|
+
tags: ["fast", "flash", "reasoning"]
|
|
136
|
+
},
|
|
137
|
+
{ id: "glm-4.5", name: "GLM 4.5", tags: ["default", "reasoning"] },
|
|
138
|
+
{ id: "glm-4.5v", name: "GLM 4.5V", tags: ["vision"] }
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "openrouter",
|
|
143
|
+
api: "openai-completions",
|
|
144
|
+
envKey: "OPENROUTER_API_KEY",
|
|
145
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
146
|
+
priority: 60,
|
|
147
|
+
models: [{ id: "auto", tags: ["default", "flash", "reasoning", "vision"] }]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "grok",
|
|
151
|
+
api: "openai-completions",
|
|
152
|
+
envKey: "XAI_API_KEY",
|
|
153
|
+
envKeyAliases: ["GROK_API_KEY"],
|
|
154
|
+
baseUrl: "https://api.x.ai/v1",
|
|
155
|
+
priority: 62,
|
|
156
|
+
models: [
|
|
157
|
+
{ id: "grok-4.1", name: "Grok 4.1", tags: ["default", "reasoning"] },
|
|
158
|
+
{ id: "grok-4.1-fast", name: "Grok 4.1 Fast", tags: ["fast", "flash"] }
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
];
|
|
162
|
+
function providerCatalogs(ctx) {
|
|
163
|
+
return ctx.pluginRegistry.getAll().flatMap((plugin) => plugin.providerCatalogs ?? []).filter((catalog) => catalog.allowEnvDetection !== false).sort((a, b) => (a.priority ?? 1e3) - (b.priority ?? 1e3));
|
|
164
|
+
}
|
|
165
|
+
function resolveEnvKey(catalog, env) {
|
|
166
|
+
for (const key of [catalog.envKey, ...catalog.envKeyAliases ?? []]) {
|
|
167
|
+
if (env[key] ?? process.env[key]) return key;
|
|
168
|
+
}
|
|
169
|
+
return void 0;
|
|
170
|
+
}
|
|
171
|
+
function runtimeValue(key, env) {
|
|
172
|
+
if (!key) return void 0;
|
|
173
|
+
return env[key] ?? process.env[key];
|
|
174
|
+
}
|
|
175
|
+
function modelTagAliases(tag) {
|
|
176
|
+
return tag === "fast" || tag === "flash" ? ["fast", "flash"] : [tag];
|
|
177
|
+
}
|
|
178
|
+
function normalizeProfileModel(raw) {
|
|
179
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
180
|
+
const record = raw;
|
|
181
|
+
const id = typeof record.id === "string" ? record.id.trim() : "";
|
|
182
|
+
if (!id) return null;
|
|
183
|
+
const tags = Array.isArray(record.tags) ? record.tags.filter((tag) => typeof tag === "string").map((tag) => tag.trim().toLowerCase()).filter((tag) => ALL_TAGS.includes(tag)) : void 0;
|
|
184
|
+
const contextWindow = typeof record.contextWindow === "number" && Number.isFinite(record.contextWindow) ? record.contextWindow : void 0;
|
|
185
|
+
const maxTokens = typeof record.maxTokens === "number" && Number.isFinite(record.maxTokens) ? record.maxTokens : void 0;
|
|
186
|
+
return {
|
|
187
|
+
id,
|
|
188
|
+
...typeof record.name === "string" && record.name.trim() ? { name: record.name.trim() } : {},
|
|
189
|
+
...tags && tags.length > 0 ? { tags: [...new Set(tags)] } : {},
|
|
190
|
+
...contextWindow ? { contextWindow } : {},
|
|
191
|
+
...maxTokens ? { maxTokens } : {}
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function parseProviderProfileModelSets(env) {
|
|
195
|
+
const value = runtimeValue(PROVIDER_PROFILE_MODELS_ENV_KEY, env);
|
|
196
|
+
if (!value) return [];
|
|
197
|
+
try {
|
|
198
|
+
const parsed = JSON.parse(value);
|
|
199
|
+
if (!Array.isArray(parsed)) return [];
|
|
200
|
+
return parsed.map((item) => {
|
|
201
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) return null;
|
|
202
|
+
const record = item;
|
|
203
|
+
const providerId = typeof record.providerId === "string" ? record.providerId.trim() : "";
|
|
204
|
+
const profileId = typeof record.profileId === "string" ? record.profileId.trim() : void 0;
|
|
205
|
+
const models = Array.isArray(record.models) ? record.models.map(normalizeProfileModel).filter((model) => Boolean(model)) : [];
|
|
206
|
+
return providerId && models.length > 0 ? { providerId, profileId, models } : null;
|
|
207
|
+
}).filter((entry) => Boolean(entry));
|
|
208
|
+
} catch {
|
|
209
|
+
return [];
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function mergeModelEntries(catalog, profileModelSets) {
|
|
213
|
+
const profileModels = profileModelSets.filter((set) => set.providerId === catalog.id).flatMap((set) => set.models);
|
|
214
|
+
if (profileModels.length === 0) return catalog;
|
|
215
|
+
const seen = /* @__PURE__ */ new Set();
|
|
216
|
+
const models = [];
|
|
217
|
+
for (const model of [...profileModels, ...catalog.models]) {
|
|
218
|
+
if (seen.has(model.id)) continue;
|
|
219
|
+
seen.add(model.id);
|
|
220
|
+
models.push(model);
|
|
221
|
+
}
|
|
222
|
+
return { ...catalog, models };
|
|
223
|
+
}
|
|
224
|
+
function modelEntries(models) {
|
|
225
|
+
return models.map((model) => ({
|
|
226
|
+
id: model.id,
|
|
227
|
+
name: model.name ?? model.id,
|
|
228
|
+
...model.contextWindow != null ? { contextWindow: model.contextWindow } : {},
|
|
229
|
+
...model.maxTokens != null ? { maxTokens: model.maxTokens } : {}
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
function withModelOverride(catalog, env) {
|
|
233
|
+
const rawModelOverride = runtimeValue(catalog.modelEnvKey, env)?.trim();
|
|
234
|
+
const modelOverride = rawModelOverride?.startsWith(`${catalog.id}/`) ? rawModelOverride.slice(catalog.id.length + 1) : rawModelOverride;
|
|
235
|
+
if (!modelOverride) return { catalog, models: catalog.models };
|
|
236
|
+
const models = [
|
|
237
|
+
{ id: modelOverride, tags: [...ALL_TAGS] },
|
|
238
|
+
...catalog.models
|
|
239
|
+
];
|
|
240
|
+
return { catalog: { ...catalog, models }, models };
|
|
241
|
+
}
|
|
242
|
+
function buildProviderEntry(catalog, env) {
|
|
243
|
+
const resolvedEnvKey = resolveEnvKey(catalog, env);
|
|
244
|
+
if (!resolvedEnvKey) return null;
|
|
245
|
+
const baseUrl = runtimeValue(catalog.baseUrlEnvKey, env) ?? catalog.baseUrl;
|
|
246
|
+
if (catalog.id === "custom" && !baseUrl) return null;
|
|
247
|
+
const resolved = withModelOverride(catalog, env);
|
|
248
|
+
const entry = {
|
|
249
|
+
api: catalog.api,
|
|
250
|
+
apiKey: `\${env:${resolvedEnvKey}}`,
|
|
251
|
+
request: { allowPrivateNetwork: true },
|
|
252
|
+
models: modelEntries(resolved.models)
|
|
253
|
+
};
|
|
254
|
+
if (baseUrl) entry.baseUrl = baseUrl;
|
|
255
|
+
return { catalog: resolved.catalog, entry };
|
|
256
|
+
}
|
|
257
|
+
function resolveModelsBySelector(catalogs, selector) {
|
|
258
|
+
const refs = [];
|
|
259
|
+
const normalized = selector.trim().toLowerCase();
|
|
260
|
+
const tag = ALL_TAGS.includes(normalized) ? normalized : void 0;
|
|
261
|
+
const aliases = tag ? modelTagAliases(tag) : [];
|
|
262
|
+
for (const catalog of catalogs) {
|
|
263
|
+
const model = catalog.models.find(
|
|
264
|
+
(m) => m.id.toLowerCase() === normalized || `${catalog.id}/${m.id}`.toLowerCase() === normalized || m.tags?.some((modelTag) => aliases.includes(modelTag))
|
|
265
|
+
);
|
|
266
|
+
if (model) refs.push(`${catalog.id}/${model.id}`);
|
|
267
|
+
}
|
|
268
|
+
return refs;
|
|
269
|
+
}
|
|
270
|
+
function selectedSelector(ctx) {
|
|
271
|
+
const agentUseEntry = ctx.agent.use?.find((e) => e.plugin === "model-provider");
|
|
272
|
+
const templateUseEntry = ctx.config.use?.find((e) => e.plugin === "model-provider");
|
|
273
|
+
const rawSelector = agentUseEntry?.options?.selector ?? agentUseEntry?.options?.tag ?? agentUseEntry?.options?.model ?? templateUseEntry?.options?.selector ?? templateUseEntry?.options?.tag ?? templateUseEntry?.options?.model ?? "default";
|
|
274
|
+
return rawSelector?.trim() || "default";
|
|
275
|
+
}
|
|
276
|
+
function envCandidates(catalogs) {
|
|
277
|
+
const keys = /* @__PURE__ */ new Set([PROVIDER_PROFILE_MODELS_ENV_KEY]);
|
|
278
|
+
for (const catalog of catalogs) {
|
|
279
|
+
keys.add(catalog.envKey);
|
|
280
|
+
for (const alias of catalog.envKeyAliases ?? []) keys.add(alias);
|
|
281
|
+
if (catalog.baseUrlEnvKey) keys.add(catalog.baseUrlEnvKey);
|
|
282
|
+
if (catalog.modelEnvKey) keys.add(catalog.modelEnvKey);
|
|
283
|
+
}
|
|
284
|
+
return [...keys];
|
|
285
|
+
}
|
|
286
|
+
function hasOpenAICompatibleProxy(env) {
|
|
287
|
+
return Boolean(
|
|
288
|
+
runtimeValue("OPENAI_COMPATIBLE_API_KEY", env) && runtimeValue("OPENAI_COMPATIBLE_BASE_URL", env)
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
function activeProviderCatalogs(ctx, env) {
|
|
292
|
+
const catalogs = providerCatalogs(ctx);
|
|
293
|
+
if (!hasOpenAICompatibleProxy(env)) return catalogs;
|
|
294
|
+
return catalogs.filter((catalog) => catalog.id === "custom");
|
|
295
|
+
}
|
|
296
|
+
var model_provider_default = definePlugin(manifest_default, (api) => {
|
|
297
|
+
for (const catalog of BUILTIN_PROVIDER_CATALOGS) {
|
|
298
|
+
api.addProviderCatalog(catalog);
|
|
299
|
+
}
|
|
300
|
+
api.addProviderCatalog({
|
|
301
|
+
id: "custom",
|
|
302
|
+
api: "openai-completions",
|
|
303
|
+
envKey: "OPENAI_COMPATIBLE_API_KEY",
|
|
304
|
+
baseUrlEnvKey: "OPENAI_COMPATIBLE_BASE_URL",
|
|
305
|
+
modelEnvKey: "OPENAI_COMPATIBLE_MODEL_ID",
|
|
306
|
+
priority: 5,
|
|
307
|
+
models: [{ id: "default", tags: ["default", "flash", "reasoning", "vision"] }]
|
|
308
|
+
});
|
|
309
|
+
api.addSecretFields([
|
|
310
|
+
{
|
|
311
|
+
key: "OPENAI_COMPATIBLE_API_KEY",
|
|
312
|
+
label: "OpenAI-compatible API Key",
|
|
313
|
+
required: false,
|
|
314
|
+
sensitive: true
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
key: "OPENAI_COMPATIBLE_BASE_URL",
|
|
318
|
+
label: "OpenAI-compatible Base URL",
|
|
319
|
+
required: false,
|
|
320
|
+
sensitive: false
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
key: "OPENAI_COMPATIBLE_MODEL_ID",
|
|
324
|
+
label: "OpenAI-compatible Model ID",
|
|
325
|
+
required: false,
|
|
326
|
+
sensitive: false
|
|
327
|
+
}
|
|
328
|
+
]);
|
|
329
|
+
api.onBuildConfig((ctx) => {
|
|
330
|
+
const env = ctx.secrets;
|
|
331
|
+
const profileModelSets = parseProviderProfileModelSets(env);
|
|
332
|
+
const providers = {};
|
|
333
|
+
const discovered = [];
|
|
334
|
+
for (const catalog of activeProviderCatalogs(ctx, env).map(
|
|
335
|
+
(entry) => mergeModelEntries(entry, profileModelSets)
|
|
336
|
+
)) {
|
|
337
|
+
const provider = buildProviderEntry(catalog, env);
|
|
338
|
+
if (!provider) continue;
|
|
339
|
+
providers[catalog.id] = provider.entry;
|
|
340
|
+
discovered.push(provider.catalog);
|
|
341
|
+
}
|
|
342
|
+
if (Object.keys(providers).length === 0) return {};
|
|
343
|
+
const fragment = {
|
|
344
|
+
models: {
|
|
345
|
+
mode: "merge",
|
|
346
|
+
providers
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
const modelRefs = resolveModelsBySelector(discovered, selectedSelector(ctx));
|
|
350
|
+
if (modelRefs.length > 0) {
|
|
351
|
+
const [primary, ...fallbacks] = modelRefs;
|
|
352
|
+
fragment.agents = {
|
|
353
|
+
defaults: {
|
|
354
|
+
model: {
|
|
355
|
+
primary,
|
|
356
|
+
...fallbacks.length > 0 ? { fallbacks } : {}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
return fragment;
|
|
362
|
+
});
|
|
363
|
+
api.onBuildEnv((ctx) => {
|
|
364
|
+
const env = ctx.secrets;
|
|
365
|
+
const out = {};
|
|
366
|
+
for (const key of envCandidates(activeProviderCatalogs(ctx, env))) {
|
|
367
|
+
const value = runtimeValue(key, env);
|
|
368
|
+
if (value) out[key] = value;
|
|
369
|
+
}
|
|
370
|
+
return out;
|
|
371
|
+
});
|
|
372
|
+
api.onValidate((ctx) => {
|
|
373
|
+
const env = ctx.secrets;
|
|
374
|
+
const keys = envCandidates(providerCatalogs(ctx));
|
|
375
|
+
const found = keys.some((key) => runtimeValue(key, env));
|
|
376
|
+
if (!found) {
|
|
377
|
+
return {
|
|
378
|
+
valid: true,
|
|
379
|
+
errors: [
|
|
380
|
+
{
|
|
381
|
+
path: "use[model-provider]",
|
|
382
|
+
message: "model-provider: no provider credentials detected. Configure a saved provider profile or set one provider env var such as ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, DEEPSEEK_API_KEY, XAI_API_KEY, OPENROUTER_API_KEY, or OPENAI_COMPATIBLE_API_KEY.",
|
|
383
|
+
severity: "warning"
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
return { valid: true, errors: [] };
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
export {
|
|
392
|
+
model_provider_default as default
|
|
393
|
+
};
|