nolo-cli 0.90.0-alpha.1 → 0.91.1
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-W26HVI75.js → _executeModel-H35GQ2XO.js} +61 -60
- package/{action-6DXQGJMX.js → action-3ZOODRBC.js} +11 -11
- package/{addContentAction-I7VX5SAC.js → addContentAction-IJHG2ZV7.js} +9 -9
- package/{addDialogAgentAction-OJSFV7DZ.js → addDialogAgentAction-IGFS2UBX.js} +11 -11
- package/{agentDeleteCommand-XNFWCKBH.js → agentDeleteCommand-XOFMXMHW.js} +43 -42
- package/{agentEmailCommands-W3X3EJ3V.js → agentEmailCommands-H2SEP6ZQ.js} +82 -78
- package/{agentGrantCommands-YW6PQAQ2.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-DFWFU6XO.js → agentListCommands-RYGH6NUL.js} +72 -80
- package/{agentMachineCommands-LMFOAEL4.js → agentMachineCommands-XELOBZIP.js} +37 -36
- package/{agentProviderCommands-ZBYHGTGY.js → agentProviderCommands-JCRK6ST2.js} +1 -1
- package/{agentPullCommand-GLOOXJ2E.js → agentPullCommand-HF4A42D4.js} +3 -3
- package/agentRecordCommands-43HAXAZO.js +130 -0
- package/{agentRunCommand-HTBVIBGV.js → agentRunCommand-GIPN6DBO.js} +80 -75
- package/{agentRunControl-XLGD3UZ5.js → agentRunControl-AVJR4JW4.js} +2 -2
- package/{agentRuntimeLocal-2JFG4HDU.js → agentRuntimeLocal-SDOSSCLU.js} +38 -33
- package/{agentSlice-ZNLGFUB5.js → agentSlice-B2DLZMAC.js} +11 -11
- package/{appDeleteCommands-2UN4N2NR.js → appDeleteCommands-7OR5MAOR.js} +37 -36
- package/{appDeployCommands-37D74KRR.js → appDeployCommands-5GNI723H.js} +37 -36
- package/{appDeployStatusCommands-QBLWL2IA.js → appDeployStatusCommands-WL2NG3SG.js} +37 -36
- package/{appGetCommands-6KXIDF2T.js → appGetCommands-7BVKQS44.js} +37 -36
- package/{appListCommands-G2WFGEWQ.js → appListCommands-5VXFJOBU.js} +37 -36
- package/{authCommand-V2DJ7DB7.js → authCommand-N4Q6463J.js} +115 -23
- package/{authCommands-RGOGCPP6.js → authCommands-GBIFZWD3.js} +5 -5
- package/{builtinSkillRegistry-WBGYKIAZ.js → builtinSkillRegistry-JPY2DKRF.js} +7 -7
- package/{chatQueueReduxAdapter-XCJHIY3R.js → chatQueueReduxAdapter-3KDRKXTT.js} +29 -29
- package/{chromeCommands-VOIRNJBL.js → chromeCommands-NKU3OWKH.js} +36 -11
- package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-OQDJGD4Y.js} +31 -1
- package/{chunk-4BYPU626.js → chunk-232453C2.js} +994 -1036
- package/{chunk-SMZSWB44.js → chunk-25GAGMRK.js} +6 -83
- package/{chunk-PH5J5VUY.js → chunk-3IYMTWYZ.js} +22 -22
- package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
- package/{chunk-TVNI5FLG.js → chunk-46CRK7XP.js} +7 -7
- package/{chunk-2ADBVBEM.js → chunk-55VQ4OPL.js} +4 -4
- package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
- package/{chunk-DWUCB2A3.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-3R5PH4IP.js → chunk-64TIEZHF.js} +1 -1
- package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
- package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
- package/{chunk-WXPVOQD7.js → chunk-6PELJ3DS.js} +533 -236
- package/{chunk-NFMHIUY3.js → chunk-7EMJBGCA.js} +966 -218
- package/{chunk-HYZHJ5GW.js → chunk-7YMUSSHQ.js} +93 -93
- package/chunk-ACTMNVHM.js +93 -0
- package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
- package/{chunk-UKWGR5SS.js → chunk-AUXHZ2M5.js} +186 -397
- package/{chunk-7MYYE7WX.js → chunk-B4PW6UAI.js} +61 -34
- package/{chunk-4DRWWIOL.js → chunk-B7ANJQWZ.js} +2 -2
- package/{chunk-XKQJJK4F.js → chunk-BAAKVSMZ.js} +4 -4
- package/{chunk-FQYMLZ6C.js → chunk-BFCXG6AJ.js} +16 -16
- package/{chunk-ZBT3WNBK.js → chunk-BJUDYFV5.js} +10 -2
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-TL6L5XUT.js → chunk-BNGW5ASC.js} +94 -16
- package/{chunk-JTK3TJYV.js → chunk-BTSYHR7J.js} +4 -4
- package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
- package/{chunk-JEDZAO7L.js → chunk-D2W6WRHT.js} +13 -8
- package/{chunk-6BEA566T.js → chunk-D76D3RTR.js} +2 -2
- package/{chunk-HQCSU3DI.js → chunk-DCLMZ5TX.js} +4 -4
- package/{chunk-L2ICPOAL.js → chunk-EFZKILX6.js} +4 -4
- package/{chunk-JBBZ5KUM.js → chunk-EHO5EGU4.js} +23 -76
- package/{chunk-HVURBGF3.js → chunk-ESRMFY7G.js} +2 -2
- package/{chunk-ABQYVJBJ.js → chunk-ETZWFV6M.js} +1 -1
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-VHJLQHPQ.js → chunk-F64B2W3R.js} +110 -34
- package/{chunk-AQZRTHDZ.js → chunk-G4EMOUX3.js} +886 -154
- package/{chunk-XTUY5EL4.js → chunk-GJUKGFHG.js} +74 -16
- package/{chunk-XMGHGEN6.js → chunk-GMVELWJG.js} +3 -3
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-CJCJF5XB.js → chunk-H6A6X4EK.js} +36 -3
- package/{chunk-N3OAPEZE.js → chunk-HBTA2SGQ.js} +97 -21
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-3CR2LC6X.js → chunk-HNRASX3X.js} +8 -8
- package/{chunk-CPH3W5A7.js → chunk-I3TQJXQ7.js} +94 -3
- package/{chunk-GRYGRGPS.js → chunk-IS5VEM2G.js} +140 -15
- package/{chunk-MJHQ3NRV.js → chunk-ISHYYQJC.js} +5 -3
- package/{chunk-ZAB3A45K.js → chunk-K7M4I3PF.js} +30 -7
- package/{chunk-2AYMFHUG.js → chunk-KQOD3G2X.js} +165 -15
- package/{chunk-YOXYA2GU.js → chunk-LNPYTNMG.js} +10 -5
- package/{chunk-F2CGG72C.js → chunk-LS2MI3B4.js} +45 -45
- package/{chunk-GII32WZW.js → chunk-M2EJHDJP.js} +3 -0
- package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
- package/{chunk-DNQPPRHY.js → chunk-N3XA2O6O.js} +1 -1
- package/{chunk-5DFFKASO.js → chunk-NILSKYOE.js} +3 -3
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-K7M3MWCE.js → chunk-OOSVFT6S.js} +2 -2
- package/{chunk-QCZX4FTW.js → chunk-OY5IJI2N.js} +194 -21
- package/{chunk-HMEMJ7GH.js → chunk-PAYUVQ6P.js} +7749 -1320
- package/{chunk-ASGDO77C.js → chunk-Q67DOFOO.js} +92 -4
- package/{chunk-UA5S3LQQ.js → chunk-QALRKMHF.js} +11 -10
- package/{chunk-RZANZZL2.js → chunk-QDSINZM3.js} +1 -1
- package/{chunk-DPQ2WVBY.js → chunk-QJLEMM2V.js} +1 -1
- package/{chunk-IIKPWSPX.js → chunk-R4SQ3LGW.js} +1 -1
- package/{chunk-UTCCPWB2.js → chunk-RZ6CQZB2.js} +34 -20
- package/{chunk-SAFZABH7.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-576IMUGH.js → chunk-T5V7HA3K.js} +1 -1
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/chunk-UNYJU5L6.js +780 -0
- package/{chunk-QFMFJZLO.js → chunk-V7E4PXQD.js} +1 -1
- package/{chunk-QHETQ3KI.js → chunk-VBSVA6CB.js} +2 -2
- package/{chunk-A2C4AKKM.js → chunk-VETFWL5K.js} +1 -1
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-6D6VBVEW.js → chunk-VPFEPRME.js} +9 -9
- package/{chunk-3CMTBX3X.js → chunk-W2P25VGS.js} +25 -6
- package/{chunk-CLI4LFSM.js → chunk-WC6A2Q7S.js} +5 -3
- package/{chunk-Z33ARZCP.js → chunk-WT2IAJAJ.js} +4 -4
- package/chunk-X6YIXGPT.js +870 -0
- package/{chunk-5V4NJHRM.js → chunk-YMPTI7RZ.js} +9 -9
- package/{chunk-5NMZNPTN.js → chunk-YRIFJ6XQ.js} +13 -13
- package/{chunk-FZGV4FGK.js → chunk-YRRASA5Q.js} +268 -143
- package/{chunk-2F4VYGFW.js → chunk-Z5W7UMQV.js} +4 -3
- package/{chunk-ND2J3NRB.js → chunk-ZGJLSHER.js} +2 -2
- package/{chunk-VRLI2WNW.js → chunk-ZI2MEZMT.js} +314 -142
- package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
- package/commandRegistry-BP5JLW24.js +822 -0
- package/{contentThunks-VURN3DFW.js → contentThunks-2HYFUXUM.js} +29 -29
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-QZAAY77R.js → createAgentAutomationAction-DCKUSJH7.js} +29 -29
- package/{createDialogAction-CHGXVTAC.js → createDialogAction-NRIAEH2A.js} +32 -32
- package/{createPageAction-IOGAFIN7.js → createPageAction-AUJHHXGG.js} +35 -35
- package/{dbSlice-YXQ6RYIH.js → dbSlice-HFPIJT5P.js} +8 -8
- package/{deleteFile-YG6QMJLU.js → deleteFile-UEAD5A5Z.js} +3 -3
- package/{dialogCommands-XREAP6WQ.js → dialogCommands-UJRGCRN6.js} +42 -39
- package/{dialogSlice-DOPGWGS4.js → dialogSlice-AHU4XXIW.js} +35 -29
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-3PYZGSCL.js → docCreateCommands-ZOV3ZBLW.js} +39 -38
- package/{docDeleteCommands-3Y6MU44Q.js → docDeleteCommands-G4KAXJYQ.js} +39 -38
- package/{docReadCommands-UBANMAFR.js → docReadCommands-B2MM3JIT.js} +38 -37
- package/{docStore-SYYFBENY.js → docStore-SITH63V3.js} +9 -9
- package/{docUpdateCommands-4GK2X6BN.js → docUpdateCommands-2QNF5CYN.js} +39 -38
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
- package/{getPricing-F2C65RIX.js → getPricing-OX7B4R6B.js} +3 -3
- package/{handleSendMessageAction-NPVTY2GE.js → handleSendMessageAction-7ZMJMWLC.js} +72 -80
- package/index.js +74 -877
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-EBRS242U.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-5W6IJRAD.js} +6 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-3LRMNLCM.js} +1 -1
- package/{machineCommands-I66X2XB7.js → machineCommands-YCTD5KOL.js} +75 -71
- package/{machineWsRunDispatch-W4FVBOUM.js → machineWsRunDispatch-JFMD4ZAW.js} +73 -69
- package/{memberThunks-5T4J6KXQ.js → memberThunks-SKFZ37VS.js} +9 -9
- package/{models-WW7VFNXB.js → models-T3SG6MJ5.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/{offlineMarxistsAgentCommand-JEWCIAWM.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
- 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-OCWWKBSD.js → providerPresetApply-2QTBYN36.js} +7 -7
- package/{providerRegistry-ZJQU7AJ7.js → providerRegistry-SVXE4G4T.js} +7 -7
- package/{read-M2Q6WEKB.js → read-IEJLLUXY.js} +5 -5
- package/{readDocTool-T37P3YPB.js → readDocTool-4SPYCP2Y.js} +5 -3
- package/{readlineWorkspace-VY5AMOGR.js → readlineWorkspace-M3PLTBLD.js} +2396 -2018
- package/{removeDialogAgentAction-HB3JBVAI.js → removeDialogAgentAction-LILXTOQY.js} +14 -14
- package/{runAgentClientLoop-3NDADLVE.js → runAgentClientLoop-QMCXBOBH.js} +55 -55
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-4XLHRV37.js → setDialogExtraReferencesAction-LVNHLNT5.js} +10 -10
- package/{setPrimaryDialogAgentAction-C3JOFC4W.js → setPrimaryDialogAgentAction-DCKO5NTW.js} +14 -14
- package/{settingSlice-CZRURSTH.js → settingSlice-CNE75ISY.js} +10 -10
- package/{spaceCommands-ENYCUUZH.js → spaceCommands-3U6OHM6O.js} +39 -38
- package/{streamAgentChatTurn-634OFUSR.js → streamAgentChatTurn-JPMJQSEE.js} +144 -84
- package/{switchDialogAgentAction-C6KVUKJP.js → switchDialogAgentAction-JSYUQ5CG.js} +11 -11
- package/{tableCommands-O6NWHFKV.js → tableCommands-G7RV3RU3.js} +4 -4
- package/{toolApiClient-7PSIFQPJ.js → toolApiClient-INIQCPGY.js} +3 -3
- package/{tools-ILBLCF7D.js → tools-XQ5GIH6P.js} +49 -49
- package/{tuiSummaryLlmCaller-LFUBZKXK.js → tuiSummaryLlmCaller-L63PDJUD.js} +16 -15
- package/{updateCommands-2M74UL7P.js → updateCommands-ECWKIWLQ.js} +3 -3
- package/{updateDialogTitleAction-RKFET73N.js → updateDialogTitleAction-EGAZMLUB.js} +32 -32
- package/agentRecordCommands-FVVVCQFM.js +0 -126
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-WS22FPWT.js +0 -79
- package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6PELJ3DS.js";
|
|
4
4
|
import {
|
|
5
5
|
i18n_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PAYUVQ6P.js";
|
|
7
7
|
import {
|
|
8
8
|
canonicalizeToolNames
|
|
9
9
|
} from "./chunk-O6OSWFZQ.js";
|
|
10
10
|
import {
|
|
11
11
|
isNoloHostedProvider
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Q67DOFOO.js";
|
|
13
13
|
import {
|
|
14
14
|
asTrimmedLowercaseString
|
|
15
15
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -17,94 +17,6 @@ import {
|
|
|
17
17
|
isRecord
|
|
18
18
|
} from "./chunk-KUG52IAP.js";
|
|
19
19
|
|
|
20
|
-
// packages/ai/chat/inlineImageUrlsForCustomProvider.ts
|
|
21
|
-
var FILE_CONTENT_PATH = "/api/v1/db/file/content/";
|
|
22
|
-
var shouldInlineImageUrlsForAgent = (agentConfig) => {
|
|
23
|
-
const apiSource = agentConfig?.apiSource?.toLowerCase();
|
|
24
|
-
const provider = agentConfig?.provider?.toLowerCase();
|
|
25
|
-
const model = agentConfig?.model?.toLowerCase();
|
|
26
|
-
if (apiSource === "custom" || provider === "custom") return true;
|
|
27
|
-
if (isNoloHostedProvider(provider)) return true;
|
|
28
|
-
return provider === "openrouter" && model === "minimax/minimax-m3";
|
|
29
|
-
};
|
|
30
|
-
var isInlineCandidate = (url) => /^https?:\/\//i.test(url) && url.includes(FILE_CONTENT_PATH);
|
|
31
|
-
var bytesToBase64 = (bytes) => {
|
|
32
|
-
let binary = "";
|
|
33
|
-
for (const byte of bytes) {
|
|
34
|
-
binary += String.fromCharCode(byte);
|
|
35
|
-
}
|
|
36
|
-
return btoa(binary);
|
|
37
|
-
};
|
|
38
|
-
var defaultFetchImage = async (url) => {
|
|
39
|
-
const response = await fetch(url);
|
|
40
|
-
if (!response.ok) {
|
|
41
|
-
return {
|
|
42
|
-
ok: false,
|
|
43
|
-
error: `HTTP ${response.status}`
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
47
|
-
return {
|
|
48
|
-
ok: true,
|
|
49
|
-
mimeType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
50
|
-
bytes
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
var cloneImagePartWithDataUrl = async (part, fetchImage, isAllowedImageUrl) => {
|
|
54
|
-
const url = part?.image_url?.url;
|
|
55
|
-
if (typeof url !== "string" || !isInlineCandidate(url) || isAllowedImageUrl && !isAllowedImageUrl(url)) {
|
|
56
|
-
return part;
|
|
57
|
-
}
|
|
58
|
-
const result = await fetchImage(url);
|
|
59
|
-
if (!result.ok || !result.bytes) return part;
|
|
60
|
-
const mimeType = result.mimeType || "application/octet-stream";
|
|
61
|
-
return {
|
|
62
|
-
...part,
|
|
63
|
-
image_url: {
|
|
64
|
-
...part.image_url,
|
|
65
|
-
url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}`
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
var inlineImageUrlsForCustomProvider = async (bodyData, options) => {
|
|
70
|
-
if (!options.shouldInline) return bodyData;
|
|
71
|
-
const body = bodyData;
|
|
72
|
-
if (!Array.isArray(body?.messages)) return bodyData;
|
|
73
|
-
const fetchImage = options.fetchImage ?? defaultFetchImage;
|
|
74
|
-
let changed = false;
|
|
75
|
-
const messages = [];
|
|
76
|
-
for (const message of body.messages) {
|
|
77
|
-
if (!Array.isArray(message?.content)) {
|
|
78
|
-
messages.push(message);
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
const content = await Promise.all(
|
|
82
|
-
message.content.map(async (part) => {
|
|
83
|
-
if (part?.type !== "image_url") return part;
|
|
84
|
-
return cloneImagePartWithDataUrl(
|
|
85
|
-
part,
|
|
86
|
-
fetchImage,
|
|
87
|
-
options.isAllowedImageUrl
|
|
88
|
-
);
|
|
89
|
-
})
|
|
90
|
-
);
|
|
91
|
-
let messageChanged = false;
|
|
92
|
-
for (let i = 0; i < content.length; i++) {
|
|
93
|
-
if (content[i] !== message.content[i]) {
|
|
94
|
-
changed = true;
|
|
95
|
-
messageChanged = true;
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
messages.push(messageChanged ? { ...message, content } : message);
|
|
100
|
-
}
|
|
101
|
-
if (!changed) return bodyData;
|
|
102
|
-
return {
|
|
103
|
-
...body,
|
|
104
|
-
messages
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
|
|
108
20
|
// packages/ai/tools/toolSchemaCompatibility.ts
|
|
109
21
|
var COMPOSITION_KEYS = ["anyOf", "oneOf", "allOf"];
|
|
110
22
|
var LIMITED_JSON_SCHEMA_PROVIDERS = /* @__PURE__ */ new Set([
|
|
@@ -268,8 +180,96 @@ var prepareTools = (toolNames, options) => {
|
|
|
268
180
|
return prepared.slice();
|
|
269
181
|
};
|
|
270
182
|
|
|
183
|
+
// packages/ai/chat/inlineImageUrlsForCustomProvider.ts
|
|
184
|
+
var FILE_CONTENT_PATH = "/api/v1/db/file/content/";
|
|
185
|
+
var shouldInlineImageUrlsForAgent = (agentConfig) => {
|
|
186
|
+
const apiSource = agentConfig?.apiSource?.toLowerCase();
|
|
187
|
+
const provider = agentConfig?.provider?.toLowerCase();
|
|
188
|
+
const model = agentConfig?.model?.toLowerCase();
|
|
189
|
+
if (apiSource === "custom" || provider === "custom") return true;
|
|
190
|
+
if (isNoloHostedProvider(provider)) return true;
|
|
191
|
+
return provider === "openrouter" && model === "minimax/minimax-m3";
|
|
192
|
+
};
|
|
193
|
+
var isInlineCandidate = (url) => /^https?:\/\//i.test(url) && url.includes(FILE_CONTENT_PATH);
|
|
194
|
+
var bytesToBase64 = (bytes) => {
|
|
195
|
+
let binary = "";
|
|
196
|
+
for (const byte of bytes) {
|
|
197
|
+
binary += String.fromCharCode(byte);
|
|
198
|
+
}
|
|
199
|
+
return btoa(binary);
|
|
200
|
+
};
|
|
201
|
+
var defaultFetchImage = async (url) => {
|
|
202
|
+
const response = await fetch(url);
|
|
203
|
+
if (!response.ok) {
|
|
204
|
+
return {
|
|
205
|
+
ok: false,
|
|
206
|
+
error: `HTTP ${response.status}`
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
210
|
+
return {
|
|
211
|
+
ok: true,
|
|
212
|
+
mimeType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
213
|
+
bytes
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
var cloneImagePartWithDataUrl = async (part, fetchImage, isAllowedImageUrl) => {
|
|
217
|
+
const url = part?.image_url?.url;
|
|
218
|
+
if (typeof url !== "string" || !isInlineCandidate(url) || isAllowedImageUrl && !isAllowedImageUrl(url)) {
|
|
219
|
+
return part;
|
|
220
|
+
}
|
|
221
|
+
const result = await fetchImage(url);
|
|
222
|
+
if (!result.ok || !result.bytes) return part;
|
|
223
|
+
const mimeType = result.mimeType || "application/octet-stream";
|
|
224
|
+
return {
|
|
225
|
+
...part,
|
|
226
|
+
image_url: {
|
|
227
|
+
...part.image_url,
|
|
228
|
+
url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}`
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
var inlineImageUrlsForCustomProvider = async (bodyData, options) => {
|
|
233
|
+
if (!options.shouldInline) return bodyData;
|
|
234
|
+
const body = bodyData;
|
|
235
|
+
if (!Array.isArray(body?.messages)) return bodyData;
|
|
236
|
+
const fetchImage = options.fetchImage ?? defaultFetchImage;
|
|
237
|
+
let changed = false;
|
|
238
|
+
const messages = [];
|
|
239
|
+
for (const message of body.messages) {
|
|
240
|
+
if (!Array.isArray(message?.content)) {
|
|
241
|
+
messages.push(message);
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
const content = await Promise.all(
|
|
245
|
+
message.content.map(async (part) => {
|
|
246
|
+
if (part?.type !== "image_url") return part;
|
|
247
|
+
return cloneImagePartWithDataUrl(
|
|
248
|
+
part,
|
|
249
|
+
fetchImage,
|
|
250
|
+
options.isAllowedImageUrl
|
|
251
|
+
);
|
|
252
|
+
})
|
|
253
|
+
);
|
|
254
|
+
let messageChanged = false;
|
|
255
|
+
for (let i = 0; i < content.length; i++) {
|
|
256
|
+
if (content[i] !== message.content[i]) {
|
|
257
|
+
changed = true;
|
|
258
|
+
messageChanged = true;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
messages.push(messageChanged ? { ...message, content } : message);
|
|
263
|
+
}
|
|
264
|
+
if (!changed) return bodyData;
|
|
265
|
+
return {
|
|
266
|
+
...body,
|
|
267
|
+
messages
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
|
|
271
271
|
export {
|
|
272
|
+
prepareTools,
|
|
272
273
|
shouldInlineImageUrlsForAgent,
|
|
273
|
-
inlineImageUrlsForCustomProvider
|
|
274
|
-
prepareTools
|
|
274
|
+
inlineImageUrlsForCustomProvider
|
|
275
275
|
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cloudflareModels,
|
|
3
|
+
gmiModels,
|
|
4
|
+
openrouterModels,
|
|
5
|
+
platformHostedModels,
|
|
6
|
+
zaiModels
|
|
7
|
+
} from "./chunk-Q67DOFOO.js";
|
|
8
|
+
|
|
9
|
+
// packages/ai/llm/modelAbility.ts
|
|
10
|
+
var MODEL_ABILITY_TABLE = {
|
|
11
|
+
"claude-opus-5": { passAt1: 74, benchmarkScore: 61, writingScore: 82, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 51, outputSpeedTps: 54, firstAnswerTokenS: 50.63, costPerTaskUsd: 5.86 }, aaEvals: { "aa-analyst-agent": 53.8, "aa-briefcase-v1.1": 1673, "aa-omniscience": 60.9, "automationbench-aa": 56.6, "critpt": 29.1, "enterprise-ops-gym-aa": 47.5, "gdp-pdf": 21.6, "gdpval-aa-v2.1": 1708, "harvey-lab-aa": 93.5, "humanitys-last-exam": 54.9, "mlcr-aa": 59.4, "mmmu-pro": 84.7, "scicode": 56.4, "terminal-bench-4.0": 49 } },
|
|
12
|
+
"claude-opus-5-5": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 58, costPerTaskUsd: 5.98 }, aaEvals: { "aa-briefcase-v1.1": 1822, "aa-lcr-v1.1": 84.7, "aa-omniscience": 66.2, "aa-omniscience-non-hallucination": 58.6, "automationbench-aa": 69.5, "critpt": 31.7, "gdp-pdf": 28.8, "gdpval-aa-v2.1": 1846, "harvey-lab-aa": 91.2, "humanitys-last-exam": 61.4, "mlcr-aa": 66.7, "mmmu-pro": 87.7, "scicode": 66.9, "terminal-bench-4.0": 59.6 } },
|
|
13
|
+
"gpt-6-astra": { passAt1: 85, benchmarkScore: 90, writingScore: 92, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 53, outputSpeedTps: 52, firstAnswerTokenS: 352.15, costPerTaskUsd: 3.26 }, aaEvals: { "aa-analyst-agent": 51.2, "aa-briefcase-v1.1": 1569, "aa-omniscience": 62.6, "aa-omniscience-non-hallucination": 51.3, "automationbench-aa": 68.5, "critpt": 31.7, "gdp-pdf": 32.2, "gdpval-aa-v2.1": 1542, "humanitys-last-exam": 54.7, "mlcr-aa": 35, "mmmu-pro": 86.9, "scicode": 56.5, "terminal-bench-4.0": 59.6 } },
|
|
14
|
+
"claude-opus-4-6": { passAt1: 65, benchmarkScore: 68, writingScore: 78, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 32, outputSpeedTps: 40, firstAnswerTokenS: 21.89 } },
|
|
15
|
+
"gpt-5.6-sol": { passAt1: 73, benchmarkScore: 59, writingScore: 80, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 47, outputSpeedTps: 77, firstAnswerTokenS: 113.21, costPerTaskUsd: 1.99 }, aaEvals: { "aa-analyst-agent": 47.5, "aa-briefcase-v1.1": 1487, "aa-lcr-v1.1": 84, "aa-omniscience": 59.4, "automationbench-aa": 60.1, "critpt": 32.3, "enterprise-ops-gym-aa": 42.9, "gdp-pdf": 27.2, "gdpval-aa-v2.1": 1588, "harvey-lab-aa": 87.2, "humanitys-last-exam": 49.5, "ifbench": 72.7, "itbench-aa": 56.2, "mlcr-aa": 26.1, "mmmu-pro": 83.4, "scicode": 57.1, "terminal-bench-4.0": 39.9 } },
|
|
16
|
+
"claude-fable-5": { passAt1: 70, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 50, outputSpeedTps: 68, firstAnswerTokenS: 110.36, costPerTaskUsd: 8.75 }, aaEvals: { "aa-analyst-agent": 48.8, "aa-omniscience": 65.3, "enterprise-ops-gym-aa": 51.1, "harvey-lab-aa": 93.6, "humanitys-last-exam": 55.5, "mlcr-aa": 64.4, "scicode": 61 } },
|
|
17
|
+
"gpt-5.6-terra": { passAt1: 70, benchmarkScore: 55, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 42, outputSpeedTps: 83, firstAnswerTokenS: 211.09, costPerTaskUsd: 1.4 }, aaEvals: { "apex-agents-aa": 38.9, "itbench-aa": 51 } },
|
|
18
|
+
"kimi-k3": { passAt1: 69, benchmarkScore: 57, writingScore: 81, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/kimi", intelligenceIndex: 44, outputSpeedTps: 37, firstAnswerTokenS: 4.08, costPerTaskUsd: 2 }, aaEvals: { "aa-analyst-agent": 38.8, "aa-briefcase-v1.1": 1504, "aa-lcr-v1.1": 88.7, "aa-omniscience": 47.6, "aa-omniscience-non-hallucination": 53.2, "apex-agents-aa": 41.3, "automationbench-aa": 58.3, "critpt": 23.4, "enterprise-ops-gym-aa": 45.3, "gdp-pdf": 22, "gdpval-aa-v2.1": 1524, "harvey-lab-aa": 94.6, "humanitys-last-exam": 46.9, "itbench-aa": 47.7, "mlcr-aa": 38.3, "mmmu-pro": 80.5, "scicode": 59.5 } },
|
|
19
|
+
"gpt-5.5": { passAt1: 67, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 38, outputSpeedTps: 91, firstAnswerTokenS: 62.45, costPerTaskUsd: 2.63 }, aaEvals: { "aa-analyst-agent": 50, "aa-lcr-v1.1": 84.3, "apex-agents-aa": 37.7, "itbench-aa": 45.8 } },
|
|
20
|
+
"gpt-5.6-luna": { passAt1: 67, benchmarkScore: 51, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 37, outputSpeedTps: 133, firstAnswerTokenS: 114.02, costPerTaskUsd: 0.18 }, aaEvals: { "aa-lcr-v1.1": 83.7, "aa-omniscience": 42.7, "apex-agents-aa": 35.8, "critpt": 20.6, "enterprise-ops-gym-aa": 40.8, "gdp-pdf": 24, "harvey-lab-aa": 87.9, "itbench-aa": 40.3, "mlcr-aa": 19.4, "mmmu-pro": 78.6 } },
|
|
21
|
+
"gpt-6-luna": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 37, outputSpeedTps: 132, firstAnswerTokenS: 104.42, costPerTaskUsd: 0.07 }, aaEvals: { "aa-lcr-v1.1": 83.3, "aa-omniscience": 43.8, "critpt": 19.4, "gdp-pdf": 20.4, "mmmu-pro": 75.5, "scicode": 54.6 } },
|
|
22
|
+
"grok-4.6": { passAt1: 67, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xai", intelligenceIndex: 44, outputSpeedTps: 61, firstAnswerTokenS: 45.3, costPerTaskUsd: 1.86 }, aaEvals: { "aa-analyst-agent": 41.2, "aa-briefcase-v1.1": 1546, "aa-omniscience": 48.2, "aa-omniscience-non-hallucination": 34.3, "automationbench-aa": 67, "enterprise-ops-gym-aa": 48.3, "gdp-pdf": 17, "gdpval-aa-v2.1": 1605, "humanitys-last-exam": 42.9, "scicode": 56.5, "terminal-bench-4.0": 21.2 } },
|
|
23
|
+
"deepseek-v4-pro": { passAt1: 63, writingScore: 79, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/deepseek-v4-pro", intelligenceIndex: 36, outputSpeedTps: 66, firstAnswerTokenS: 1.7, costPerTaskUsd: 0.67 }, aaEvals: { "enterprise-ops-gym-aa": 49.6 } },
|
|
24
|
+
"qwen3.8-max": { passAt1: 57, writingScore: 77, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/qwen3-8-max", intelligenceIndex: 45, outputSpeedTps: 39.3, costPerTaskUsd: 5.41 }, aaEvals: { "aa-briefcase-v1.1": 1640, "aa-omniscience-non-hallucination": 28.8, "gdp-pdf": 22.8, "gdpval-aa-v2.1": 1668, "humanitys-last-exam": 43.1, "mlcr-aa": 20, "mmmu-pro": 82.8, "terminal-bench-4.0": 38.9 } },
|
|
25
|
+
"muse-spark-1.3": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 48, outputSpeedTps: 219, firstAnswerTokenS: 24.12, costPerTaskUsd: 1.6 }, aaEvals: { "aa-briefcase-v1.1": 1597, "aa-lcr-v1.1": 83, "aa-omniscience": 43.6, "aa-omniscience-non-hallucination": 32.9, "automationbench-aa": 57.9, "critpt": 24.9, "gdp-pdf": 26.6, "gdpval-aa-v2.1": 1674, "harvey-lab-aa": 95.5, "humanitys-last-exam": 48.7, "mlcr-aa": 43.3, "scicode": 58.8, "terminal-bench-4.0": 33.3 } },
|
|
26
|
+
"muse-spark-1.2": { passAt1: 55, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 40, outputSpeedTps: 187, firstAnswerTokenS: 16.6, costPerTaskUsd: 0.97 } },
|
|
27
|
+
"grok-4.5": { passAt1: 54, benchmarkScore: 54, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xai", intelligenceIndex: 39, outputSpeedTps: 55, firstAnswerTokenS: 11.28, costPerTaskUsd: 1.04 } },
|
|
28
|
+
"claude-sonnet-5": { passAt1: 54, benchmarkScore: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 38, outputSpeedTps: 79, firstAnswerTokenS: 150.02, costPerTaskUsd: 5.09 }, aaEvals: { "aa-analyst-agent": 46.2, "mlcr-aa": 55 } },
|
|
29
|
+
"deepseek-flash": { passAt1: 53 },
|
|
30
|
+
"deepseek-v4-flash": { passAt1: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/deepseek-v4-flash", intelligenceIndex: 34, outputSpeedTps: 221, firstAnswerTokenS: 1.16, costPerTaskUsd: 0.22 } },
|
|
31
|
+
"gemini-3.7-flash": { passAt1: 58, benchmarkScore: 65, writingScore: 88, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 40, outputSpeedTps: 281, firstAnswerTokenS: 4.9 }, aaEvals: { "aa-analyst-agent": 60, "enterprise-ops-gym-aa": 50.4, "scicode": 59.8 } },
|
|
32
|
+
// TODO(benchmark): gemini-3.8-flash 官方基准快照未出,暂沿用 3.7 分数占位,确认后更新。
|
|
33
|
+
"gemini-3.8-flash": { passAt1: 58, benchmarkScore: 65, writingScore: 88, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 41, outputSpeedTps: 291, firstAnswerTokenS: 15.14, costPerTaskUsd: 1.24 }, aaEvals: { "aa-lcr-v1.1": 81.3, "aa-omniscience": 54.6, "aa-omniscience-non-hallucination": 55.2, "automationbench-aa": 59.9, "critpt": 18.3, "gdp-pdf": 21, "humanitys-last-exam": 47.8, "mlcr-aa": 21.7, "mmmu-pro": 85.6, "scicode": 56.6 } },
|
|
34
|
+
"muse-spark-1.1": { passAt1: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 34, costPerTaskUsd: 1.38 } },
|
|
35
|
+
"gpt-5.4": { passAt1: 52, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 39, outputSpeedTps: 140, firstAnswerTokenS: 141.55 }, aaEvals: { "apex-agents-aa": 33.3 } },
|
|
36
|
+
"gemini-3.6-flash": { passAt1: 49, benchmarkScore: 50, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 34, outputSpeedTps: 178, firstAnswerTokenS: 17.32, costPerTaskUsd: 0.93 } },
|
|
37
|
+
"glm-5.3": { passAt1: 52, benchmarkScore: 60, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/glm-5-3", intelligenceIndex: 45, outputSpeedTps: 57, costPerTaskUsd: 2.01 }, aaEvals: { "aa-briefcase-v1.1": 1516, "aa-omniscience-non-hallucination": 29.6, "automationbench-aa": 62.2, "critpt": 19.1, "enterprise-ops-gym-aa": 36.4, "gdpval-aa-v2.1": 1646, "humanitys-last-exam": 42.3, "mlcr-aa": 51.1, "scicode": 59, "terminal-bench-4.0": 41.9 } },
|
|
38
|
+
"glm-5.2": { passAt1: 44, benchmarkScore: 51, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/glm-5-2", intelligenceIndex: 34, outputSpeedTps: 69.2, costPerTaskUsd: 0.96 }, aaEvals: { "apex-agents-aa": 33.7, "itbench-aa": 42.7 } },
|
|
39
|
+
// ── StepFun(阶跃星辰)─ 仅有 AA 快照,无 pass@1 等旧字段。
|
|
40
|
+
// 来源:https://artificialanalysis.ai/providers/stepfun 对比表。
|
|
41
|
+
// 其中 3.5-flash-2603 已被 AA 标记 deprecated(官方推荐 3.7-flash)。
|
|
42
|
+
"step-5-preview": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 44, outputSpeedTps: 85, firstAnswerTokenS: 3.48, costPerTaskUsd: 0.72 }, aaEvals: { "aa-briefcase-v1.1": 1432, "aa-lcr-v1.1": 88.3, "aa-omniscience-non-hallucination": 43, "critpt": 20.9, "gdpval-aa-v2.1": 1566, "humanitys-last-exam": 46.5, "mmmu-pro": 76.4, "scicode": 58.9, "terminal-bench-4.0": 33.3 } },
|
|
43
|
+
"step-3.7-flash": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 19, outputSpeedTps: 190, firstAnswerTokenS: 2.66 } },
|
|
44
|
+
"step-3.5-flash-2603": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 17, outputSpeedTps: 133, firstAnswerTokenS: 3.33 } },
|
|
45
|
+
"step-3.5-flash": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 17, outputSpeedTps: 137, firstAnswerTokenS: 3.5 } },
|
|
46
|
+
// ── Xiaomi MiMo ── AA 只收录 Pro 档(V2.6-Pro / V2.5-Pro);
|
|
47
|
+
// mimo-v2.6-flash 与 mimo-v2.6-pro-ultraspeed AA 未收录,缺失即缺失。
|
|
48
|
+
"mimo-v2.6-pro": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xiaomi", intelligenceIndex: 46, outputSpeedTps: 49, firstAnswerTokenS: 2.93, costPerTaskUsd: 0.13 }, aaEvals: { "aa-briefcase-v1.1": 1522, "aa-lcr-v1.1": 86.3, "aa-omniscience-non-hallucination": 40.6, "automationbench-aa": 58.6, "critpt": 26.6, "gdp-pdf": 19.2, "gdpval-aa-v2.1": 1673, "humanitys-last-exam": 49.4, "scicode": 60.9, "terminal-bench-4.0": 34.8 } },
|
|
49
|
+
"mimo-v2.5-pro": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xiaomi", intelligenceIndex: 26, outputSpeedTps: 52, firstAnswerTokenS: 7.95, costPerTaskUsd: 0.05 } }
|
|
50
|
+
};
|
|
51
|
+
var EFFORT_SUFFIXES = [
|
|
52
|
+
"-extra-low",
|
|
53
|
+
"-low",
|
|
54
|
+
"-medium",
|
|
55
|
+
"-high",
|
|
56
|
+
"-thinking",
|
|
57
|
+
"-tiered",
|
|
58
|
+
":cloud"
|
|
59
|
+
];
|
|
60
|
+
function normalizeModelName(raw) {
|
|
61
|
+
let name = raw.trim().toLowerCase();
|
|
62
|
+
const slash = name.indexOf("/");
|
|
63
|
+
if (slash !== -1) name = name.slice(slash + 1);
|
|
64
|
+
for (const suffix of EFFORT_SUFFIXES) {
|
|
65
|
+
if (name.endsWith(suffix) && name.length > suffix.length) {
|
|
66
|
+
name = name.slice(0, name.length - suffix.length);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return name;
|
|
71
|
+
}
|
|
72
|
+
function getModelAbility(modelName) {
|
|
73
|
+
const entry = MODEL_ABILITY_TABLE[normalizeModelName(modelName)];
|
|
74
|
+
return entry ? { ...entry } : void 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// packages/ai/llm/models.ts
|
|
78
|
+
var withProvider = (provider) => (models) => models.map((model) => ({ ...model, provider }));
|
|
79
|
+
var ALL_MODELS = [
|
|
80
|
+
...withProvider("nolo")(platformHostedModels),
|
|
81
|
+
...withProvider("openrouter")(openrouterModels),
|
|
82
|
+
...withProvider("cloudflare")(cloudflareModels),
|
|
83
|
+
...withProvider("gmi")(gmiModels),
|
|
84
|
+
...withProvider("zai")(zaiModels)
|
|
85
|
+
].map((model) => {
|
|
86
|
+
const ability = getModelAbility(model.name);
|
|
87
|
+
return ability ? { ...model, ability } : model;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
getModelAbility,
|
|
92
|
+
ALL_MODELS
|
|
93
|
+
};
|