nolo-cli 0.8.0-alpha.2 → 0.8.0-alpha.21

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 (188) hide show
  1. package/README.md +1 -1
  2. package/_executeModel-42U3VOVZ.js +205 -0
  3. package/action-TLI3V62L.js +28 -0
  4. package/addContentAction-57RSIIMR.js +26 -0
  5. package/addDialogAgentAction-G3VWEA6E.js +68 -0
  6. package/agentDeleteCommand-5DD2IM3J.js +327 -0
  7. package/agentEmailCommands-6FACJBU4.js +628 -0
  8. package/agentListCommands-I6KZYCIG.js +223 -0
  9. package/agentMachineCommands-VKLIGMZA.js +425 -0
  10. package/agentPullCommand-O2MTUAFR.js +122 -0
  11. package/agentRecordCommands-7TZICYDT.js +96 -0
  12. package/agentRunCommand-L4OM23KV.js +114 -0
  13. package/agentRunControl-K4VKNEHF.js +57 -0
  14. package/agentRuntimeLocal-ZYEIPTY4.js +104 -0
  15. package/agentSlice-BX7GXSNO.js +42 -0
  16. package/authCommand-EB5JSOX5.js +581 -0
  17. package/authCommands-XPEHTKSM.js +35 -0
  18. package/chunk-25LCXTML.js +175 -0
  19. package/chunk-2ECQG4YX.js +22296 -0
  20. package/chunk-2FTTDCD4.js +675 -0
  21. package/chunk-2JCXITPK.js +1078 -0
  22. package/chunk-3ASDTTEI.js +1774 -0
  23. package/chunk-3EUW3WEO.js +8 -0
  24. package/chunk-3LY4F7SV.js +9293 -0
  25. package/chunk-4CQLVGRV.js +50 -0
  26. package/chunk-4IJYA27C.js +342 -0
  27. package/chunk-4O3CARJ4.js +231 -0
  28. package/chunk-4QEWT7KD.js +933 -0
  29. package/chunk-4SN6J65J.js +38 -0
  30. package/chunk-4VNS5WPM.js +42 -0
  31. package/chunk-4XENYTF5.js +222 -0
  32. package/chunk-4ZDM73SD.js +34 -0
  33. package/chunk-5CS33IBL.js +301 -0
  34. package/chunk-5EFXE3O7.js +138 -0
  35. package/chunk-5KLGBAAR.js +386 -0
  36. package/chunk-5MIDPSSK.js +206 -0
  37. package/chunk-5MMAK75Q.js +15 -0
  38. package/chunk-63W5N6P3.js +150 -0
  39. package/chunk-6HYVJV7B.js +102 -0
  40. package/chunk-6KHNO3SK.js +1948 -0
  41. package/chunk-6WD3OOJS.js +20 -0
  42. package/chunk-7DAJ4AI4.js +191 -0
  43. package/chunk-7GNGZRLZ.js +1939 -0
  44. package/chunk-7KCUSYT2.js +354 -0
  45. package/chunk-7U44LYTR.js +238 -0
  46. package/chunk-AFON4QUU.js +112 -0
  47. package/chunk-AGFH73SK.js +239 -0
  48. package/chunk-AL2KDGR2.js +27339 -0
  49. package/chunk-AS4PVWA4.js +221 -0
  50. package/chunk-ATNTHIZI.js +13 -0
  51. package/chunk-AVMKZHBC.js +85 -0
  52. package/chunk-AZPCASRE.js +36 -0
  53. package/chunk-BBYVOSU2.js +792 -0
  54. package/chunk-C3RUNRHT.js +51 -0
  55. package/chunk-C4FTUXVF.js +146 -0
  56. package/chunk-CF2WZF4N.js +134 -0
  57. package/chunk-CF7PE763.js +10 -0
  58. package/chunk-CKOJQDKR.js +198 -0
  59. package/chunk-CMKUBIGW.js +1550 -0
  60. package/chunk-CWMSB67P.js +34 -0
  61. package/chunk-DCOA4QSN.js +105 -0
  62. package/chunk-DFFIZ25G.js +30 -0
  63. package/chunk-DSZUWUYB.js +478 -0
  64. package/chunk-DWLEOOGR.js +8 -0
  65. package/chunk-DZ3XJVET.js +231 -0
  66. package/chunk-EHLHSX7R.js +1433 -0
  67. package/chunk-ENOG22KJ.js +939 -0
  68. package/chunk-FSO5B7GH.js +171 -0
  69. package/chunk-FVYY6MCS.js +1447 -0
  70. package/chunk-G3SUCT4W.js +8 -0
  71. package/chunk-GAKEBQD6.js +30 -0
  72. package/chunk-GBRG75BQ.js +86 -0
  73. package/chunk-GU3PEVGZ.js +4723 -0
  74. package/chunk-H33743XH.js +25 -0
  75. package/chunk-HNMXYYJR.js +12 -0
  76. package/chunk-HNW7IJSK.js +71 -0
  77. package/chunk-I42VC5KR.js +15 -0
  78. package/chunk-I6XMPTMR.js +113 -0
  79. package/chunk-IDZTNRP2.js +85 -0
  80. package/chunk-ISNCLGUZ.js +146 -0
  81. package/chunk-IWX4UW2E.js +548 -0
  82. package/chunk-JBTJAPUF.js +35 -0
  83. package/chunk-JEXVIMYZ.js +55 -0
  84. package/chunk-JRKKFRAV.js +537 -0
  85. package/chunk-JZPBVBIY.js +94 -0
  86. package/chunk-KKY4B2Q2.js +21 -0
  87. package/chunk-KQHGZWSV.js +63 -0
  88. package/chunk-KUG52IAP.js +8 -0
  89. package/chunk-KX6YBIHG.js +8 -0
  90. package/chunk-LCBAMY2M.js +60 -0
  91. package/chunk-LM6IYQ3F.js +16 -0
  92. package/chunk-LTRXGFMS.js +83 -0
  93. package/chunk-M76ECQRD.js +13658 -0
  94. package/chunk-MRC4Q34M.js +188 -0
  95. package/chunk-MTU75CZ2.js +91 -0
  96. package/chunk-N54XAP77.js +19 -0
  97. package/chunk-O2ZNTTET.js +3272 -0
  98. package/chunk-O4BU24WZ.js +3212 -0
  99. package/chunk-OLZBQWZU.js +6 -0
  100. package/chunk-OOSFSFMA.js +271 -0
  101. package/chunk-OPZYGHUC.js +89 -0
  102. package/chunk-OWOHNGCN.js +50 -0
  103. package/chunk-P3PKED2I.js +962 -0
  104. package/chunk-QSJ3HFEF.js +8 -0
  105. package/chunk-RCSJFQPB.js +9036 -0
  106. package/chunk-RL776AGR.js +190 -0
  107. package/chunk-ROWQEJRP.js +139 -0
  108. package/chunk-S7Z2HMCN.js +25 -0
  109. package/chunk-SDJDLO5W.js +628 -0
  110. package/chunk-SOTZ6RDN.js +69 -0
  111. package/chunk-TILFE6LV.js +381 -0
  112. package/chunk-U4TRT5V4.js +246 -0
  113. package/chunk-U6VC4MU4.js +8 -0
  114. package/chunk-UAD2WT54.js +64 -0
  115. package/chunk-UB6SN4NJ.js +421 -0
  116. package/chunk-URUUZLPA.js +807 -0
  117. package/chunk-UTLZINAP.js +3066 -0
  118. package/chunk-VC6OZXO5.js +298 -0
  119. package/chunk-VF4K2QE6.js +21 -0
  120. package/chunk-VHBWHNVT.js +59 -0
  121. package/chunk-VIDPVFP3.js +20 -0
  122. package/chunk-VP4WJWKW.js +8882 -0
  123. package/chunk-VUW5FBDB.js +573 -0
  124. package/chunk-VVX233PH.js +482 -0
  125. package/chunk-VX3SXJ3N.js +2052 -0
  126. package/chunk-W4NVOSFF.js +37 -0
  127. package/chunk-WWC7I6TA.js +8 -0
  128. package/chunk-WZSRQNQG.js +2587 -0
  129. package/chunk-XBUBEFNX.js +34 -0
  130. package/chunk-XENYHRUE.js +104 -0
  131. package/chunk-Y5GCAMGP.js +9 -0
  132. package/chunk-YPRZSPF3.js +148 -0
  133. package/chunk-Z4NR32XR.js +50 -0
  134. package/chunk-ZNFJWEN4.js +56 -0
  135. package/cliExecutor-K3F7DMRO.js +36 -0
  136. package/clipboardy-BVE3LVEH.js +12001 -0
  137. package/createAgentAutomationAction-RJF3N2QY.js +866 -0
  138. package/createDialogAction-DRSPS6CE.js +55 -0
  139. package/createPageAction-6B2WMNO3.js +172 -0
  140. package/db-HCJ5PRB5.js +271 -0
  141. package/dbSlice-Q3TM2FJV.js +60 -0
  142. package/deleteFile-OW53A6BX.js +41 -0
  143. package/dialogCommands-4IX4XIZE.js +63 -0
  144. package/dialogSlice-3M7KX2TX.js +148 -0
  145. package/docCreateCommands-SIL3NPGT.js +220 -0
  146. package/docDeleteCommands-7IOMLUS4.js +181 -0
  147. package/docReadCommands-FNFXUA5L.js +134 -0
  148. package/docStore-SV7E34D4.js +98 -0
  149. package/docUpdateCommands-X2HNDVUC.js +318 -0
  150. package/fetchMessages-KTNM7QAR.js +17 -0
  151. package/getPricing-3E6UNPKL.js +30 -0
  152. package/handleSendMessageAction-JYETO5RZ.js +185 -0
  153. package/index.js +188 -112958
  154. package/lib-FYYBQIXS.js +19839 -0
  155. package/localDialogRead-2VRI24F4.js +26 -0
  156. package/localFirstLog-DHNOY2NA.js +19 -0
  157. package/localRuntimeAuthority-TEGCOWX4.js +471 -0
  158. package/localRuntimeDb-LGDF6FQP.js +12 -0
  159. package/machineCommands-RIO3RP5Q.js +781 -0
  160. package/machineInfo-M6KB6HZN.js +10 -0
  161. package/machineWsRunDispatch-W7UYLGB5.js +112 -0
  162. package/memoryCommands-O4MIPIWQ.js +476 -0
  163. package/models-4OPOOLFS.js +9 -0
  164. package/offlineMarxistsAgentCommand-BCPJITJL.js +242 -0
  165. package/package.json +4 -24
  166. package/read-GW7ZEI23.js +17 -0
  167. package/readDocTool-HUFU6OCT.js +16 -0
  168. package/readlineWorkspace-27JR7WPW.js +5682 -0
  169. package/removeDialogAgentAction-CXKR4NJI.js +73 -0
  170. package/runAgentClientLoop-HZFAPJHS.js +293 -0
  171. package/runtimeDoctorCommands-LRHLPDRC.js +289 -0
  172. package/setDialogExtraReferencesAction-6RKUSXHX.js +60 -0
  173. package/setPrimaryDialogAgentAction-T3UTBEFG.js +80 -0
  174. package/settingSlice-IVKXJXMG.js +199 -0
  175. package/skillDiscovery-UGSQGX2U.js +16 -0
  176. package/skillSummaryMarker-42HKSXYY.js +9 -0
  177. package/slateToRenderMarkdown-Y5IYN73U.js +7 -0
  178. package/slateUtils-2M7MUTWX.js +19 -0
  179. package/spaceCommands-E7VOF4LO.js +450 -0
  180. package/spaceSlice-TSVROA5U.js +149 -0
  181. package/streamAgentChatTurn-3C5RQZJF.js +4510 -0
  182. package/tableCommands-O7O2LBEG.js +1286 -0
  183. package/toolApiClient-QI3YBNWB.js +26 -0
  184. package/tools-EQDEKR6N.js +87 -0
  185. package/tuiSummaryLlmCaller-RV3THLZF.js +78 -0
  186. package/understanding-3CUQQ6SV.js +271 -0
  187. package/updateCommands-VOSPKXFF.js +31 -0
  188. package/updateDialogTitleAction-3XV7VWSZ.js +188 -0
@@ -0,0 +1,792 @@
1
+ import {
2
+ GMI_CHAT_COMPLETIONS_URL,
3
+ PLATFORM_HOSTED_KIMI_K26_MODEL,
4
+ PLATFORM_HOSTED_KIMI_K27_CODE_MODEL,
5
+ PLATFORM_HOSTED_KIMI_K3_MODEL,
6
+ PLATFORM_HOSTED_KIMI_PROVIDER,
7
+ cloudflareModels,
8
+ deepSeekModels,
9
+ deepinfraModels,
10
+ fireworksModels,
11
+ getCloudflareWorkersAiChatCompletionsUrl,
12
+ gmiModels,
13
+ googleModels,
14
+ openAIModels,
15
+ openrouterModels,
16
+ xaiModels,
17
+ zaiModels
18
+ } from "./chunk-IWX4UW2E.js";
19
+
20
+ // packages/integrations/anthropic/anthropicModels.ts
21
+ var anthropicModels = [
22
+ {
23
+ name: "claude-3-5-sonnet-latest",
24
+ displayName: "Claude 3.5 Sonnet",
25
+ hasVision: true,
26
+ description: "Our most intelligent model to date",
27
+ contextWindow: 2e5,
28
+ maxOutputTokens: 8192,
29
+ price: {
30
+ input: 27,
31
+ // $3/MTok * 9
32
+ output: 135,
33
+ // $15/MTok * 9
34
+ cachingWrite: 33.75,
35
+ // $3.75/MTok * 9
36
+ cachingRead: 2.7
37
+ // $0.30/MTok * 9
38
+ }
39
+ },
40
+ {
41
+ name: "claude-3-7-sonnet-latest",
42
+ displayName: "Claude 3.7 Sonnet",
43
+ hasVision: true,
44
+ description: "Our most intelligent model to date",
45
+ contextWindow: 2e5,
46
+ maxOutputTokens: 8192,
47
+ price: {
48
+ input: 27,
49
+ // $3/MTok * 9
50
+ output: 135,
51
+ // $15/MTok * 9
52
+ cachingWrite: 33.75,
53
+ // $3.75/MTok * 9
54
+ cachingRead: 2.7
55
+ // $0.30/MTok * 9
56
+ }
57
+ },
58
+ {
59
+ name: "claude-3-5-haiku-20241022",
60
+ displayName: "Claude 3.5 Haiku",
61
+ hasVision: false,
62
+ description: "Fastest, most cost-effective model",
63
+ contextWindow: 2e5,
64
+ maxOutputTokens: 8192,
65
+ price: {
66
+ input: 7.2,
67
+ // $0.80/MTok * 9
68
+ output: 36,
69
+ // $4/MTok * 9
70
+ cachingWrite: 9,
71
+ // $1/MTok * 9
72
+ cachingRead: 0.72
73
+ // $0.08/MTok * 9
74
+ }
75
+ }
76
+ ];
77
+
78
+ // packages/ai/llm/platformHosted.ts
79
+ var PLATFORM_HOSTED_KIMI_PRICE = {
80
+ input: 0.08,
81
+ output: 1.65
82
+ };
83
+ var PLATFORM_HOSTED_KIMI_K3_PRICE = {
84
+ input: 2.4,
85
+ output: 12
86
+ };
87
+ var PLATFORM_HOSTED_GLM_PRICE = {
88
+ input: 0.33,
89
+ output: 2.05
90
+ };
91
+ var PLATFORM_HOSTED_GLM_52_MODEL = "glm-5.2";
92
+ var PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL = "deepseek-v4-flash";
93
+ var PLATFORM_HOSTED_DEEPSEEK_FLASH_PRICE = {
94
+ input: 0.03,
95
+ output: 0.16
96
+ };
97
+ var PLATFORM_HOSTED_CHAT_COMPLETIONS_URL = "https://ollama.com/v1/chat/completions";
98
+ var platformHostedModels = [
99
+ {
100
+ name: PLATFORM_HOSTED_KIMI_K3_MODEL,
101
+ displayName: "Kimi K3",
102
+ hasVision: true,
103
+ price: { ...PLATFORM_HOSTED_KIMI_K3_PRICE },
104
+ maxOutputTokens: 262144,
105
+ contextWindow: 1e6,
106
+ supportsTool: true,
107
+ supportsReasoningEffort: true
108
+ },
109
+ {
110
+ name: PLATFORM_HOSTED_KIMI_K26_MODEL,
111
+ displayName: "Kimi K2.6",
112
+ hasVision: true,
113
+ price: { ...PLATFORM_HOSTED_KIMI_PRICE },
114
+ maxOutputTokens: 262144,
115
+ contextWindow: 262144,
116
+ supportsTool: true
117
+ },
118
+ {
119
+ name: PLATFORM_HOSTED_KIMI_K27_CODE_MODEL,
120
+ displayName: "Kimi K2.7 Coding",
121
+ hasVision: true,
122
+ price: { ...PLATFORM_HOSTED_KIMI_PRICE },
123
+ maxOutputTokens: 262144,
124
+ contextWindow: 256e3,
125
+ supportsTool: true
126
+ },
127
+ {
128
+ name: PLATFORM_HOSTED_GLM_52_MODEL,
129
+ displayName: "GLM 5.2",
130
+ hasVision: false,
131
+ price: { ...PLATFORM_HOSTED_GLM_PRICE },
132
+ maxOutputTokens: 131072,
133
+ contextWindow: 1e6,
134
+ supportsTool: true,
135
+ supportsReasoningEffort: true
136
+ },
137
+ {
138
+ name: PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
139
+ displayName: "DeepSeek V4 Flash",
140
+ hasVision: false,
141
+ price: { ...PLATFORM_HOSTED_DEEPSEEK_FLASH_PRICE },
142
+ maxOutputTokens: 384e3,
143
+ contextWindow: 1e6,
144
+ supportsTool: true,
145
+ supportsReasoningEffort: true
146
+ }
147
+ ];
148
+
149
+ // packages/integrations/qwen/models.ts
150
+ var qwenModels = [
151
+ // ── Qwen3 旗舰 ──
152
+ {
153
+ name: "qwen3-max",
154
+ displayName: "Qwen3 Max",
155
+ hasVision: true,
156
+ contextWindow: 262144,
157
+ maxOutputTokens: 32768,
158
+ jsonOutput: true,
159
+ fnCall: true,
160
+ supportsTool: true,
161
+ supportsReasoningEffort: true,
162
+ price: { input: 6, output: 24 },
163
+ provider: "qwen",
164
+ description: "\u5343\u95EE3 \u65D7\u8230\u6A21\u578B\uFF0C\u652F\u6301\u601D\u8003\u6A21\u5F0F\u3001\u51FD\u6570\u8C03\u7528\u3001\u7ED3\u6784\u5316\u8F93\u51FA\u3002"
165
+ },
166
+ {
167
+ name: "qwen3-max-preview",
168
+ displayName: "Qwen3 Max Preview",
169
+ hasVision: true,
170
+ contextWindow: 81920,
171
+ maxOutputTokens: 32768,
172
+ jsonOutput: true,
173
+ fnCall: true,
174
+ supportsTool: true,
175
+ supportsReasoningEffort: true,
176
+ price: { input: 6, output: 24 },
177
+ provider: "qwen"
178
+ },
179
+ {
180
+ name: "qwen3-235b-a22b-instruct-2507",
181
+ displayName: "Qwen3 235B A22B Instruct",
182
+ hasVision: true,
183
+ contextWindow: 262144,
184
+ maxOutputTokens: 32768,
185
+ jsonOutput: true,
186
+ fnCall: true,
187
+ supportsTool: true,
188
+ supportsReasoningEffort: true,
189
+ price: { input: 4, output: 12 },
190
+ provider: "qwen"
191
+ },
192
+ {
193
+ name: "qwen3-next-80b-a3b-instruct",
194
+ displayName: "Qwen3 Next 80B A3B Instruct",
195
+ hasVision: true,
196
+ contextWindow: 81920,
197
+ maxOutputTokens: 32768,
198
+ jsonOutput: true,
199
+ fnCall: true,
200
+ supportsTool: true,
201
+ supportsReasoningEffort: true,
202
+ price: { input: 2, output: 6 },
203
+ provider: "qwen"
204
+ },
205
+ // ── Qwen3-Coder 编程系列 ──
206
+ {
207
+ name: "qwen3-coder-plus",
208
+ displayName: "Qwen3 Coder Plus",
209
+ hasVision: false,
210
+ contextWindow: 1048576,
211
+ maxOutputTokens: 65536,
212
+ jsonOutput: true,
213
+ fnCall: true,
214
+ supportsTool: true,
215
+ supportsReasoningEffort: true,
216
+ price: { input: 3, output: 9 },
217
+ provider: "qwen",
218
+ description: "\u5343\u95EE3 \u7F16\u7A0B\u65D7\u8230\uFF0C1M \u957F\u4E0A\u4E0B\u6587\uFF0C\u9002\u5408\u4EE3\u7801\u751F\u6210\u4E0E Agent \u7F16\u7A0B\u3002"
219
+ },
220
+ {
221
+ name: "qwen3-coder-flash",
222
+ displayName: "Qwen3 Coder Flash",
223
+ hasVision: false,
224
+ contextWindow: 1048576,
225
+ maxOutputTokens: 65536,
226
+ jsonOutput: true,
227
+ fnCall: true,
228
+ supportsTool: true,
229
+ supportsReasoningEffort: true,
230
+ price: { input: 1, output: 3 },
231
+ provider: "qwen"
232
+ },
233
+ {
234
+ name: "qwen3-coder-480b-a35b-instruct",
235
+ displayName: "Qwen3 Coder 480B A35B Instruct",
236
+ hasVision: false,
237
+ contextWindow: 1048576,
238
+ maxOutputTokens: 65536,
239
+ jsonOutput: true,
240
+ fnCall: true,
241
+ supportsTool: true,
242
+ supportsReasoningEffort: true,
243
+ price: { input: 5, output: 15 },
244
+ provider: "qwen"
245
+ },
246
+ // ── 长上下文 ──
247
+ {
248
+ name: "qwen-long",
249
+ displayName: "Qwen Long",
250
+ hasVision: false,
251
+ contextWindow: 10485760,
252
+ maxOutputTokens: 8192,
253
+ jsonOutput: true,
254
+ fnCall: false,
255
+ supportsTool: false,
256
+ price: { input: 0.5, output: 2 },
257
+ provider: "qwen",
258
+ description: "10M \u8D85\u957F\u4E0A\u4E0B\u6587\uFF0C\u9002\u5408\u957F\u6587\u6863\u5904\u7406\u3002"
259
+ },
260
+ // ── 旧版主力(仍常用) ──
261
+ {
262
+ name: "qwen-plus",
263
+ displayName: "Qwen Plus",
264
+ hasVision: true,
265
+ contextWindow: 1048576,
266
+ maxOutputTokens: 32768,
267
+ jsonOutput: true,
268
+ fnCall: true,
269
+ supportsTool: true,
270
+ supportsReasoningEffort: true,
271
+ price: { input: 0.8, output: 2 },
272
+ provider: "qwen"
273
+ },
274
+ {
275
+ name: "qwen-turbo",
276
+ displayName: "Qwen Turbo",
277
+ hasVision: false,
278
+ contextWindow: 131072,
279
+ maxOutputTokens: 8192,
280
+ jsonOutput: true,
281
+ fnCall: true,
282
+ supportsTool: true,
283
+ price: { input: 0.3, output: 0.6 },
284
+ provider: "qwen"
285
+ },
286
+ {
287
+ name: "qwen-flash",
288
+ displayName: "Qwen Flash",
289
+ hasVision: false,
290
+ contextWindow: 131072,
291
+ maxOutputTokens: 8192,
292
+ jsonOutput: true,
293
+ fnCall: true,
294
+ supportsTool: true,
295
+ price: { input: 0.1, output: 0.3 },
296
+ provider: "qwen"
297
+ },
298
+ // ── 推理(QwQ) ──
299
+ {
300
+ name: "qwq-plus",
301
+ displayName: "QwQ Plus",
302
+ hasVision: false,
303
+ contextWindow: 131072,
304
+ maxOutputTokens: 32768,
305
+ jsonOutput: true,
306
+ fnCall: true,
307
+ supportsTool: true,
308
+ supportsReasoningEffort: true,
309
+ price: { input: 2, output: 8 },
310
+ provider: "qwen",
311
+ description: "\u6DF1\u5EA6\u601D\u8003\u63A8\u7406\u6A21\u578B\u3002"
312
+ }
313
+ ];
314
+ var qwenTokenPlanModels = [
315
+ // ── 千问 ──
316
+ {
317
+ name: "qwen3.8-max-preview",
318
+ displayName: "Qwen3.8 Max Preview",
319
+ hasVision: true,
320
+ contextWindow: 1e6,
321
+ maxOutputTokens: 32768,
322
+ jsonOutput: true,
323
+ fnCall: true,
324
+ supportsTool: true,
325
+ supportsReasoningEffort: true,
326
+ price: { input: 0, output: 0 },
327
+ provider: "qwen",
328
+ description: "\u63A8\u7406\u6A21\u578B\u3001\u89C6\u89C9\u7406\u89E3\u3001\u6587\u672C\u751F\u6210\uFF08\u9884\u89C8\u7248\uFF09\u3002"
329
+ },
330
+ {
331
+ name: "qwen3.7-max",
332
+ displayName: "Qwen3.7 Max",
333
+ hasVision: false,
334
+ contextWindow: 262144,
335
+ maxOutputTokens: 32768,
336
+ jsonOutput: true,
337
+ fnCall: true,
338
+ supportsTool: true,
339
+ supportsReasoningEffort: true,
340
+ price: { input: 0, output: 0 },
341
+ provider: "qwen",
342
+ description: "\u63A8\u7406\u6A21\u578B\u3001\u6587\u672C\u751F\u6210\u3002"
343
+ },
344
+ {
345
+ name: "qwen3.7-plus",
346
+ displayName: "Qwen3.7 Plus",
347
+ hasVision: true,
348
+ contextWindow: 262144,
349
+ maxOutputTokens: 32768,
350
+ jsonOutput: true,
351
+ fnCall: true,
352
+ supportsTool: true,
353
+ supportsReasoningEffort: true,
354
+ price: { input: 0, output: 0 },
355
+ provider: "qwen",
356
+ description: "\u63A8\u7406\u6A21\u578B\u3001\u89C6\u89C9\u7406\u89E3\u3001\u6587\u672C\u751F\u6210\u3002"
357
+ },
358
+ {
359
+ name: "qwen3.6-flash",
360
+ displayName: "Qwen3.6 Flash",
361
+ hasVision: true,
362
+ contextWindow: 262144,
363
+ maxOutputTokens: 32768,
364
+ jsonOutput: true,
365
+ fnCall: true,
366
+ supportsTool: true,
367
+ supportsReasoningEffort: true,
368
+ price: { input: 0, output: 0 },
369
+ provider: "qwen",
370
+ description: "\u63A8\u7406\u6A21\u578B\u3001\u89C6\u89C9\u7406\u89E3\u3001\u6587\u672C\u751F\u6210\uFF08\u8F7B\u91CF\u5FEB\u901F\uFF09\u3002"
371
+ },
372
+ // ── 智谱 AI ──
373
+ {
374
+ name: "glm-5.2",
375
+ displayName: "GLM 5.2",
376
+ hasVision: false,
377
+ contextWindow: 1e6,
378
+ maxOutputTokens: 16384,
379
+ jsonOutput: true,
380
+ fnCall: true,
381
+ supportsTool: true,
382
+ supportsReasoningEffort: true,
383
+ price: { input: 0, output: 0 },
384
+ provider: "qwen",
385
+ description: "\u667A\u8C31 AI \u63A8\u7406\u6A21\u578B\u3001\u6587\u672C\u751F\u6210\u3002"
386
+ },
387
+ // ── DeepSeek ──
388
+ {
389
+ name: "deepseek-v4-pro",
390
+ displayName: "DeepSeek V4 Pro",
391
+ hasVision: false,
392
+ contextWindow: 1e6,
393
+ maxOutputTokens: 384e3,
394
+ jsonOutput: true,
395
+ fnCall: true,
396
+ supportsTool: true,
397
+ supportsReasoningEffort: true,
398
+ price: { input: 0, output: 0 },
399
+ provider: "qwen",
400
+ description: "DeepSeek \u63A8\u7406\u6A21\u578B\u3001\u6587\u672C\u751F\u6210\u3002"
401
+ },
402
+ // ── 万相(图片生成)──
403
+ {
404
+ name: "wan2.7-image",
405
+ displayName: "Wan2.7 Image",
406
+ hasVision: false,
407
+ hasImageOutput: true,
408
+ contextWindow: 0,
409
+ maxOutputTokens: 0,
410
+ price: { input: 0, output: 0 },
411
+ provider: "qwen",
412
+ description: "\u4E07\u76F8\u56FE\u7247\u751F\u6210\u3002"
413
+ },
414
+ {
415
+ name: "wan2.7-image-pro",
416
+ displayName: "Wan2.7 Image Pro",
417
+ hasVision: false,
418
+ hasImageOutput: true,
419
+ contextWindow: 0,
420
+ maxOutputTokens: 0,
421
+ price: { input: 0, output: 0 },
422
+ provider: "qwen",
423
+ description: "\u4E07\u76F8\u56FE\u7247\u751F\u6210\uFF08Pro\uFF09\u3002"
424
+ }
425
+ ];
426
+
427
+ // packages/integrations/moonshot/models.ts
428
+ var moonshotModels = [
429
+ // ── 旗舰 ──
430
+ {
431
+ name: "kimi-k3",
432
+ displayName: "Kimi K3",
433
+ hasVision: true,
434
+ contextWindow: 1e6,
435
+ maxOutputTokens: 262144,
436
+ jsonOutput: true,
437
+ fnCall: true,
438
+ supportsTool: true,
439
+ supportsReasoningEffort: true,
440
+ price: { input: 3 * 7, output: 15 * 7 },
441
+ provider: "moonshot",
442
+ description: "Moonshot \u65D7\u8230\u6A21\u578B\uFF0C\u539F\u751F\u591A\u6A21\u6001\uFF0C1M \u4E0A\u4E0B\u6587\uFF0C\u957F\u7A0B\u7F16\u7A0B\u4E0E\u6DF1\u5EA6\u63A8\u7406\u3002"
443
+ },
444
+ // ── 通用 ──
445
+ {
446
+ name: "kimi-k2.6",
447
+ displayName: "Kimi K2.6",
448
+ hasVision: true,
449
+ contextWindow: 262144,
450
+ maxOutputTokens: 262144,
451
+ jsonOutput: true,
452
+ fnCall: true,
453
+ supportsTool: true,
454
+ supportsReasoningEffort: true,
455
+ price: { input: 0.6 * 7, output: 2.4 * 7 },
456
+ provider: "moonshot",
457
+ description: "Moonshot \u9AD8\u6027\u80FD\u901A\u7528\u6A21\u578B\u3002"
458
+ },
459
+ // ── 编程 ──
460
+ {
461
+ name: "kimi-k2.7-code",
462
+ displayName: "Kimi K2.7 Code",
463
+ hasVision: false,
464
+ contextWindow: 262144,
465
+ maxOutputTokens: 262144,
466
+ jsonOutput: true,
467
+ fnCall: true,
468
+ supportsTool: true,
469
+ supportsReasoningEffort: true,
470
+ price: { input: 1.2 * 7, output: 4.8 * 7 },
471
+ provider: "moonshot",
472
+ description: "Moonshot \u7F16\u7A0B\u4F18\u5316\u6A21\u578B\uFF0C\u9002\u5408\u4EE3\u7801\u751F\u6210\u4E0E Agent \u7F16\u7A0B\u3002"
473
+ }
474
+ ];
475
+ var kimiCodeModels = [
476
+ // ── 旗舰编程 ──
477
+ {
478
+ name: "k3",
479
+ displayName: "Kimi K3",
480
+ hasVision: false,
481
+ contextWindow: 1e6,
482
+ maxOutputTokens: 262144,
483
+ jsonOutput: true,
484
+ fnCall: true,
485
+ supportsTool: true,
486
+ supportsReasoningEffort: true,
487
+ price: { input: 0, output: 0 },
488
+ provider: "moonshot",
489
+ description: "Kimi \u6700\u5F3A\u65D7\u8230\u7F16\u7A0B\u6A21\u578B\uFF0C2.8T \u53C2\u6570\uFF0C1M \u4E0A\u4E0B\u6587\uFF0Clow/high/max \u4E09\u6863\u601D\u8003\u6DF1\u5EA6\uFF0C\u64C5\u957F\u590D\u6742\u5DE5\u7A0B\u4E0E\u957F\u7A0B\u63A8\u7406\u3002Moderato \u53CA\u4EE5\u4E0A\u53EF\u7528\u3002"
490
+ },
491
+ // ── 旗舰编程(256K 上下文版)──
492
+ {
493
+ name: "k3-256k",
494
+ displayName: "Kimi K3 256K",
495
+ hasVision: false,
496
+ contextWindow: 262144,
497
+ maxOutputTokens: 262144,
498
+ jsonOutput: true,
499
+ fnCall: true,
500
+ supportsTool: true,
501
+ supportsReasoningEffort: true,
502
+ price: { input: 0, output: 0 },
503
+ provider: "moonshot",
504
+ description: "K3 \u7684 256K \u4E0A\u4E0B\u6587\u7248\uFF0C\u6D88\u8017\u7EA6\u4E3A k3 \u7684\u4E00\u534A\uFF0C\u9002\u5408\u65E5\u5E38\u95EE\u7B54\u4E0E\u4EE3\u7801\u8865\u5168\u3002\u4E0D\u652F\u6301\u89C6\u9891\u8F93\u5165\u3002Moderato \u53CA\u4EE5\u4E0A\u53EF\u7528\u3002"
505
+ },
506
+ // ── 成熟编程 ──
507
+ {
508
+ name: "kimi-for-coding",
509
+ displayName: "Kimi K2.7 Code",
510
+ hasVision: false,
511
+ contextWindow: 262144,
512
+ maxOutputTokens: 262144,
513
+ jsonOutput: true,
514
+ fnCall: true,
515
+ supportsTool: true,
516
+ supportsReasoningEffort: true,
517
+ price: { input: 0, output: 0 },
518
+ provider: "moonshot",
519
+ description: "\u6210\u719F\u7A33\u5B9A\u7684 Coding \u6A21\u578B\uFF0CThinking \u5F00\u542F\u4E0B\u53EF\u9760\u9075\u5FAA\u6307\u4EE4\uFF0C\u7F16\u7A0B\u4EFB\u52A1\u6210\u529F\u7387\u9AD8\u3002\u6240\u6709\u4F1A\u5458\u53EF\u7528\u3002"
520
+ },
521
+ // ── 高速编程 ──
522
+ {
523
+ name: "kimi-for-coding-highspeed",
524
+ displayName: "Kimi K2.7 Code \u9AD8\u901F\u7248",
525
+ hasVision: false,
526
+ contextWindow: 262144,
527
+ maxOutputTokens: 262144,
528
+ jsonOutput: true,
529
+ fnCall: true,
530
+ supportsTool: true,
531
+ supportsReasoningEffort: true,
532
+ price: { input: 0, output: 0 },
533
+ provider: "moonshot",
534
+ description: "K2.7 Code \u9AD8\u901F\u7248\uFF0C\u7F16\u7801\u80FD\u529B\u4E00\u81F4\uFF0C\u8F93\u51FA\u901F\u5EA6\u7EA6 6 \u500D\u3001\u6D88\u8017\u7EA6 3 \u500D\u3002Allegretto \u53CA\u4EE5\u4E0A\u53EF\u7528\u3002"
535
+ }
536
+ ];
537
+
538
+ // packages/ai/llm/reasoningModels.ts
539
+ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
540
+ "deepseek-v4-flash",
541
+ "deepseek-v4-pro",
542
+ "gemini-3.6-flash",
543
+ // Legacy Gemini ids — 已从模型注册表下线,保留只为存量 agent 的 reasoning UI。
544
+ "gemini-3.5-flash",
545
+ "gemini-3-flash-preview",
546
+ "gemini-3-pro-preview",
547
+ "gemini-3.1-pro-preview",
548
+ "gpt-5.5-pro",
549
+ "gpt-5.6-sol",
550
+ "gpt-5.6-terra",
551
+ "gpt-5.6-luna",
552
+ "glm-5.2",
553
+ "kimi-k3",
554
+ // Legacy OpenAI catalog ids — still support reasoning UI for agents that
555
+ // were never re-seeded after GPT-5.4 / GPT-5 were retired from the picker.
556
+ "gpt-5.4",
557
+ "gpt-5.4-mini",
558
+ "gpt-5.4-nano",
559
+ "gpt-5.4-pro",
560
+ "gpt-5",
561
+ "gpt-5-mini",
562
+ // Legacy model ids from retired Fireworks/DeepInfra/GMI/CF/Z.AI catalog rows
563
+ "@cf/zai-org/glm-5.2",
564
+ "zai-org/GLM-5.2",
565
+ "accounts/fireworks/models/glm-5p2",
566
+ "zai-org/GLM-5.2-FP8"
567
+ ]);
568
+ var isModelSupportReasoningEffort = (model) => REASONING_MODEL_NAMES.has(model);
569
+ var supportedReasoningModels = Array.from(REASONING_MODEL_NAMES);
570
+
571
+ // packages/ai/llm/providers.ts
572
+ var moonshotAllModels = [...moonshotModels, ...kimiCodeModels];
573
+ var qwenAllModels = [...qwenModels, ...qwenTokenPlanModels];
574
+ var MODEL_MAP = {
575
+ // anthropic: anthropicModels,
576
+ deepseek: deepSeekModels,
577
+ google: googleModels,
578
+ openai: openAIModels,
579
+ deepinfra: deepinfraModels,
580
+ openrouter: openrouterModels,
581
+ fireworks: fireworksModels,
582
+ nolo: platformHostedModels,
583
+ cloudflare: cloudflareModels,
584
+ gmi: gmiModels,
585
+ zai: zaiModels,
586
+ qwen: qwenAllModels,
587
+ moonshot: moonshotAllModels
588
+ };
589
+ var MODEL_LOOKUP_MAP = {
590
+ anthropic: anthropicModels,
591
+ xai: xaiModels,
592
+ ...MODEL_MAP
593
+ };
594
+ var ANTHROPIC_MODEL_ALIASES = {
595
+ "claude-sonnet-4.6": "claude-3-7-sonnet-latest",
596
+ "claude-sonnet-4.5": "claude-3-5-sonnet-latest"
597
+ };
598
+ var normalizeLookupProvider = (provider) => {
599
+ if (!provider) return null;
600
+ const normalized = provider.toLowerCase();
601
+ if (normalized === "ollama-cloud") {
602
+ return "nolo";
603
+ }
604
+ if (normalized in MODEL_LOOKUP_MAP) {
605
+ return normalized;
606
+ }
607
+ return null;
608
+ };
609
+ var normalizeLookupModelName = (provider, name) => {
610
+ if (provider === "anthropic") {
611
+ return ANTHROPIC_MODEL_ALIASES[name] ?? name;
612
+ }
613
+ return name;
614
+ };
615
+ var toModel = (candidate) => ({
616
+ name: typeof candidate.id === "string" && candidate.id.trim() ? candidate.id : candidate.name,
617
+ displayName: candidate.displayName ?? (typeof candidate.id === "string" && candidate.id !== candidate.name ? candidate.name : void 0),
618
+ hasVision: typeof candidate.hasVision === "boolean" ? candidate.hasVision : !!candidate.supportVision,
619
+ contextWindow: candidate.contextWindow,
620
+ price: candidate.price ?? candidate.pricing ?? { input: 0, output: 0 },
621
+ pricingStrategy: candidate.pricingStrategy,
622
+ serviceTierPriceMultipliers: candidate.serviceTierPriceMultipliers,
623
+ maxOutputTokens: candidate.maxOutputTokens ?? candidate.maxTokens,
624
+ jsonOutput: candidate.jsonOutput,
625
+ fnCall: typeof candidate.fnCall === "boolean" ? candidate.fnCall : candidate.supportTool,
626
+ provider: candidate.provider,
627
+ description: candidate.description,
628
+ hasAudio: candidate.hasAudio,
629
+ maxImageResolution: candidate.maxImageResolution,
630
+ canFineTune: candidate.canFineTune,
631
+ hasImageOutput: candidate.hasImageOutput,
632
+ supportsImageOutput: candidate.supportsImageOutput,
633
+ supportsTool: typeof candidate.supportsTool === "boolean" ? candidate.supportsTool : candidate.supportTool,
634
+ supportsImageConfig: candidate.supportsImageConfig,
635
+ requiresImageModalities: candidate.requiresImageModalities,
636
+ defaultModalities: candidate.defaultModalities,
637
+ supportedAspectRatios: candidate.supportedAspectRatios,
638
+ supportedImageSizes: candidate.supportedImageSizes,
639
+ pricePerImage: candidate.pricePerImage,
640
+ imagePricingNote: candidate.imagePricingNote,
641
+ imageTokenPricePerMillion: candidate.imageTokenPricePerMillion,
642
+ imageOutputTokenEstimateBySize: candidate.imageOutputTokenEstimateBySize,
643
+ imageGenerationWaitTimeSeconds: candidate.imageGenerationWaitTimeSeconds,
644
+ imageGenerationProfiles: candidate.imageGenerationProfiles,
645
+ supportsReasoningEffort: typeof candidate.supportsReasoningEffort === "boolean" ? candidate.supportsReasoningEffort : candidate.supportReasoning,
646
+ endpointKey: candidate.endpointKey
647
+ });
648
+ var findCandidateInProvider = (provider, name) => {
649
+ const normalizedName = normalizeLookupModelName(provider, name);
650
+ const list = MODEL_LOOKUP_MAP[provider];
651
+ const candidate = list.find(
652
+ (item) => item.name === normalizedName || item.displayName === normalizedName || item.id === normalizedName
653
+ );
654
+ return candidate ? toModel(candidate) : null;
655
+ };
656
+ var findOpenRouterUpstreamModel = (name) => {
657
+ const slash = name.indexOf("/");
658
+ if (slash <= 0) return null;
659
+ const upstreamProvider = normalizeLookupProvider(name.slice(0, slash));
660
+ if (!upstreamProvider) return null;
661
+ const upstreamModelName = name.slice(slash + 1);
662
+ return findCandidateInProvider(upstreamProvider, upstreamModelName);
663
+ };
664
+ function findModelConfig(provider, name) {
665
+ const normalizedProvider = normalizeLookupProvider(provider);
666
+ if (!normalizedProvider) return null;
667
+ const direct = findCandidateInProvider(normalizedProvider, name);
668
+ if (direct) return direct;
669
+ if (normalizedProvider === "openrouter") {
670
+ return findOpenRouterUpstreamModel(name);
671
+ }
672
+ return null;
673
+ }
674
+ var availableProviderOptions = Object.keys(MODEL_MAP);
675
+ var API_ENDPOINTS = {
676
+ openai: {
677
+ completions: "https://api.openai.com/v1/chat/completions",
678
+ responses: "https://api.openai.com/v1/responses"
679
+ },
680
+ xai: {
681
+ default: "https://api.x.ai/v1/chat/completions"
682
+ },
683
+ deepseek: {
684
+ default: "https://api.deepseek.com/chat/completions"
685
+ },
686
+ deepinfra: {
687
+ default: "https://api.deepinfra.com/v1/openai/chat/completions"
688
+ },
689
+ google: {
690
+ default: "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions"
691
+ },
692
+ openrouter: {
693
+ default: "https://openrouter.ai/api/v1/chat/completions"
694
+ },
695
+ fireworks: {
696
+ default: "https://api.fireworks.ai/inference/v1/chat/completions"
697
+ },
698
+ nolo: {
699
+ default: PLATFORM_HOSTED_CHAT_COMPLETIONS_URL
700
+ },
701
+ // Legacy agent records may still store provider=ollama-cloud
702
+ "ollama-cloud": {
703
+ default: PLATFORM_HOSTED_CHAT_COMPLETIONS_URL
704
+ },
705
+ cloudflare: {
706
+ default: "__cloudflare_workers_ai_chat_completions__"
707
+ },
708
+ gmi: {
709
+ default: GMI_CHAT_COMPLETIONS_URL
710
+ },
711
+ qwen: {
712
+ // 千问 AI 平台 OpenAI 兼容模式
713
+ default: "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
714
+ },
715
+ moonshot: {
716
+ // Moonshot AI(月之暗面)开放平台 OpenAI 兼容模式(按量计费)
717
+ default: "https://api.moonshot.cn/v1/chat/completions"
718
+ }
719
+ };
720
+ function getModelConfig(provider, name) {
721
+ const model = findModelConfig(provider, name);
722
+ if (!model) {
723
+ throw new Error(`Model ${name} not found for provider ${provider}`);
724
+ }
725
+ return model;
726
+ }
727
+ function getProviderByModelName(modelName) {
728
+ for (const [provider, models] of Object.entries(MODEL_MAP)) {
729
+ if (models.some((m) => m.name === modelName)) {
730
+ return provider;
731
+ }
732
+ }
733
+ return void 0;
734
+ }
735
+ var DEFAULT_MODEL = {
736
+ provider: PLATFORM_HOSTED_KIMI_PROVIDER,
737
+ name: PLATFORM_HOSTED_KIMI_K26_MODEL
738
+ };
739
+ function getApiEndpoint(agent) {
740
+ const { provider, customProviderUrl, endpointKey, model } = agent;
741
+ const effectiveProvider = provider;
742
+ const effectiveModel = model;
743
+ if (agent.apiSource === "cli") {
744
+ throw new Error(
745
+ "Routing error: CLI agent should not call getApiEndpoint. Check streamAgentChatTurn."
746
+ );
747
+ }
748
+ if (customProviderUrl) {
749
+ const url = customProviderUrl.trim().replace(/\/$/, "");
750
+ if (/\/v\d+(beta\d*)?$/.test(url)) {
751
+ return `${url}/chat/completions`;
752
+ }
753
+ return url;
754
+ }
755
+ if (!effectiveProvider || effectiveProvider.toLowerCase() === "custom" || agent.apiSource === "custom") {
756
+ if (agent.useServerProxy) {
757
+ return "";
758
+ }
759
+ throw new Error(
760
+ "Custom provider URL is required when apiSource is 'custom'."
761
+ );
762
+ }
763
+ if (effectiveProvider === "cloudflare") {
764
+ return getCloudflareWorkersAiChatCompletionsUrl();
765
+ }
766
+ const endpoints = API_ENDPOINTS[effectiveProvider];
767
+ if (!endpoints) throw new Error(`Unsupported provider: ${provider}`);
768
+ let key = endpointKey;
769
+ if (!key && effectiveModel) {
770
+ try {
771
+ key = getModelConfig(effectiveProvider, effectiveModel).endpointKey;
772
+ } catch {
773
+ }
774
+ }
775
+ if (key && endpoints[key]) return endpoints[key];
776
+ if (endpoints.default) return endpoints.default;
777
+ const first = Object.values(endpoints)[0];
778
+ if (first) return first;
779
+ throw new Error(`No endpoint found for provider ${provider}`);
780
+ }
781
+
782
+ export {
783
+ PLATFORM_HOSTED_GLM_PRICE,
784
+ PLATFORM_HOSTED_GLM_52_MODEL,
785
+ isModelSupportReasoningEffort,
786
+ MODEL_LOOKUP_MAP,
787
+ findModelConfig,
788
+ getModelConfig,
789
+ getProviderByModelName,
790
+ DEFAULT_MODEL,
791
+ getApiEndpoint
792
+ };