nolo-cli 0.103.0-alpha.1 → 0.103.0
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 +1 -1
- package/{_executeModel-3UCNJCQA.js → _executeModel-7J7Q3WXY.js} +75 -68
- package/action-C4KMTCJF.js +20 -0
- package/{addContentAction-O7R66HEX.js → addContentAction-7TNIOVZI.js} +12 -11
- package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-O47J3MVW.js} +18 -19
- package/{agentDeleteCommand-2YAHAZFJ.js → agentDeleteCommand-YPJHK7JA.js} +117 -42
- package/{agentEmailCommands-WLYF3JRS.js → agentEmailCommands-AWEXOHWM.js} +98 -88
- package/agentListCommands-2DTLLJZD.js +742 -0
- package/{agentMachineCommands-HNGAR5GI.js → agentMachineCommands-PGEEQ4JJ.js} +48 -43
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-XPJYZSCE.js} +97 -2
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
- package/agentRecordCommands-DZVLCPLJ.js +138 -0
- package/agentRunCommand-AX5CYQ46.js +167 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
- package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-PITRQ2EU.js} +48 -39
- package/{agentSlice-SICQBMCM.js → agentSlice-4TLSG6FB.js} +14 -13
- package/{appDeleteCommands-32MHLR4L.js → appDeleteCommands-UC2JW5FJ.js} +46 -41
- package/{appDeployCommands-WCQOUSOB.js → appDeployCommands-OL2RKVJ3.js} +46 -41
- package/{appDeployStatusCommands-6QKB7DYN.js → appDeployStatusCommands-B3PLC62M.js} +46 -41
- package/{appGetCommands-SFAPP5PB.js → appGetCommands-REESA2XQ.js} +46 -41
- package/{appListCommands-EKUBDRUO.js → appListCommands-UF6XX7HR.js} +46 -41
- package/{authCommand-F4EFRRX6.js → authCommand-NQPMGYHP.js} +118 -24
- package/{authCommands-RGOGCPP6.js → authCommands-LWLOZETU.js} +7 -5
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-GFY77VRN.js} +10 -8
- package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
- package/{chunk-UKZDAFYT.js → chunk-22RVE2PC.js} +6 -10
- package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
- package/{chunk-HVURBGF3.js → chunk-2H6SEVDS.js} +6 -6
- package/{chunk-TOP2VXOR.js → chunk-2K4TM6AW.js} +5 -5
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-53HEEOTT.js → chunk-2WJ57RJA.js} +83 -16
- package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
- package/chunk-4A2R7KHG.js +13545 -0
- package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
- package/{chunk-JRQFUXY7.js → chunk-4G4C5SXT.js} +99 -22
- package/{chunk-DHDMC6FO.js → chunk-4HTMUQIZ.js} +14 -9
- package/{chunk-B3TVQ6PI.js → chunk-4IVA6UUE.js} +20 -11
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-H62HCIUP.js → chunk-56HJ2LAA.js} +35 -22
- package/{chunk-V4MJDUSR.js → chunk-5EPHWMP5.js} +2 -2
- package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
- package/{chunk-3WLK2JQ5.js → chunk-5IWONK6X.js} +68 -46
- package/chunk-5J3PYNUP.js +255 -0
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-LW4VFPAY.js → chunk-5ZDLVKNG.js} +873 -228
- package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-AEOE4Z6Q.js → chunk-6UEJDFF7.js} +39 -15
- package/{chunk-JPGCXHNM.js → chunk-7JWCVINR.js} +1 -1
- package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
- package/{chunk-IIVGDG4I.js → chunk-7KWFIKKK.js} +13 -7
- package/chunk-A4SQRTZ6.js +15 -0
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
- package/{chunk-L5UXH3B2.js → chunk-B455PEFD.js} +27 -8
- package/{chunk-XS5SWEDQ.js → chunk-BELZY72F.js} +1 -1
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-6YTOJY35.js → chunk-BZ7NPA6G.js} +35 -2
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-3BMYXEUW.js → chunk-CUF4MYKI.js} +1 -1
- package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
- package/{chunk-WV42OMV7.js → chunk-D2GQE6AF.js} +8 -8
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/chunk-DZ7R5V3Y.js +164 -0
- package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
- package/{chunk-KQ4ONNQD.js → chunk-EKPKW6RM.js} +155 -8
- package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-AGVEIAQA.js → chunk-F442UK5V.js} +29 -78
- package/{chunk-HJUYAD4A.js → chunk-FBTNYNAL.js} +5 -5
- package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
- package/{chunk-ETI2NYVF.js → chunk-GCTKWVLU.js} +4 -4
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
- package/{chunk-6VFARHZW.js → chunk-H7TQORR4.js} +994 -1079
- package/{chunk-5H7KJX7J.js → chunk-HD3S2F7U.js} +5 -5
- package/chunk-HDJRLWTG.js +8002 -0
- package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
- package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-VLTIYV3X.js → chunk-HP57OUJO.js} +4 -4
- package/{chunk-4OEFYTWL.js → chunk-IRZTHHNM.js} +67 -48
- package/{chunk-GPCZ7UXG.js → chunk-K6U4NKFJ.js} +1 -1
- package/{chunk-OZGZPSEG.js → chunk-KGRP4VOK.js} +47 -67
- package/{chunk-DNCEALKX.js → chunk-LB5A6JTU.js} +22 -29
- package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
- package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
- package/{chunk-Z77CRGTW.js → chunk-MSFZ7FMO.js} +1 -1
- package/chunk-NKWIS6G2.js +442 -0
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/chunk-NWENLDMM.js +42 -0
- package/chunk-O7SVKKLY.js +875 -0
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-PQFHGD77.js → chunk-OM2RUOEU.js} +161 -14
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-TQBHNYVR.js → chunk-PLRFCQ7C.js} +567 -519
- package/{chunk-6D6VBVEW.js → chunk-Q7O72MF5.js} +80 -14
- package/{chunk-J4MOO56S.js → chunk-RILRSUGC.js} +10 -2
- package/{chunk-RSONHHPE.js → chunk-RNUDNZJW.js} +10 -10
- package/{chunk-3N3W7KBB.js → chunk-RZJAZVCF.js} +11 -9
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/{chunk-GEPUP7OO.js → chunk-TSXNDTXL.js} +3 -3
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
- package/{chunk-UZGQNTVW.js → chunk-UA324D4O.js} +8 -6
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/{chunk-BP4XNZRM.js → chunk-UNAOTLKO.js} +4 -4
- package/{chunk-CUQEXCAU.js → chunk-UQ5P2WHS.js} +29 -9
- package/{chunk-NA35QHCF.js → chunk-V6YASAZR.js} +1 -1
- package/{chunk-3DII57IT.js → chunk-VCAQFMVN.js} +1 -1
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-ZCYXJSTU.js → chunk-VL3H5ZU3.js} +66 -94
- package/{chunk-Q554LLSI.js → chunk-VLGL7FOL.js} +1 -1
- package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
- package/{chunk-4EG4QFTK.js → chunk-WI6TUGLJ.js} +19 -17
- package/{chunk-QDSINZM3.js → chunk-WJ3B6FX6.js} +1 -14
- package/{chunk-OEVAY4J6.js → chunk-XMUZHRSB.js} +18 -20
- package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
- package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
- package/{chunk-7S4YWN7P.js → chunk-YDO5ERB4.js} +4 -4
- package/chunk-YK5MHOWM.js +915 -0
- package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
- package/chunk-YV25TM3R.js +780 -0
- package/{chunk-IONPPCL5.js → chunk-YZZREBID.js} +86 -16
- package/{chunk-DNUUJ45N.js → chunk-Z3WSAK6A.js} +23 -28
- package/chunk-ZRAU6T47.js +56 -0
- package/commandRegistry-VQPFWVDH.js +833 -0
- package/{contentThunks-S4S7QPSO.js → contentThunks-A26ME6OJ.js} +37 -35
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-ODGL2YGP.js → createAgentAutomationAction-BSAMZJ5W.js} +39 -37
- package/createDialogAction-CMCQXYHD.js +69 -0
- package/{createPageAction-FBV3OWX7.js → createPageAction-ANGKJTK2.js} +46 -43
- package/{chunk-F2RNI7ZR.js → cursorProvider-YGGNMVWX.js} +2496 -9897
- package/{dbSlice-XVWBAGYN.js → dbSlice-QOLNF5GN.js} +11 -10
- package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
- package/{dialogCommands-5J56DFWN.js → dialogCommands-AMPAWLX4.js} +49 -45
- package/{dialogSlice-LEO27SQG.js → dialogSlice-DGWDEBYC.js} +41 -34
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-KYI2DC2U.js → docCreateCommands-7NMIYL5D.js} +48 -43
- package/{docDeleteCommands-67REUSRY.js → docDeleteCommands-BD4OM5PV.js} +49 -44
- package/{docReadCommands-HOSVSBDJ.js → docReadCommands-5IOVAKU2.js} +47 -42
- package/{docStore-MNX5MHA5.js → docStore-TP4QDER4.js} +16 -12
- package/{docUpdateCommands-EMGCSMXY.js → docUpdateCommands-ZTKJ6UPC.js} +48 -43
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-5L7OVM5Y.js} +5 -5
- package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +4 -4
- package/{handleSendMessageAction-YB6KQFJS.js → handleSendMessageAction-N4WKFRSQ.js} +111 -87
- package/index.js +87 -884
- package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-O5A26FDK.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
- package/{machineCommands-7GVQCUAK.js → machineCommands-47WKGY5Z.js} +92 -82
- package/machineWsRunDispatch-CYW5FJ52.js +154 -0
- package/{memberThunks-QGFLFVCI.js → memberThunks-25K6DDRA.js} +20 -18
- package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/package.json +1 -1
- package/pdf-U6KSUEZZ.js +26435 -0
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-TEBH7FDX.js} +7 -7
- package/{providerRegistry-757OWH3O.js → providerRegistry-CBJLNCET.js} +11 -7
- package/{read-COE3ZYR6.js → read-PJIT2YEJ.js} +7 -6
- package/{readDocTool-5USN4A6V.js → readDocTool-DRSXHGNL.js} +5 -3
- package/{readlineWorkspace-WA7JNI6J.js → readlineWorkspace-CK7GOVOC.js} +2698 -2055
- package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-VIWJL6MX.js} +21 -25
- package/{runAgentClientLoop-JGFQ6KIR.js → runAgentClientLoop-BGHGP5AR.js} +76 -70
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-A7VA3NFM.js} +15 -13
- package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-B4P7YQX2.js} +22 -26
- package/{chunk-AFUORTY4.js → settingThunks-KOYSAT65.js} +226 -940
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-NKJVJCQQ.js → spaceCommands-QJCYG27F.js} +51 -46
- package/{streamAgentChatTurn-XLFZ66UC.js → streamAgentChatTurn-ANE7OTCZ.js} +214 -108
- package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-3VYWHZKH.js} +18 -19
- package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-EJT6TMFG.js} +3 -3
- package/tools-WPOVVP7M.js +116 -0
- package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-QCHCULPM.js} +25 -22
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-6MBTD4UE.js → updateDialogTitleAction-C4GRCXL4.js} +82 -44
- package/action-YVYQEAAV.js +0 -31
- package/agentListCommands-JP7S7PT2.js +0 -469
- package/agentRecordCommands-SXFPW3DL.js +0 -128
- package/agentRunCommand-JIQ4HY4D.js +0 -155
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-HHMUDNXL.js +0 -186
- package/chunk-CQ3WA2NE.js +0 -299
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-XVZ22N6C.js +0 -20782
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/createDialogAction-GFKRXTK4.js +0 -65
- package/machineWsRunDispatch-XA7TD7Z7.js +0 -144
- package/settingSlice-ZQZVUPKK.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-NF5AB34X.js +0 -110
- package/{chunk-VMFTFOWF.js → chunk-ODAPITXL.js} +7 -7
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
platformHostedModels,
|
|
10
10
|
toCnyCredits,
|
|
11
11
|
zaiModels
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y3PMXGLH.js";
|
|
13
13
|
|
|
14
14
|
// packages/integrations/qwen/models.ts
|
|
15
15
|
var qwenModels = [
|
|
@@ -1188,8 +1188,18 @@ function pipe(...pipe$1) {
|
|
|
1188
1188
|
|
|
1189
1189
|
// packages/ai/agent/createAgentSchema.ts
|
|
1190
1190
|
var DEFAULT_REASONING_EFFORT = "medium";
|
|
1191
|
+
var REASONING_EFFORT_OPTIONS = [
|
|
1192
|
+
"none",
|
|
1193
|
+
"minimal",
|
|
1194
|
+
"low",
|
|
1195
|
+
"medium",
|
|
1196
|
+
"high",
|
|
1197
|
+
"xhigh",
|
|
1198
|
+
"max"
|
|
1199
|
+
];
|
|
1191
1200
|
var PROVIDER_REASONING_EFFORT_VALUES = {
|
|
1192
1201
|
openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
1202
|
+
openrouter: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
1193
1203
|
deepseek: ["low", "high", "max"],
|
|
1194
1204
|
// nolo (Ollama Cloud) 支持 DeepSeek/Kimi/GLM 等 thinking 模型,
|
|
1195
1205
|
// reasoning_effort 通过 OpenAI 兼容端点透传到 Ollama Cloud。
|
|
@@ -1310,7 +1320,12 @@ var oauthModel = ({ name, displayName, contextWindow, thinkingMode, maxOutputTok
|
|
|
1310
1320
|
price: { input: 0, output: 0 }
|
|
1311
1321
|
});
|
|
1312
1322
|
var anthropicOAuthModels = [
|
|
1313
|
-
// 5 代(1M + Adaptive thinking always-on;官方 max output 128k)
|
|
1323
|
+
// 5 代与 5.5 代(1M + Adaptive thinking always-on;官方 max output 128k)
|
|
1324
|
+
oauthModel({ name: "claude-opus-5-5", displayName: "Claude Opus 5.5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1325
|
+
// Claude Sonnet 5.5(2026-09-28 发布):官方规格 1M + Adaptive thinking + max output 128k。
|
|
1326
|
+
// 注意该模型对非默认 temperature/top_p/top_k 直接 400——nolo 的 anthropicAdapter
|
|
1327
|
+
// 不传采样参数,不受影响。
|
|
1328
|
+
oauthModel({ name: "claude-sonnet-5-5", displayName: "Claude Sonnet 5.5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1314
1329
|
oauthModel({ name: "claude-fable-5", displayName: "Claude Fable 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1315
1330
|
oauthModel({ name: "claude-opus-5", displayName: "Claude Opus 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1316
1331
|
oauthModel({ name: "claude-sonnet-5", displayName: "Claude Sonnet 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
@@ -1325,6 +1340,11 @@ var anthropicOAuthModels = [
|
|
|
1325
1340
|
// haiku-4-5(官方明确 context=200k + Extended thinking)
|
|
1326
1341
|
oauthModel({ name: "claude-haiku-4-5-20251001", displayName: "Claude Haiku 4.5", contextWindow: 2e5, thinkingMode: "extended" })
|
|
1327
1342
|
];
|
|
1343
|
+
function anthropicOAuthModelMaxOutputTokens(model) {
|
|
1344
|
+
if (!model) return void 0;
|
|
1345
|
+
const found = anthropicOAuthModels.find((m) => m.name === model);
|
|
1346
|
+
return typeof found?.maxOutputTokens === "number" ? found.maxOutputTokens : void 0;
|
|
1347
|
+
}
|
|
1328
1348
|
var OAUTH_MODEL_THINKING_MODE = new Map(
|
|
1329
1349
|
anthropicOAuthModels.map((m) => [m.name, m.thinkingMode])
|
|
1330
1350
|
);
|
|
@@ -1758,6 +1778,259 @@ var fireworksModels = [
|
|
|
1758
1778
|
}
|
|
1759
1779
|
];
|
|
1760
1780
|
|
|
1781
|
+
// packages/ai/agent/openrouterModelCapability.ts
|
|
1782
|
+
var VALID_EFFORTS_SET = new Set(REASONING_EFFORT_OPTIONS);
|
|
1783
|
+
function extractOpenRouterReasoningCapability(rawModel) {
|
|
1784
|
+
if (!rawModel) {
|
|
1785
|
+
return {
|
|
1786
|
+
found: false,
|
|
1787
|
+
supportsReasoning: false,
|
|
1788
|
+
supportedEfforts: []
|
|
1789
|
+
};
|
|
1790
|
+
}
|
|
1791
|
+
const supportedParams = rawModel.supported_parameters ?? [];
|
|
1792
|
+
const reasoning = rawModel.reasoning;
|
|
1793
|
+
const hasReasoningSupport = Boolean(reasoning) || supportedParams.includes("reasoning") || supportedParams.includes("reasoning_effort") || supportedParams.includes("include_reasoning");
|
|
1794
|
+
if (!hasReasoningSupport) {
|
|
1795
|
+
return {
|
|
1796
|
+
found: true,
|
|
1797
|
+
supportsReasoning: false,
|
|
1798
|
+
supportedEfforts: []
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
const rawEfforts = reasoning?.supported_efforts ?? [];
|
|
1802
|
+
const supportedEfforts = rawEfforts.filter(
|
|
1803
|
+
(e) => VALID_EFFORTS_SET.has(e)
|
|
1804
|
+
);
|
|
1805
|
+
let defaultEffort;
|
|
1806
|
+
if (reasoning?.default_effort && VALID_EFFORTS_SET.has(reasoning.default_effort) && supportedEfforts.includes(reasoning.default_effort)) {
|
|
1807
|
+
defaultEffort = reasoning.default_effort;
|
|
1808
|
+
} else if (supportedEfforts.length > 0) {
|
|
1809
|
+
defaultEffort = supportedEfforts.includes("medium") ? "medium" : supportedEfforts[0];
|
|
1810
|
+
}
|
|
1811
|
+
return {
|
|
1812
|
+
found: true,
|
|
1813
|
+
supportsReasoning: true,
|
|
1814
|
+
mandatory: reasoning?.mandatory,
|
|
1815
|
+
supportedEfforts,
|
|
1816
|
+
defaultEffort
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1819
|
+
var cachedModels = null;
|
|
1820
|
+
var CACHE_TTL_MS = 10 * 60 * 1e3;
|
|
1821
|
+
function getCachedOpenRouterModelReasoning(modelId) {
|
|
1822
|
+
const trimmed = modelId.trim().toLowerCase();
|
|
1823
|
+
if (!trimmed) return null;
|
|
1824
|
+
if (!cachedModels || Date.now() - cachedModels.timestamp >= CACHE_TTL_MS) {
|
|
1825
|
+
return null;
|
|
1826
|
+
}
|
|
1827
|
+
const rawModel = cachedModels.data.get(trimmed);
|
|
1828
|
+
if (!rawModel) return null;
|
|
1829
|
+
return extractOpenRouterReasoningCapability(rawModel);
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
// packages/ai/agent/modelReasoningCapability.ts
|
|
1833
|
+
var GATEWAY_PROVIDERS = /* @__PURE__ */ new Set(["openrouter", "nolo"]);
|
|
1834
|
+
var THINKING_MECHANISM_PROVIDERS = /* @__PURE__ */ new Set(["anthropic", "google"]);
|
|
1835
|
+
var MODEL_REASONING_OVERRIDES = [
|
|
1836
|
+
// ---- OpenAI ----
|
|
1837
|
+
{
|
|
1838
|
+
providers: ["openai"],
|
|
1839
|
+
prefix: "gpt-5",
|
|
1840
|
+
includes: "-pro",
|
|
1841
|
+
efforts: ["high"],
|
|
1842
|
+
note: "gpt-5-pro \u7CFB\u5217\u53EA\u66B4\u9732 high \u6863\uFF08OpenAI \u6587\u6863\uFF1Apro \u53D8\u4F53\u4E0D\u53EF\u8C03\u4F4E\uFF09"
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
providers: ["openai"],
|
|
1846
|
+
prefix: "o1-preview",
|
|
1847
|
+
supportsReasoning: false,
|
|
1848
|
+
note: "o1-preview \u4E0D\u63A5\u53D7 reasoning_effort \u53C2\u6570"
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
providers: ["openai"],
|
|
1852
|
+
prefix: "o1-mini",
|
|
1853
|
+
supportsReasoning: false,
|
|
1854
|
+
note: "o1-mini \u4E0D\u63A5\u53D7 reasoning_effort \u53C2\u6570"
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
providers: ["openai"],
|
|
1858
|
+
prefix: "o1",
|
|
1859
|
+
efforts: ["low", "medium", "high"],
|
|
1860
|
+
note: "o1 \u652F\u6301 low/medium/high\uFF0C\u65E0 none/minimal/xhigh/max"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
providers: ["openai"],
|
|
1864
|
+
prefix: "o3",
|
|
1865
|
+
efforts: ["low", "medium", "high"],
|
|
1866
|
+
note: "o3 / o3-mini \u652F\u6301 low/medium/high"
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
providers: ["openai"],
|
|
1870
|
+
prefix: "o4-mini",
|
|
1871
|
+
efforts: ["low", "medium", "high"],
|
|
1872
|
+
note: "o4-mini \u652F\u6301 low/medium/high"
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
providers: ["openai"],
|
|
1876
|
+
prefix: "gpt-4o",
|
|
1877
|
+
supportsReasoning: false,
|
|
1878
|
+
note: "gpt-4o \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
providers: ["openai"],
|
|
1882
|
+
prefix: "gpt-4.1",
|
|
1883
|
+
supportsReasoning: false,
|
|
1884
|
+
note: "gpt-4.1 \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
providers: ["openai"],
|
|
1888
|
+
prefix: "chatgpt-4o",
|
|
1889
|
+
supportsReasoning: false,
|
|
1890
|
+
note: "chatgpt-4o \u975E\u63A8\u7406\u6A21\u578B"
|
|
1891
|
+
},
|
|
1892
|
+
// ---- xAI / Grok ----
|
|
1893
|
+
{
|
|
1894
|
+
providers: ["xai", "grok"],
|
|
1895
|
+
prefix: "grok-3-mini",
|
|
1896
|
+
efforts: ["low", "high"],
|
|
1897
|
+
note: "grok-3-mini \u4EC5 low/high\uFF0C\u65E0 medium\uFF08xAI \u6587\u6863\uFF09"
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
providers: ["xai", "grok"],
|
|
1901
|
+
prefix: "grok-3",
|
|
1902
|
+
exact: true,
|
|
1903
|
+
// 只匹配 grok-3 本体;grok-3-fast 等变体不被误伤
|
|
1904
|
+
supportsReasoning: false,
|
|
1905
|
+
note: "grok-3\uFF08\u975E mini\uFF09\u4E0D\u652F\u6301 reasoning_effort"
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
providers: ["xai", "grok"],
|
|
1909
|
+
prefix: "grok-2",
|
|
1910
|
+
supportsReasoning: false,
|
|
1911
|
+
note: "grok-2 \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1912
|
+
},
|
|
1913
|
+
// ---- DeepSeek ----
|
|
1914
|
+
{
|
|
1915
|
+
providers: ["deepseek"],
|
|
1916
|
+
prefix: "deepseek-chat",
|
|
1917
|
+
exact: true,
|
|
1918
|
+
// 只匹配 deepseek-chat 本体;deepseek-chat-v3.1 是混合推理模型
|
|
1919
|
+
supportsReasoning: false,
|
|
1920
|
+
note: "deepseek-chat\uFF08V3 \u975E\u63A8\u7406\u7EBF\uFF09\u65E0\u63A8\u7406\u5F3A\u5EA6"
|
|
1921
|
+
},
|
|
1922
|
+
// ---- Kimi / Moonshot ----
|
|
1923
|
+
{
|
|
1924
|
+
providers: ["kimi", "moonshot"],
|
|
1925
|
+
prefix: "moonshot-v1",
|
|
1926
|
+
supportsReasoning: false,
|
|
1927
|
+
note: "moonshot-v1 \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
providers: ["kimi", "moonshot"],
|
|
1931
|
+
prefix: "kimi-k2-instruct",
|
|
1932
|
+
supportsReasoning: false,
|
|
1933
|
+
note: "kimi-k2-instruct \u975E thinking \u53D8\u4F53"
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
providers: ["kimi", "moonshot"],
|
|
1937
|
+
prefix: "kimi-latest",
|
|
1938
|
+
supportsReasoning: false,
|
|
1939
|
+
note: "kimi-latest \u6307\u5411\u975E\u63A8\u7406\u5FEB\u7167"
|
|
1940
|
+
}
|
|
1941
|
+
];
|
|
1942
|
+
function modelBasename(model) {
|
|
1943
|
+
const idx = model.lastIndexOf("/");
|
|
1944
|
+
return idx === -1 ? model : model.slice(idx + 1);
|
|
1945
|
+
}
|
|
1946
|
+
function matchOverride(provider, model) {
|
|
1947
|
+
const m = model.toLowerCase();
|
|
1948
|
+
const base = modelBasename(m);
|
|
1949
|
+
const isGateway = GATEWAY_PROVIDERS.has(provider);
|
|
1950
|
+
let best = null;
|
|
1951
|
+
let bestPrefixLen = -1;
|
|
1952
|
+
for (const o of MODEL_REASONING_OVERRIDES) {
|
|
1953
|
+
if (!isGateway && !o.providers.includes(provider)) continue;
|
|
1954
|
+
const hit = o.exact ? m === o.prefix || base === o.prefix : m.startsWith(o.prefix) || base.startsWith(o.prefix);
|
|
1955
|
+
if (!hit) continue;
|
|
1956
|
+
if (o.includes && !m.includes(o.includes) && !base.includes(o.includes)) {
|
|
1957
|
+
continue;
|
|
1958
|
+
}
|
|
1959
|
+
if (o.prefix.length > bestPrefixLen) {
|
|
1960
|
+
best = o;
|
|
1961
|
+
bestPrefixLen = o.prefix.length;
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
return best;
|
|
1965
|
+
}
|
|
1966
|
+
function capabilityFromOpenRouterLive(live) {
|
|
1967
|
+
return {
|
|
1968
|
+
found: true,
|
|
1969
|
+
supportsReasoning: live.supportsReasoning,
|
|
1970
|
+
efforts: live.supportedEfforts,
|
|
1971
|
+
defaultEffort: live.defaultEffort,
|
|
1972
|
+
mandatory: live.mandatory,
|
|
1973
|
+
source: "openrouter-live"
|
|
1974
|
+
};
|
|
1975
|
+
}
|
|
1976
|
+
function resolveModelReasoningCapability(provider, model) {
|
|
1977
|
+
const p = (provider ?? "").toLowerCase();
|
|
1978
|
+
const m = (model ?? "").trim();
|
|
1979
|
+
if (THINKING_MECHANISM_PROVIDERS.has(p)) {
|
|
1980
|
+
return {
|
|
1981
|
+
found: false,
|
|
1982
|
+
supportsReasoning: true,
|
|
1983
|
+
// 有推理能力,只是走 Thinking 机制而非 effort
|
|
1984
|
+
efforts: [],
|
|
1985
|
+
source: "provider-map"
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
if (m) {
|
|
1989
|
+
const override = matchOverride(p, m);
|
|
1990
|
+
if (override) {
|
|
1991
|
+
const supportsReasoning = override.supportsReasoning ?? true;
|
|
1992
|
+
const efforts = supportsReasoning === false ? [] : override.efforts ?? PROVIDER_REASONING_EFFORT_VALUES[p] ?? [
|
|
1993
|
+
"low",
|
|
1994
|
+
"medium",
|
|
1995
|
+
"high"
|
|
1996
|
+
];
|
|
1997
|
+
return {
|
|
1998
|
+
found: true,
|
|
1999
|
+
supportsReasoning,
|
|
2000
|
+
efforts,
|
|
2001
|
+
defaultEffort: efforts.includes("medium") ? "medium" : efforts[0],
|
|
2002
|
+
source: "model-override"
|
|
2003
|
+
};
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
const providerEfforts = PROVIDER_REASONING_EFFORT_VALUES[p];
|
|
2007
|
+
if (providerEfforts) {
|
|
2008
|
+
return {
|
|
2009
|
+
found: false,
|
|
2010
|
+
supportsReasoning: providerEfforts.length > 0,
|
|
2011
|
+
efforts: providerEfforts,
|
|
2012
|
+
source: "provider-map"
|
|
2013
|
+
};
|
|
2014
|
+
}
|
|
2015
|
+
return {
|
|
2016
|
+
found: false,
|
|
2017
|
+
supportsReasoning: true,
|
|
2018
|
+
efforts: ["low", "medium", "high"],
|
|
2019
|
+
source: "provider-fallback"
|
|
2020
|
+
};
|
|
2021
|
+
}
|
|
2022
|
+
function resolveModelReasoningCapabilityWithCache(provider, model) {
|
|
2023
|
+
const p = (provider ?? "").toLowerCase();
|
|
2024
|
+
const m = (model ?? "").trim();
|
|
2025
|
+
if (p === "openrouter" && m) {
|
|
2026
|
+
const live = getCachedOpenRouterModelReasoning(m);
|
|
2027
|
+
if (live?.found) {
|
|
2028
|
+
return capabilityFromOpenRouterLive(live);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
return resolveModelReasoningCapability(provider, model);
|
|
2032
|
+
}
|
|
2033
|
+
|
|
1761
2034
|
// packages/ai/llm/reasoningModels.ts
|
|
1762
2035
|
var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
|
|
1763
2036
|
"deepseek-flash",
|
|
@@ -1772,6 +2045,8 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1772
2045
|
"gemini-3.1-pro-preview",
|
|
1773
2046
|
"gpt-5.5-pro",
|
|
1774
2047
|
"gpt-6-astra",
|
|
2048
|
+
"gpt-6.1-sol",
|
|
2049
|
+
"gpt-6-sol",
|
|
1775
2050
|
"gpt-6-luna",
|
|
1776
2051
|
"gpt-5.6-sol",
|
|
1777
2052
|
"gpt-5.6-terra",
|
|
@@ -1792,7 +2067,12 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1792
2067
|
"accounts/fireworks/models/glm-5p2",
|
|
1793
2068
|
"zai-org/GLM-5.2-FP8"
|
|
1794
2069
|
]);
|
|
1795
|
-
var isModelSupportReasoningEffort = (model) =>
|
|
2070
|
+
var isModelSupportReasoningEffort = (model, provider) => {
|
|
2071
|
+
if (provider && provider.toLowerCase() === "openrouter") {
|
|
2072
|
+
return true;
|
|
2073
|
+
}
|
|
2074
|
+
return REASONING_MODEL_NAMES.has(model);
|
|
2075
|
+
};
|
|
1796
2076
|
var supportedReasoningModels = Array.from(REASONING_MODEL_NAMES);
|
|
1797
2077
|
var EFFORT_ORDER = [
|
|
1798
2078
|
"none",
|
|
@@ -1819,13 +2099,23 @@ function nearestSupportedEffort(effort, supported) {
|
|
|
1819
2099
|
}
|
|
1820
2100
|
return EFFORT_ORDER[best];
|
|
1821
2101
|
}
|
|
1822
|
-
function clampReasoningEffort(effort, provider) {
|
|
2102
|
+
function clampReasoningEffort(effort, provider, model) {
|
|
1823
2103
|
if (!effort) return void 0;
|
|
1824
2104
|
const normalized = effort === "off" ? "none" : effort;
|
|
1825
2105
|
const providerLower = (provider ?? "").toLowerCase();
|
|
1826
|
-
if (providerLower
|
|
2106
|
+
if (THINKING_MECHANISM_PROVIDERS.has(providerLower)) {
|
|
1827
2107
|
return void 0;
|
|
1828
2108
|
}
|
|
2109
|
+
if (model) {
|
|
2110
|
+
const cap = resolveModelReasoningCapabilityWithCache(provider, model);
|
|
2111
|
+
if (cap.found) {
|
|
2112
|
+
if (!cap.supportsReasoning || cap.efforts.length === 0) {
|
|
2113
|
+
return void 0;
|
|
2114
|
+
}
|
|
2115
|
+
if (cap.efforts.includes(normalized)) return normalized;
|
|
2116
|
+
return nearestSupportedEffort(normalized, cap.efforts);
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
1829
2119
|
const supported = PROVIDER_REASONING_EFFORT_VALUES[providerLower];
|
|
1830
2120
|
if (!supported || supported.length === 0) {
|
|
1831
2121
|
if (normalized === "low" || normalized === "medium" || normalized === "high") {
|
|
@@ -1883,6 +2173,8 @@ var MODEL_LOOKUP_MAP = {
|
|
|
1883
2173
|
...MODEL_MAP
|
|
1884
2174
|
};
|
|
1885
2175
|
var ANTHROPIC_MODEL_ALIASES = {
|
|
2176
|
+
"claude-opus-5.5": "claude-opus-5-5",
|
|
2177
|
+
"claude-sonnet-5.5": "claude-sonnet-5-5",
|
|
1886
2178
|
"claude-sonnet-4.6": "claude-3-7-sonnet-latest",
|
|
1887
2179
|
"claude-sonnet-4.5": "claude-3-5-sonnet-latest"
|
|
1888
2180
|
};
|
|
@@ -2097,6 +2389,7 @@ function getApiEndpoint(agent) {
|
|
|
2097
2389
|
}
|
|
2098
2390
|
|
|
2099
2391
|
export {
|
|
2392
|
+
anthropicOAuthModelMaxOutputTokens,
|
|
2100
2393
|
isAdaptiveThinkingModelId,
|
|
2101
2394
|
qwenModels,
|
|
2102
2395
|
qwenTokenPlanModels,
|
|
@@ -2106,6 +2399,7 @@ export {
|
|
|
2106
2399
|
stepfunStepPlanModels,
|
|
2107
2400
|
opencodeGoModels,
|
|
2108
2401
|
DEFAULT_REASONING_EFFORT,
|
|
2402
|
+
resolveModelReasoningCapabilityWithCache,
|
|
2109
2403
|
isModelSupportReasoningEffort,
|
|
2110
2404
|
clampReasoningEffort,
|
|
2111
2405
|
MODEL_LOOKUP_MAP,
|