nolo-cli 0.7.0 → 0.8.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/_executeModel-GPU2276G.js +198 -0
  2. package/action-PAXRPJJF.js +27 -0
  3. package/addContentAction-CZVWF3QZ.js +25 -0
  4. package/addDialogAgentAction-CCIDTPHC.js +67 -0
  5. package/agentDeleteCommand-4ZZFM6AT.js +323 -0
  6. package/agentEmailCommands-C4FIVQYV.js +621 -0
  7. package/agentListCommands-VQAKVNEX.js +219 -0
  8. package/agentMachineCommands-ONFDXZUQ.js +421 -0
  9. package/agentPullCommand-O2MTUAFR.js +122 -0
  10. package/agentRecordCommands-QANUGHLK.js +89 -0
  11. package/agentRunCommand-A3OSRB5Q.js +102 -0
  12. package/agentRunControl-K4VKNEHF.js +57 -0
  13. package/agentRuntimeLocal-62ZB2ODP.js +99 -0
  14. package/agentSlice-GCGLVR2N.js +41 -0
  15. package/authCommand-WXMD3IPR.js +574 -0
  16. package/authCommands-X74AFDTC.js +26 -0
  17. package/chunk-2EISRLRC.js +238 -0
  18. package/chunk-2FTTDCD4.js +675 -0
  19. package/chunk-2MALU52L.js +51 -0
  20. package/chunk-2UZXR7WO.js +3631 -0
  21. package/chunk-3ASDTTEI.js +1774 -0
  22. package/chunk-3EUW3WEO.js +8 -0
  23. package/chunk-3LY4F7SV.js +9293 -0
  24. package/chunk-4CQLVGRV.js +50 -0
  25. package/chunk-4IJYA27C.js +342 -0
  26. package/chunk-4SN6J65J.js +38 -0
  27. package/chunk-4VNS5WPM.js +42 -0
  28. package/chunk-53DNV5AT.js +421 -0
  29. package/chunk-572EKYLF.js +792 -0
  30. package/chunk-5MIDPSSK.js +206 -0
  31. package/chunk-5MMAK75Q.js +15 -0
  32. package/chunk-63W5N6P3.js +150 -0
  33. package/chunk-6B7G54GE.js +1078 -0
  34. package/chunk-6HYVJV7B.js +102 -0
  35. package/chunk-6WD3OOJS.js +20 -0
  36. package/chunk-7OC5VCLW.js +929 -0
  37. package/chunk-7YLKNMOM.js +562 -0
  38. package/chunk-ATNTHIZI.js +13 -0
  39. package/chunk-AUGHVUFE.js +69 -0
  40. package/chunk-AVMKZHBC.js +85 -0
  41. package/chunk-AZPCASRE.js +36 -0
  42. package/chunk-BR2WP3DF.js +548 -0
  43. package/chunk-BSTNFPHD.js +231 -0
  44. package/chunk-CF2WZF4N.js +134 -0
  45. package/chunk-CF7PE763.js +10 -0
  46. package/chunk-CJH2VTEU.js +360 -0
  47. package/chunk-CKOJQDKR.js +198 -0
  48. package/chunk-CM54RSSA.js +206 -0
  49. package/chunk-CQAHS7YO.js +4300 -0
  50. package/chunk-CWMSB67P.js +34 -0
  51. package/chunk-DFFIZ25G.js +30 -0
  52. package/chunk-DWLEOOGR.js +8 -0
  53. package/chunk-DZ3XJVET.js +231 -0
  54. package/chunk-EHLHSX7R.js +1433 -0
  55. package/chunk-ELRRLDWI.js +478 -0
  56. package/chunk-EYEEHCU4.js +3066 -0
  57. package/chunk-F6QQI5YI.js +19 -0
  58. package/chunk-G3SUCT4W.js +8 -0
  59. package/chunk-G5H7RNFL.js +807 -0
  60. package/chunk-GAKEBQD6.js +30 -0
  61. package/chunk-GBRG75BQ.js +86 -0
  62. package/chunk-GCMRDRCQ.js +190 -0
  63. package/chunk-GGUO4FKF.js +27158 -0
  64. package/chunk-GGXABIPP.js +628 -0
  65. package/chunk-H2RMRZJE.js +113 -0
  66. package/chunk-H33743XH.js +25 -0
  67. package/chunk-HEIIIZBX.js +104 -0
  68. package/chunk-HNMXYYJR.js +12 -0
  69. package/chunk-I3D64LRJ.js +1447 -0
  70. package/chunk-IAXBCTTE.js +175 -0
  71. package/chunk-IDZTNRP2.js +85 -0
  72. package/chunk-ISNCLGUZ.js +146 -0
  73. package/chunk-IYQV26RA.js +138 -0
  74. package/chunk-J4576WMJ.js +91 -0
  75. package/chunk-J5KV47ZW.js +222 -0
  76. package/chunk-JBTJAPUF.js +35 -0
  77. package/chunk-JZPBVBIY.js +94 -0
  78. package/chunk-KB7YFGL6.js +34 -0
  79. package/chunk-KKY4B2Q2.js +21 -0
  80. package/chunk-KQHGZWSV.js +63 -0
  81. package/chunk-KUG52IAP.js +8 -0
  82. package/chunk-KX6YBIHG.js +8 -0
  83. package/chunk-LAWBMYBC.js +171 -0
  84. package/chunk-LCBAMY2M.js +60 -0
  85. package/chunk-LM25IZBJ.js +902 -0
  86. package/chunk-LM6IYQ3F.js +16 -0
  87. package/chunk-M76ECQRD.js +13658 -0
  88. package/chunk-MRC4Q34M.js +188 -0
  89. package/chunk-NXZGF7F7.js +2878 -0
  90. package/chunk-OF5H3QWS.js +300 -0
  91. package/chunk-OLZBQWZU.js +6 -0
  92. package/chunk-OWOHNGCN.js +50 -0
  93. package/chunk-PN7AFLOK.js +3401 -0
  94. package/chunk-QR5IPGT3.js +24674 -0
  95. package/chunk-QSJ3HFEF.js +8 -0
  96. package/chunk-QYXLLLGL.js +4519 -0
  97. package/chunk-R2HXWML7.js +1949 -0
  98. package/chunk-ROWQEJRP.js +139 -0
  99. package/chunk-S7Z2HMCN.js +25 -0
  100. package/chunk-SYOF5TAS.js +962 -0
  101. package/chunk-TDIQFT2F.js +301 -0
  102. package/chunk-TILFE6LV.js +381 -0
  103. package/chunk-TZNCFAUP.js +2157 -0
  104. package/chunk-U4TRT5V4.js +246 -0
  105. package/chunk-U6VC4MU4.js +8 -0
  106. package/chunk-UAD2WT54.js +64 -0
  107. package/chunk-USZMK5UT.js +105 -0
  108. package/chunk-VEJLAVTC.js +2052 -0
  109. package/chunk-VF4K2QE6.js +21 -0
  110. package/chunk-VHBWHNVT.js +59 -0
  111. package/chunk-VIDPVFP3.js +20 -0
  112. package/chunk-VP4WJWKW.js +8882 -0
  113. package/chunk-VQ2AJRGD.js +148 -0
  114. package/chunk-W4NVOSFF.js +37 -0
  115. package/chunk-WWC7I6TA.js +8 -0
  116. package/chunk-X7W4TNB4.js +1550 -0
  117. package/chunk-XBIUN5CR.js +191 -0
  118. package/chunk-XDVAYP26.js +537 -0
  119. package/chunk-XKIMRZO2.js +221 -0
  120. package/chunk-Y5GCAMGP.js +9 -0
  121. package/chunk-YOUZDXU7.js +9013 -0
  122. package/chunk-Z4NR32XR.js +50 -0
  123. package/chunk-ZNFJWEN4.js +56 -0
  124. package/cliExecutor-DNE7TCC4.js +36 -0
  125. package/clipboardy-BVE3LVEH.js +12001 -0
  126. package/createAgentAutomationAction-537X433B.js +864 -0
  127. package/createDialogAction-YUD4RKBS.js +52 -0
  128. package/createPageAction-KJMFHL4C.js +169 -0
  129. package/db-HCJ5PRB5.js +271 -0
  130. package/dbSlice-C4UJLRZP.js +59 -0
  131. package/deleteFile-4SKGPHOZ.js +41 -0
  132. package/dialogCommands-H74KJKHC.js +59 -0
  133. package/dialogSlice-ETSD4YWS.js +146 -0
  134. package/docCreateCommands-ADUSU34K.js +215 -0
  135. package/docDeleteCommands-ZXV3S5OS.js +176 -0
  136. package/docReadCommands-YYYI6LT7.js +129 -0
  137. package/docStore-ZBF5DDKR.js +96 -0
  138. package/docUpdateCommands-7MGJ3BYA.js +313 -0
  139. package/fetchMessages-JOCYIFKL.js +16 -0
  140. package/getPricing-PWPJ6MNV.js +30 -0
  141. package/handleSendMessageAction-MGKI62Y6.js +183 -0
  142. package/index.js +184 -112288
  143. package/lib-FYYBQIXS.js +19839 -0
  144. package/localDialogRead-D3BELSTF.js +26 -0
  145. package/localFirstLog-DHNOY2NA.js +19 -0
  146. package/localRuntimeAuthority-TEGCOWX4.js +471 -0
  147. package/localRuntimeDb-LGDF6FQP.js +12 -0
  148. package/machineCommands-RMTMN7VQ.js +774 -0
  149. package/machineInfo-M6KB6HZN.js +10 -0
  150. package/machineWsRunDispatch-UIP355FN.js +105 -0
  151. package/memoryCommands-O4MIPIWQ.js +476 -0
  152. package/models-XLEOET3E.js +9 -0
  153. package/offlineMarxistsAgentCommand-BCPJITJL.js +242 -0
  154. package/package.json +3 -25
  155. package/read-RIJCIVKX.js +17 -0
  156. package/readDocTool-GZD2N3LO.js +16 -0
  157. package/readlineWorkspace-CRNQRZ6D.js +5374 -0
  158. package/removeDialogAgentAction-CXLST3N6.js +72 -0
  159. package/runAgentClientLoop-2S334SGA.js +288 -0
  160. package/runtimeDoctorCommands-LRHLPDRC.js +289 -0
  161. package/setDialogExtraReferencesAction-LP6VYGU7.js +59 -0
  162. package/setPrimaryDialogAgentAction-D3GGH23T.js +79 -0
  163. package/settingSlice-J4I3Z5H7.js +198 -0
  164. package/skillSummaryMarker-42HKSXYY.js +9 -0
  165. package/slateToRenderMarkdown-Y5IYN73U.js +7 -0
  166. package/slateUtils-2M7MUTWX.js +19 -0
  167. package/spaceCommands-NDEWMFZJ.js +450 -0
  168. package/spaceSlice-RLB6RTHO.js +145 -0
  169. package/streamAgentChatTurn-Y2TTYPBD.js +4503 -0
  170. package/tableCommands-GOFP7QKA.js +1286 -0
  171. package/toolApiClient-QI3YBNWB.js +26 -0
  172. package/tools-YZYLY2ZQ.js +83 -0
  173. package/understanding-HCSFPE7R.js +318 -0
  174. package/updateCommands-VOSPKXFF.js +31 -0
  175. package/updateDialogTitleAction-LQV6QLBW.js +185 -0
@@ -0,0 +1,85 @@
1
+ import {
2
+ isGatewayHttpStatus,
3
+ parseRetryAfterHeaderMs
4
+ } from "./chunk-GAKEBQD6.js";
5
+ import {
6
+ asTrimmedLowercaseString
7
+ } from "./chunk-QSJ3HFEF.js";
8
+
9
+ // packages/cli/connectorWebSocketTarget.ts
10
+ var ConnectorWebSocketAuthError = class extends Error {
11
+ code;
12
+ constructor(message, code = "CONNECTOR_AUTH_FAILED") {
13
+ super(message);
14
+ this.name = "ConnectorWebSocketAuthError";
15
+ this.code = code;
16
+ }
17
+ };
18
+ function isConnectorWebSocketAuthError(error) {
19
+ return error instanceof ConnectorWebSocketAuthError;
20
+ }
21
+ var ConnectorWebSocketRetryableError = class extends Error {
22
+ reason;
23
+ retryAfterMs;
24
+ constructor(message, options = {}) {
25
+ super(message);
26
+ this.name = "ConnectorWebSocketRetryableError";
27
+ this.reason = options.reason ?? "retryable";
28
+ this.retryAfterMs = options.retryAfterMs;
29
+ }
30
+ };
31
+ function isConnectorWebSocketRetryableError(error) {
32
+ return error instanceof ConnectorWebSocketRetryableError;
33
+ }
34
+ function parseRetryAfterMs(response, bodyRetryAfterMs) {
35
+ const headerDelayMs = parseRetryAfterHeaderMs(response.headers.get("Retry-After"));
36
+ if (headerDelayMs != null) return headerDelayMs;
37
+ const parsed = Number(bodyRetryAfterMs);
38
+ return Number.isFinite(parsed) && parsed >= 0 ? Math.round(parsed) : void 0;
39
+ }
40
+ async function resolveConnectorWebSocketTarget(input) {
41
+ const directWsUrl = new URL(input.serverUrl);
42
+ directWsUrl.protocol = directWsUrl.protocol === "https:" ? "wss:" : "ws:";
43
+ directWsUrl.pathname = "/api/connector/ws";
44
+ directWsUrl.search = "";
45
+ directWsUrl.searchParams.set("machineId", input.machineId);
46
+ const connectorSurface = asTrimmedLowercaseString(input.connectorSurface);
47
+ if (connectorSurface) {
48
+ directWsUrl.searchParams.set("connectorSurface", connectorSurface);
49
+ }
50
+ const probeUrl = new URL(input.serverUrl);
51
+ probeUrl.pathname = "/api/connector/ws";
52
+ probeUrl.search = directWsUrl.search;
53
+ const response = await (input.fetchImpl ?? fetch)(probeUrl, {
54
+ headers: input.headers
55
+ }).catch(() => null);
56
+ if (response && (response.status === 401 || response.status === 403)) {
57
+ const json2 = await response.json().catch(() => null);
58
+ const code = typeof json2?.code === "string" ? json2.code : "CONNECTOR_AUTH_FAILED";
59
+ const message = typeof json2?.error === "string" ? json2.error : `Connector auth failed with HTTP ${response.status}`;
60
+ throw new ConnectorWebSocketAuthError(`${code}: ${message}`, code);
61
+ }
62
+ if (response && !response.ok) {
63
+ const json2 = await response.clone().json().catch(() => null);
64
+ const retryable = json2?.retryable === true || json2?.reason === "core_draining" || isGatewayHttpStatus(response.status);
65
+ if (retryable) {
66
+ const reason = typeof json2?.reason === "string" ? json2.reason : "retryable";
67
+ const message = typeof json2?.error === "string" ? json2.error : `Connector websocket unavailable with HTTP ${response.status}`;
68
+ throw new ConnectorWebSocketRetryableError(message, {
69
+ reason,
70
+ retryAfterMs: parseRetryAfterMs(response, json2?.retryAfterMs)
71
+ });
72
+ }
73
+ }
74
+ if (!response || !response.ok) {
75
+ return directWsUrl.toString();
76
+ }
77
+ const json = await response.json().catch(() => null);
78
+ return typeof json?.wsUrl === "string" && json.wsUrl ? json.wsUrl : directWsUrl.toString();
79
+ }
80
+
81
+ export {
82
+ isConnectorWebSocketAuthError,
83
+ isConnectorWebSocketRetryableError,
84
+ resolveConnectorWebSocketTarget
85
+ };
@@ -0,0 +1,36 @@
1
+ // packages/app/utils/fileUtils.ts
2
+ var fileConstructor = typeof globalThis !== "undefined" && typeof globalThis.File === "function" ? globalThis.File : void 0;
3
+ var isImageMimeType = (value) => typeof value === "string" && value.toLowerCase().startsWith("image/");
4
+ var IMAGE_FILE_NAME_RE = /\.(avif|bmp|gif|heic|heif|ico|jpe?g|png|svg|tiff?|webp)$/i;
5
+ var VIDEO_FILE_NAME_RE = /\.(avi|m4v|mkv|mov|mp4|mpeg|mpg|webm)$/i;
6
+ var AUDIO_FILE_NAME_RE = /\.(aac|flac|m4a|mp3|ogg|wav|weba)$/i;
7
+ var DOCUMENT_FILE_NAME_RE = /\.(csv|doc|docx|md|odt|pdf|ppt|pptx|rtf|txt|xls|xlsx)$/i;
8
+ var isImageFileName = (value) => typeof value === "string" && IMAGE_FILE_NAME_RE.test(value.trim());
9
+ var isVideoMimeType = (value) => typeof value === "string" && value.toLowerCase().startsWith("video/");
10
+ var isAudioMimeType = (value) => typeof value === "string" && value.toLowerCase().startsWith("audio/");
11
+ var isPdfMimeType = (value) => typeof value === "string" && value.toLowerCase() === "application/pdf";
12
+ var isDocumentMimeType = (value) => {
13
+ if (typeof value !== "string") return false;
14
+ const normalized = value.toLowerCase();
15
+ return isPdfMimeType(normalized) || normalized === "text/plain" || normalized === "text/markdown" || normalized === "text/csv" || normalized === "application/msword" || normalized === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || normalized === "application/vnd.ms-powerpoint" || normalized === "application/vnd.openxmlformats-officedocument.presentationml.presentation" || normalized === "application/vnd.ms-excel" || normalized === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || normalized === "application/rtf" || normalized === "application/vnd.oasis.opendocument.text";
16
+ };
17
+ var resolveFileCategory = ({
18
+ mimeType,
19
+ fileName
20
+ }) => {
21
+ if (isImageMimeType(mimeType) || isImageFileName(fileName)) return "image";
22
+ if (isVideoMimeType(mimeType) || typeof fileName === "string" && VIDEO_FILE_NAME_RE.test(fileName.trim())) {
23
+ return "video";
24
+ }
25
+ if (isAudioMimeType(mimeType) || typeof fileName === "string" && AUDIO_FILE_NAME_RE.test(fileName.trim())) {
26
+ return "audio";
27
+ }
28
+ if (isDocumentMimeType(mimeType) || typeof fileName === "string" && DOCUMENT_FILE_NAME_RE.test(fileName.trim())) {
29
+ return "document";
30
+ }
31
+ return "other";
32
+ };
33
+
34
+ export {
35
+ resolveFileCategory
36
+ };
@@ -0,0 +1,548 @@
1
+ import {
2
+ asTrimmedLowercaseString
3
+ } from "./chunk-QSJ3HFEF.js";
4
+
5
+ // packages/integrations/deepseek/models.ts
6
+ var deepSeekModels = [
7
+ {
8
+ name: "deepseek-v4-flash",
9
+ displayName: "DeepSeek V4 Flash",
10
+ hasVision: false,
11
+ contextWindow: 1e6,
12
+ maxOutputTokens: 384e3,
13
+ jsonOutput: true,
14
+ fnCall: true,
15
+ supportsTool: true,
16
+ supportsReasoningEffort: true,
17
+ price: {
18
+ input: 1,
19
+ inputCacheHit: 0.02,
20
+ output: 2
21
+ }
22
+ },
23
+ {
24
+ name: "deepseek-v4-pro",
25
+ displayName: "DeepSeek V4 Pro",
26
+ hasVision: false,
27
+ contextWindow: 1e6,
28
+ maxOutputTokens: 384e3,
29
+ jsonOutput: true,
30
+ fnCall: true,
31
+ supportsTool: true,
32
+ supportsReasoningEffort: true,
33
+ price: {
34
+ input: 3,
35
+ inputCacheHit: 0.1,
36
+ output: 6
37
+ }
38
+ }
39
+ ];
40
+
41
+ // packages/ai/agent/liveAudioModel.ts
42
+ var DEFAULT_GOOGLE_LIVE_AUDIO_MODEL = "gemini-3.1-flash-live-preview";
43
+
44
+ // packages/integrations/google/models.ts
45
+ var GOOGLE_IMAGE_ASPECT_RATIOS = [
46
+ "1:1",
47
+ "2:3",
48
+ "3:2",
49
+ "3:4",
50
+ "4:3",
51
+ "4:5",
52
+ "5:4",
53
+ "9:16",
54
+ "16:9",
55
+ "21:9"
56
+ ];
57
+ var GOOGLE_IMAGE_SIZES = ["1K", "2K", "4K"];
58
+ var createGoogleImageModel = ({
59
+ name,
60
+ displayName,
61
+ inputPrice,
62
+ outputPrice,
63
+ imageTokenPricePerMillion,
64
+ imageOutputTokenEstimateBySize,
65
+ pricePerImage,
66
+ maxOutputTokens,
67
+ contextWindow,
68
+ imageGenerationWaitTimeSeconds,
69
+ imageGenerationProfiles
70
+ }) => ({
71
+ name,
72
+ displayName,
73
+ provider: "google",
74
+ hasVision: true,
75
+ hasImageOutput: true,
76
+ supportsImageOutput: true,
77
+ supportsImageConfig: true,
78
+ requiresImageModalities: true,
79
+ defaultModalities: ["image", "text"],
80
+ supportedAspectRatios: GOOGLE_IMAGE_ASPECT_RATIOS,
81
+ supportedImageSizes: GOOGLE_IMAGE_SIZES,
82
+ price: {
83
+ input: inputPrice,
84
+ output: outputPrice
85
+ },
86
+ imageTokenPricePerMillion,
87
+ imageOutputTokenEstimateBySize,
88
+ pricePerImage,
89
+ maxOutputTokens,
90
+ contextWindow,
91
+ imageGenerationWaitTimeSeconds,
92
+ imageGenerationProfiles,
93
+ supportsTool: false
94
+ });
95
+ var googleModels = [
96
+ {
97
+ name: DEFAULT_GOOGLE_LIVE_AUDIO_MODEL,
98
+ displayName: "Gemini 3.1 Flash Live",
99
+ provider: "google",
100
+ description: "Gemini Live API model for low-latency real-time voice conversations.",
101
+ hasVision: true,
102
+ hasAudio: true,
103
+ contextWindow: 1048576,
104
+ maxOutputTokens: 65500,
105
+ supportsTool: true,
106
+ price: {
107
+ input: 0.5 * 7,
108
+ output: 3 * 7,
109
+ cachingWrite: 0.05 * 7,
110
+ cachingRead: 0.05 * 7
111
+ }
112
+ },
113
+ {
114
+ name: "gemini-3.6-flash",
115
+ displayName: "Gemini 3.6 Flash",
116
+ provider: "google",
117
+ description: "Gemini 3.6 Flash model for fast frontier agentic, coding, and multimodal tasks.",
118
+ hasVision: true,
119
+ hasAudio: true,
120
+ contextWindow: 1048576,
121
+ maxOutputTokens: 65536,
122
+ supportsTool: true,
123
+ supportsReasoningEffort: true,
124
+ // TODO(pricing): gemini-3.6-flash 官方定价未确认,暂沿用 3.5-flash 费率,确认后更新。
125
+ price: {
126
+ input: 1.5 * 7,
127
+ output: 9 * 7,
128
+ cachingWrite: 0.15 * 7,
129
+ cachingRead: 0.15 * 7
130
+ },
131
+ serviceTierPriceMultipliers: {
132
+ batch: { inputOutput: 0.5, cache: 0.5 },
133
+ flex: { inputOutput: 0.5, cache: 0.08 / 0.15 },
134
+ priority: { inputOutput: 1.8, cache: 1.8 }
135
+ }
136
+ },
137
+ createGoogleImageModel({
138
+ name: "gemini-3-pro-image-preview",
139
+ displayName: "Nano Banana Pro (Gemini 3 Pro Image Preview)",
140
+ inputPrice: 2 * 7,
141
+ outputPrice: 12 * 7,
142
+ imageTokenPricePerMillion: 120 * 7,
143
+ imageOutputTokenEstimateBySize: {
144
+ "1K": 1120,
145
+ "2K": 1120,
146
+ "4K": 2e3
147
+ },
148
+ maxOutputTokens: 8192,
149
+ contextWindow: 65536,
150
+ imageGenerationWaitTimeSeconds: {
151
+ min: 25,
152
+ max: 60
153
+ },
154
+ imageGenerationProfiles: [
155
+ {
156
+ key: "speed",
157
+ label: "\u901F\u5EA6\u4F18\u5148",
158
+ imageModel: "gemini-3.1-flash-image-preview",
159
+ waitTimeSeconds: {
160
+ min: 10,
161
+ max: 25
162
+ }
163
+ },
164
+ {
165
+ key: "quality",
166
+ label: "\u8D28\u91CF\u4F18\u5148",
167
+ imageModel: "gemini-3-pro-image-preview",
168
+ waitTimeSeconds: {
169
+ min: 25,
170
+ max: 60
171
+ }
172
+ }
173
+ ]
174
+ }),
175
+ createGoogleImageModel({
176
+ name: "gemini-3.1-flash-image-preview",
177
+ displayName: "Nano Banana 2 (Gemini 3.1 Flash Image Preview)",
178
+ inputPrice: 0.5 * 7,
179
+ outputPrice: 3 * 7,
180
+ imageTokenPricePerMillion: 60 * 7,
181
+ imageOutputTokenEstimateBySize: {
182
+ "1K": 1120,
183
+ "2K": 1680,
184
+ "4K": 2520
185
+ },
186
+ maxOutputTokens: 65536,
187
+ contextWindow: 65536,
188
+ imageGenerationWaitTimeSeconds: {
189
+ min: 10,
190
+ max: 25
191
+ },
192
+ imageGenerationProfiles: [
193
+ {
194
+ key: "speed",
195
+ label: "\u901F\u5EA6\u4F18\u5148",
196
+ imageModel: "gemini-3.1-flash-image-preview",
197
+ waitTimeSeconds: {
198
+ min: 10,
199
+ max: 25
200
+ }
201
+ },
202
+ {
203
+ key: "quality",
204
+ label: "\u8D28\u91CF\u4F18\u5148",
205
+ imageModel: "gemini-3-pro-image-preview",
206
+ waitTimeSeconds: {
207
+ min: 25,
208
+ max: 60
209
+ }
210
+ }
211
+ ]
212
+ }),
213
+ createGoogleImageModel({
214
+ name: "gemini-3.1-flash-lite-image",
215
+ displayName: "Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)",
216
+ inputPrice: 0.25 * 7,
217
+ outputPrice: 1.5 * 7,
218
+ pricePerImage: 0.034 * 7,
219
+ maxOutputTokens: 65536,
220
+ contextWindow: 65536,
221
+ imageGenerationWaitTimeSeconds: {
222
+ min: 4,
223
+ max: 10
224
+ },
225
+ imageGenerationProfiles: [
226
+ {
227
+ key: "speed",
228
+ label: "\u901F\u5EA6\u4F18\u5148",
229
+ imageModel: "gemini-3.1-flash-lite-image",
230
+ waitTimeSeconds: {
231
+ min: 4,
232
+ max: 10
233
+ }
234
+ },
235
+ {
236
+ key: "quality",
237
+ label: "\u8D28\u91CF\u4F18\u5148",
238
+ imageModel: "gemini-3-pro-image-preview",
239
+ waitTimeSeconds: {
240
+ min: 25,
241
+ max: 60
242
+ }
243
+ }
244
+ ]
245
+ })
246
+ ];
247
+
248
+ // packages/integrations/openai/models.ts
249
+ var GPT_5_5_STANDARD_PRICE = {
250
+ input: 5 * 8,
251
+ output: 30 * 8,
252
+ inputCacheHit: 0.5 * 8
253
+ };
254
+ var GPT_5_5_LONG_CONTEXT_PRICE = {
255
+ input: 10 * 8,
256
+ output: 45 * 8,
257
+ inputCacheHit: 1 * 8
258
+ };
259
+ var GPT_5_5_PRO_STANDARD_PRICE = {
260
+ input: 30 * 8,
261
+ output: 180 * 8,
262
+ inputCacheHit: 0
263
+ };
264
+ var GPT_5_5_PRO_LONG_CONTEXT_PRICE = {
265
+ input: 60 * 8,
266
+ output: 270 * 8,
267
+ inputCacheHit: 0
268
+ };
269
+ var GPT_5_6_SOL_STANDARD_PRICE = {
270
+ input: 5 * 8,
271
+ output: 30 * 8,
272
+ inputCacheHit: 0.5 * 8
273
+ };
274
+ var GPT_5_6_SOL_LONG_CONTEXT_PRICE = {
275
+ input: 10 * 8,
276
+ output: 45 * 8,
277
+ inputCacheHit: 1 * 8
278
+ };
279
+ var GPT_5_6_TERRA_STANDARD_PRICE = {
280
+ input: 2.5 * 8,
281
+ output: 15 * 8,
282
+ inputCacheHit: 0.25 * 8
283
+ };
284
+ var GPT_5_6_TERRA_LONG_CONTEXT_PRICE = {
285
+ input: 5 * 8,
286
+ output: 22.5 * 8,
287
+ inputCacheHit: 0.5 * 8
288
+ };
289
+ var GPT_5_6_LUNA_PRICE = {
290
+ input: 1 * 8,
291
+ output: 6 * 8,
292
+ inputCacheHit: 0.1 * 8
293
+ };
294
+ var openAIModels = [
295
+ {
296
+ name: "gpt-5.5",
297
+ displayName: "GPT-5.5 Standard",
298
+ endpointKey: "responses",
299
+ hasVision: true,
300
+ contextWindow: 1047576,
301
+ maxOutputTokens: 128e3,
302
+ supportsReasoningEffort: true,
303
+ price: GPT_5_5_STANDARD_PRICE,
304
+ pricingStrategy: {
305
+ type: "tiered_context",
306
+ tiers: [
307
+ {
308
+ minContext: 272001,
309
+ price: GPT_5_5_LONG_CONTEXT_PRICE
310
+ }
311
+ ]
312
+ }
313
+ },
314
+ {
315
+ name: "gpt-5.6-sol",
316
+ displayName: "GPT-5.6 Sol (Flagship)",
317
+ endpointKey: "responses",
318
+ hasVision: true,
319
+ contextWindow: 105e4,
320
+ maxOutputTokens: 128e3,
321
+ supportsReasoningEffort: true,
322
+ price: GPT_5_6_SOL_STANDARD_PRICE,
323
+ pricingStrategy: {
324
+ type: "tiered_context",
325
+ tiers: [
326
+ {
327
+ minContext: 272001,
328
+ price: GPT_5_6_SOL_LONG_CONTEXT_PRICE
329
+ }
330
+ ]
331
+ }
332
+ },
333
+ {
334
+ name: "gpt-5.6-terra",
335
+ displayName: "GPT-5.6 Terra (Balanced)",
336
+ endpointKey: "responses",
337
+ hasVision: true,
338
+ contextWindow: 105e4,
339
+ maxOutputTokens: 128e3,
340
+ supportsReasoningEffort: true,
341
+ price: GPT_5_6_TERRA_STANDARD_PRICE,
342
+ pricingStrategy: {
343
+ type: "tiered_context",
344
+ tiers: [
345
+ {
346
+ minContext: 272001,
347
+ price: GPT_5_6_TERRA_LONG_CONTEXT_PRICE
348
+ }
349
+ ]
350
+ }
351
+ },
352
+ {
353
+ name: "gpt-5.6-luna",
354
+ displayName: "GPT-5.6 Luna (Fast)",
355
+ endpointKey: "responses",
356
+ hasVision: true,
357
+ contextWindow: 105e4,
358
+ maxOutputTokens: 128e3,
359
+ supportsReasoningEffort: true,
360
+ price: GPT_5_6_LUNA_PRICE
361
+ },
362
+ {
363
+ name: "gpt-5.5-pro",
364
+ displayName: "GPT-5.5 Pro",
365
+ endpointKey: "responses",
366
+ hasVision: true,
367
+ contextWindow: 1047576,
368
+ maxOutputTokens: 128e3,
369
+ supportsReasoningEffort: true,
370
+ price: GPT_5_5_PRO_STANDARD_PRICE,
371
+ pricingStrategy: {
372
+ type: "tiered_context",
373
+ tiers: [
374
+ {
375
+ minContext: 272001,
376
+ price: GPT_5_5_PRO_LONG_CONTEXT_PRICE
377
+ }
378
+ ]
379
+ }
380
+ },
381
+ {
382
+ name: "gpt-image-2",
383
+ displayName: "GPT Image 2",
384
+ endpointKey: "responses",
385
+ hasVision: true,
386
+ hasImageOutput: true,
387
+ supportsImageOutput: true,
388
+ supportsTool: false,
389
+ contextWindow: 128e3,
390
+ maxOutputTokens: 32768,
391
+ price: { input: 5 * 8, output: 0, inputCacheHit: 1.25 * 8 },
392
+ pricePerImage: void 0,
393
+ // Dynamic cost via imageTokenPricePerMillion and quality/size
394
+ imageTokenPricePerMillion: 30 * 8,
395
+ // $30.00 per 1M output tokens
396
+ // Official GPT Image 2 output estimates from the OpenAI image guide:
397
+ // low/medium/high cost by size divided by $30 per 1M output tokens.
398
+ imageOutputTokenEstimateBySize: {
399
+ "1K": { low: 200, medium: 1766, high: 7033 },
400
+ "2K": { low: 166, medium: 1366, high: 5500 },
401
+ "4K": { low: 166, medium: 1366, high: 5500 }
402
+ }
403
+ }
404
+ ];
405
+
406
+ // packages/ai/llm/openrouterModels.ts
407
+ var OPENROUTER_MODELS = [];
408
+ var openrouterModels = OPENROUTER_MODELS;
409
+
410
+ // packages/ai/llm/deepinfra.ts
411
+ var deepinfraModels = [
412
+ {
413
+ name: "anthropic/claude-haiku-4-5",
414
+ displayName: "Anthropic: Claude Haiku 4.5",
415
+ hasVision: true,
416
+ price: {
417
+ input: 1 * 9,
418
+ output: 5 * 9
419
+ },
420
+ contextWindow: 195e3,
421
+ maxOutputTokens: 4092,
422
+ supportsTool: false
423
+ },
424
+ {
425
+ name: "anthropic/claude-sonnet-5",
426
+ displayName: "Anthropic: Claude Sonnet 5",
427
+ hasVision: true,
428
+ price: {
429
+ input: 3 * 9,
430
+ output: 15 * 9
431
+ },
432
+ contextWindow: 976e3,
433
+ maxOutputTokens: 4092,
434
+ supportsTool: false
435
+ },
436
+ {
437
+ name: "anthropic/claude-opus-4-8",
438
+ displayName: "Anthropic: Claude Opus 4.8",
439
+ hasVision: true,
440
+ price: {
441
+ input: 5 * 9,
442
+ output: 25 * 9
443
+ },
444
+ contextWindow: 976e3,
445
+ maxOutputTokens: 4092,
446
+ supportsTool: false
447
+ }
448
+ ];
449
+
450
+ // packages/integrations/xai/models.ts
451
+ var xaiModels = [
452
+ {
453
+ name: "grok-4.5",
454
+ displayName: "Grok 4.5",
455
+ hasVision: true,
456
+ contextWindow: 5e5,
457
+ price: { input: 2 * 7, output: 6 * 7 },
458
+ // $2/$6 per MTok × 7
459
+ fnCall: true,
460
+ jsonOutput: true
461
+ }
462
+ ];
463
+
464
+ // packages/ai/llm/fireworks.ts
465
+ var fireworksModels = [
466
+ {
467
+ name: "accounts/fireworks/models/minimax-m3",
468
+ displayName: "MiniMax: MiniMax M3",
469
+ hasVision: true,
470
+ price: {
471
+ input: 0.3 * 8,
472
+ output: 1.2 * 8,
473
+ cachingRead: 0.06 * 8
474
+ },
475
+ contextWindow: 512e3,
476
+ supportsTool: true
477
+ }
478
+ ];
479
+
480
+ // packages/ai/llm/cloudflare.ts
481
+ var getCloudflareWorkersAiChatCompletionsUrl = (accountId = process.env.CLOUDFLARE_ACCOUNT_ID?.trim()) => {
482
+ if (!accountId) {
483
+ throw new Error(
484
+ "CLOUDFLARE_ACCOUNT_ID is required for Cloudflare Workers AI chat completions"
485
+ );
486
+ }
487
+ return `https://api.cloudflare.com/client/v4/accounts/${accountId}/ai/v1/chat/completions`;
488
+ };
489
+ var cloudflareModels = [];
490
+
491
+ // packages/ai/llm/gmi.ts
492
+ var GMI_CHAT_COMPLETIONS_URL = "https://api.gmi-serving.com/v1/chat/completions";
493
+ var gmiModels = [];
494
+
495
+ // packages/ai/llm/zai.ts
496
+ var zaiModels = [];
497
+
498
+ // packages/ai/llm/kimi.ts
499
+ var PLATFORM_HOSTED_KIMI_K3_MODEL = "kimi-k3";
500
+ var PLATFORM_HOSTED_KIMI_K26_MODEL = "kimi-k2.6";
501
+ var PLATFORM_HOSTED_KIMI_K27_CODE_MODEL = "kimi-k2.7-code";
502
+ var OLLAMA_CLOUD_KIMI_K3_MODEL = PLATFORM_HOSTED_KIMI_K3_MODEL;
503
+ var OLLAMA_CLOUD_KIMI_K26_MODEL = PLATFORM_HOSTED_KIMI_K26_MODEL;
504
+ var OLLAMA_CLOUD_KIMI_K27_CODE_MODEL = PLATFORM_HOSTED_KIMI_K27_CODE_MODEL;
505
+ var PLATFORM_HOSTED_KIMI_PROVIDER = "nolo";
506
+ var LEGACY_OLLAMA_CLOUD_PROVIDER = "ollama-cloud";
507
+ var isNoloHostedProvider = (provider) => {
508
+ const normalized = asTrimmedLowercaseString(provider);
509
+ return normalized === PLATFORM_HOSTED_KIMI_PROVIDER || normalized === LEGACY_OLLAMA_CLOUD_PROVIDER;
510
+ };
511
+ var FIREWORKS_KIMI_LATEST_MODEL = "accounts/fireworks/models/kimi-latest";
512
+ var FIREWORKS_KIMI_CURRENT_MODEL = "accounts/fireworks/models/kimi-k2p7-code";
513
+ var FIREWORKS_KIMI_K2P6_MODEL = "accounts/fireworks/models/kimi-k2p6";
514
+ var DEEPINFRA_KIMI_FALLBACK_MODEL = "moonshotai/Kimi-K2.6";
515
+ var isFireworksKimiModel = (model) => model === FIREWORKS_KIMI_LATEST_MODEL || model === FIREWORKS_KIMI_CURRENT_MODEL || model === FIREWORKS_KIMI_K2P6_MODEL;
516
+ var isDeepInfraKimiModel = (model) => model === DEEPINFRA_KIMI_FALLBACK_MODEL;
517
+ var resolveFireworksKimiModel = (model) => {
518
+ if (model === FIREWORKS_KIMI_LATEST_MODEL) {
519
+ return FIREWORKS_KIMI_CURRENT_MODEL;
520
+ }
521
+ return model ?? "";
522
+ };
523
+
524
+ export {
525
+ deepSeekModels,
526
+ googleModels,
527
+ openAIModels,
528
+ openrouterModels,
529
+ deepinfraModels,
530
+ xaiModels,
531
+ fireworksModels,
532
+ PLATFORM_HOSTED_KIMI_K3_MODEL,
533
+ PLATFORM_HOSTED_KIMI_K26_MODEL,
534
+ PLATFORM_HOSTED_KIMI_K27_CODE_MODEL,
535
+ OLLAMA_CLOUD_KIMI_K3_MODEL,
536
+ OLLAMA_CLOUD_KIMI_K26_MODEL,
537
+ OLLAMA_CLOUD_KIMI_K27_CODE_MODEL,
538
+ PLATFORM_HOSTED_KIMI_PROVIDER,
539
+ isNoloHostedProvider,
540
+ isFireworksKimiModel,
541
+ isDeepInfraKimiModel,
542
+ resolveFireworksKimiModel,
543
+ getCloudflareWorkersAiChatCompletionsUrl,
544
+ cloudflareModels,
545
+ GMI_CHAT_COMPLETIONS_URL,
546
+ gmiModels,
547
+ zaiModels
548
+ };