luckerr 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +267 -0
  2. package/README.zh-CN.md +237 -0
  3. package/dashboard/app.css +3022 -0
  4. package/dashboard/dist/app.js +30137 -0
  5. package/dashboard/dist/app.js.map +1 -0
  6. package/dashboard/dist/vendor-hljs.css +10 -0
  7. package/dashboard/dist/vendor-uplot.css +1 -0
  8. package/dashboard/index.html +19 -0
  9. package/data/deepseek-tokenizer.json.gz +0 -0
  10. package/dist/cli/acp-EOOAI4F5.js +712 -0
  11. package/dist/cli/acp-EOOAI4F5.js.map +1 -0
  12. package/dist/cli/chat-7J6GJXL2.js +51 -0
  13. package/dist/cli/chat-7J6GJXL2.js.map +1 -0
  14. package/dist/cli/chunk-2425HK6U.js +54 -0
  15. package/dist/cli/chunk-2425HK6U.js.map +1 -0
  16. package/dist/cli/chunk-25T6CVUP.js +172 -0
  17. package/dist/cli/chunk-25T6CVUP.js.map +1 -0
  18. package/dist/cli/chunk-2UQP6H6T.js +31 -0
  19. package/dist/cli/chunk-2UQP6H6T.js.map +1 -0
  20. package/dist/cli/chunk-56OAJILV.js +47 -0
  21. package/dist/cli/chunk-56OAJILV.js.map +1 -0
  22. package/dist/cli/chunk-5FTI4KXH.js +150 -0
  23. package/dist/cli/chunk-5FTI4KXH.js.map +1 -0
  24. package/dist/cli/chunk-5TWQD73O.js +2846 -0
  25. package/dist/cli/chunk-5TWQD73O.js.map +1 -0
  26. package/dist/cli/chunk-653BOCMK.js +40 -0
  27. package/dist/cli/chunk-653BOCMK.js.map +1 -0
  28. package/dist/cli/chunk-6ALJTWWQ.js +2663 -0
  29. package/dist/cli/chunk-6ALJTWWQ.js.map +1 -0
  30. package/dist/cli/chunk-6DRKA2IL.js +341 -0
  31. package/dist/cli/chunk-6DRKA2IL.js.map +1 -0
  32. package/dist/cli/chunk-6LV63NJV.js +634 -0
  33. package/dist/cli/chunk-6LV63NJV.js.map +1 -0
  34. package/dist/cli/chunk-74EX7SUH.js +25293 -0
  35. package/dist/cli/chunk-74EX7SUH.js.map +1 -0
  36. package/dist/cli/chunk-74U5RKTX.js +60611 -0
  37. package/dist/cli/chunk-74U5RKTX.js.map +1 -0
  38. package/dist/cli/chunk-ANJSUESV.js +143 -0
  39. package/dist/cli/chunk-ANJSUESV.js.map +1 -0
  40. package/dist/cli/chunk-DB2Z3DKZ.js +54 -0
  41. package/dist/cli/chunk-DB2Z3DKZ.js.map +1 -0
  42. package/dist/cli/chunk-DDIH3ZAA.js +400 -0
  43. package/dist/cli/chunk-DDIH3ZAA.js.map +1 -0
  44. package/dist/cli/chunk-ELN3Z3B2.js +621 -0
  45. package/dist/cli/chunk-ELN3Z3B2.js.map +1 -0
  46. package/dist/cli/chunk-F6BSQJGV.js +200 -0
  47. package/dist/cli/chunk-F6BSQJGV.js.map +1 -0
  48. package/dist/cli/chunk-FET2UAG5.js +246 -0
  49. package/dist/cli/chunk-FET2UAG5.js.map +1 -0
  50. package/dist/cli/chunk-FFJ342IJ.js +190 -0
  51. package/dist/cli/chunk-FFJ342IJ.js.map +1 -0
  52. package/dist/cli/chunk-GB3247B6.js +130 -0
  53. package/dist/cli/chunk-GB3247B6.js.map +1 -0
  54. package/dist/cli/chunk-HC2J4U3G.js +373 -0
  55. package/dist/cli/chunk-HC2J4U3G.js.map +1 -0
  56. package/dist/cli/chunk-HRUZAIHQ.js +42 -0
  57. package/dist/cli/chunk-HRUZAIHQ.js.map +1 -0
  58. package/dist/cli/chunk-J3ZJFUDL.js +308 -0
  59. package/dist/cli/chunk-J3ZJFUDL.js.map +1 -0
  60. package/dist/cli/chunk-J5XJHLWM.js +55 -0
  61. package/dist/cli/chunk-J5XJHLWM.js.map +1 -0
  62. package/dist/cli/chunk-JFGLMRZ6.js +160 -0
  63. package/dist/cli/chunk-JFGLMRZ6.js.map +1 -0
  64. package/dist/cli/chunk-JMBMLOBP.js +26 -0
  65. package/dist/cli/chunk-JMBMLOBP.js.map +1 -0
  66. package/dist/cli/chunk-JMWHXZEL.js +551 -0
  67. package/dist/cli/chunk-JMWHXZEL.js.map +1 -0
  68. package/dist/cli/chunk-KEQGPJBO.js +209 -0
  69. package/dist/cli/chunk-KEQGPJBO.js.map +1 -0
  70. package/dist/cli/chunk-M4K6U37F.js +232 -0
  71. package/dist/cli/chunk-M4K6U37F.js.map +1 -0
  72. package/dist/cli/chunk-MIJI2WMN.js +95 -0
  73. package/dist/cli/chunk-MIJI2WMN.js.map +1 -0
  74. package/dist/cli/chunk-MPAO3JNR.js +128 -0
  75. package/dist/cli/chunk-MPAO3JNR.js.map +1 -0
  76. package/dist/cli/chunk-PZOFBEDC.js +873 -0
  77. package/dist/cli/chunk-PZOFBEDC.js.map +1 -0
  78. package/dist/cli/chunk-RAILYQLN.js +46 -0
  79. package/dist/cli/chunk-RAILYQLN.js.map +1 -0
  80. package/dist/cli/chunk-RR35VQVT.js +90 -0
  81. package/dist/cli/chunk-RR35VQVT.js.map +1 -0
  82. package/dist/cli/chunk-RRA7VPW4.js +417 -0
  83. package/dist/cli/chunk-RRA7VPW4.js.map +1 -0
  84. package/dist/cli/chunk-RU36QVN3.js +452 -0
  85. package/dist/cli/chunk-RU36QVN3.js.map +1 -0
  86. package/dist/cli/chunk-RUBIINXR.js +1819 -0
  87. package/dist/cli/chunk-RUBIINXR.js.map +1 -0
  88. package/dist/cli/chunk-S4XVGLRW.js +499 -0
  89. package/dist/cli/chunk-S4XVGLRW.js.map +1 -0
  90. package/dist/cli/chunk-TUK7OWJA.js +51 -0
  91. package/dist/cli/chunk-TUK7OWJA.js.map +1 -0
  92. package/dist/cli/chunk-VALDDV76.js +580 -0
  93. package/dist/cli/chunk-VALDDV76.js.map +1 -0
  94. package/dist/cli/chunk-WQOGPYGN.js +11390 -0
  95. package/dist/cli/chunk-WQOGPYGN.js.map +1 -0
  96. package/dist/cli/chunk-WREKDFXT.js +34320 -0
  97. package/dist/cli/chunk-WREKDFXT.js.map +1 -0
  98. package/dist/cli/chunk-Y7XQU2EL.js +270 -0
  99. package/dist/cli/chunk-Y7XQU2EL.js.map +1 -0
  100. package/dist/cli/chunk-YBVCZJU4.js +54 -0
  101. package/dist/cli/chunk-YBVCZJU4.js.map +1 -0
  102. package/dist/cli/chunk-YLIHDXUQ.js +749 -0
  103. package/dist/cli/chunk-YLIHDXUQ.js.map +1 -0
  104. package/dist/cli/chunk-YV5XXFD7.js +767 -0
  105. package/dist/cli/chunk-YV5XXFD7.js.map +1 -0
  106. package/dist/cli/chunk-ZRCNIYRQ.js +101 -0
  107. package/dist/cli/chunk-ZRCNIYRQ.js.map +1 -0
  108. package/dist/cli/code-CRKVCMFZ.js +155 -0
  109. package/dist/cli/code-CRKVCMFZ.js.map +1 -0
  110. package/dist/cli/commands-QLMD3T7B.js +356 -0
  111. package/dist/cli/commands-QLMD3T7B.js.map +1 -0
  112. package/dist/cli/commit-53PP32NC.js +293 -0
  113. package/dist/cli/commit-53PP32NC.js.map +1 -0
  114. package/dist/cli/desktop-R6W5CLJ5.js +1046 -0
  115. package/dist/cli/desktop-R6W5CLJ5.js.map +1 -0
  116. package/dist/cli/devtools-YECO25QO.js +3719 -0
  117. package/dist/cli/devtools-YECO25QO.js.map +1 -0
  118. package/dist/cli/diff-LYNRCJZE.js +166 -0
  119. package/dist/cli/diff-LYNRCJZE.js.map +1 -0
  120. package/dist/cli/doctor-5IBP4R5J.js +28 -0
  121. package/dist/cli/doctor-5IBP4R5J.js.map +1 -0
  122. package/dist/cli/events-QN6KLN2V.js +340 -0
  123. package/dist/cli/events-QN6KLN2V.js.map +1 -0
  124. package/dist/cli/index.js +3500 -0
  125. package/dist/cli/index.js.map +1 -0
  126. package/dist/cli/mcp-FGKEH7RG.js +277 -0
  127. package/dist/cli/mcp-FGKEH7RG.js.map +1 -0
  128. package/dist/cli/mcp-browse-YCND4NWT.js +178 -0
  129. package/dist/cli/mcp-browse-YCND4NWT.js.map +1 -0
  130. package/dist/cli/mcp-inspect-V34J3VX5.js +143 -0
  131. package/dist/cli/mcp-inspect-V34J3VX5.js.map +1 -0
  132. package/dist/cli/package.json +3 -0
  133. package/dist/cli/prompt-I775PNKT.js +16 -0
  134. package/dist/cli/prompt-I775PNKT.js.map +1 -0
  135. package/dist/cli/prune-sessions-KGIIYD3P.js +44 -0
  136. package/dist/cli/prune-sessions-KGIIYD3P.js.map +1 -0
  137. package/dist/cli/replay-RDXLUAOE.js +292 -0
  138. package/dist/cli/replay-RDXLUAOE.js.map +1 -0
  139. package/dist/cli/run-RCAC2RYW.js +223 -0
  140. package/dist/cli/run-RCAC2RYW.js.map +1 -0
  141. package/dist/cli/server-FFU6TLYJ.js +3658 -0
  142. package/dist/cli/server-FFU6TLYJ.js.map +1 -0
  143. package/dist/cli/sessions-QT26MQAE.js +107 -0
  144. package/dist/cli/sessions-QT26MQAE.js.map +1 -0
  145. package/dist/cli/setup-VV4WKXHV.js +767 -0
  146. package/dist/cli/setup-VV4WKXHV.js.map +1 -0
  147. package/dist/cli/stats-JVZPQWAN.js +15 -0
  148. package/dist/cli/stats-JVZPQWAN.js.map +1 -0
  149. package/dist/cli/update-KYI3OVJP.js +15 -0
  150. package/dist/cli/update-KYI3OVJP.js.map +1 -0
  151. package/dist/cli/version-ANYORXTI.js +34 -0
  152. package/dist/cli/version-ANYORXTI.js.map +1 -0
  153. package/dist/index.d.ts +2557 -0
  154. package/dist/index.js +15000 -0
  155. package/dist/index.js.map +1 -0
  156. package/package.json +106 -0
@@ -0,0 +1,551 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
3
+
4
+ // src/providers/profiles/deepseek.ts
5
+ var deepseek = {
6
+ id: "deepseek",
7
+ label: "DeepSeek",
8
+ auth: {
9
+ envKey: "DEEPSEEK_API_KEY",
10
+ header: "Authorization",
11
+ prefix: "Bearer "
12
+ },
13
+ endpoints: {
14
+ chat: "https://api.deepseek.com",
15
+ balance: "/user/balance",
16
+ models: "/models"
17
+ },
18
+ models: [
19
+ "deepseek-v4-flash",
20
+ "deepseek-v4-pro",
21
+ "deepseek-chat",
22
+ "deepseek-reasoner"
23
+ ],
24
+ defaultModel: "deepseek-v4-flash",
25
+ escalationModel: "deepseek-v4-pro",
26
+ pricing: {
27
+ models: {
28
+ "deepseek-v4-flash": { inputCacheHit: 0.028, inputCacheMiss: 0.139, output: 0.278 },
29
+ "deepseek-v4-pro": { inputCacheHit: 0.139, inputCacheMiss: 1.667, output: 3.333 },
30
+ "deepseek-chat": { inputCacheHit: 0.028, inputCacheMiss: 0.139, output: 0.278 },
31
+ "deepseek-reasoner": { inputCacheHit: 0.028, inputCacheMiss: 0.139, output: 0.278 }
32
+ },
33
+ defaults: { inputCacheHit: 0.139, inputCacheMiss: 1.667, output: 3.333 }
34
+ },
35
+ thinking: {
36
+ transport: "extra_body",
37
+ thinkingModels: ["deepseek-v4-flash", "deepseek-v4-pro", "deepseek-reasoner"],
38
+ defaultEnabled: true
39
+ },
40
+ contextTokens: {
41
+ "deepseek-v4-flash": 1e6,
42
+ "deepseek-v4-pro": 1e6,
43
+ "deepseek-chat": 1e6,
44
+ "deepseek-reasoner": 1e6
45
+ },
46
+ defaultContextTokens: 131072
47
+ };
48
+
49
+ // src/providers/profiles/siliconflow.ts
50
+ var siliconflow = {
51
+ id: "siliconflow",
52
+ label: "\u7845\u57FA\u6D41\u52A8 (SiliconFlow)",
53
+ auth: {
54
+ envKey: "SILICONFLOW_API_KEY",
55
+ header: "Authorization",
56
+ prefix: "Bearer "
57
+ },
58
+ endpoints: {
59
+ chat: "https://api.siliconflow.cn/v1",
60
+ balance: "/user/info",
61
+ // returns balance in user info
62
+ models: "/models"
63
+ },
64
+ models: [
65
+ "deepseek-ai/DeepSeek-V3",
66
+ "deepseek-ai/DeepSeek-R1",
67
+ "Qwen/Qwen2.5-72B-Instruct",
68
+ "Qwen/Qwen2.5-32B-Instruct",
69
+ "Qwen/Qwen2.5-14B-Instruct",
70
+ "Qwen/Qwen2.5-7B-Instruct",
71
+ "meta-llama/Llama-3.3-70B-Instruct",
72
+ "meta-llama/Llama-3.1-8B-Instruct",
73
+ "Pro/Llama-3.3-70B-Instruct",
74
+ "THUDM/glm-4-9b-chat"
75
+ ],
76
+ defaultModel: "deepseek-ai/DeepSeek-V3",
77
+ pricing: {
78
+ models: {
79
+ // DeepSeek models on SiliconFlow — ¥1.00 / 1M input, ¥2.00 / 1M output ≈ $0.14 / $0.28
80
+ "deepseek-ai/DeepSeek-V3": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.278 },
81
+ "deepseek-ai/DeepSeek-R1": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 1.111 },
82
+ // Qwen series — ¥0.50–4.00 / 1M tokens
83
+ "Qwen/Qwen2.5-72B-Instruct": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 0.556 },
84
+ "Qwen/Qwen2.5-32B-Instruct": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.278 },
85
+ "Qwen/Qwen2.5-14B-Instruct": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 },
86
+ "Qwen/Qwen2.5-7B-Instruct": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.069 },
87
+ // Llama
88
+ "meta-llama/Llama-3.3-70B-Instruct": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 0.556 },
89
+ "meta-llama/Llama-3.1-8B-Instruct": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.069 },
90
+ "Pro/Llama-3.3-70B-Instruct": { inputCacheHit: 0.833, inputCacheMiss: 0.833, output: 0.833 },
91
+ // GLM
92
+ "THUDM/glm-4-9b-chat": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.069 }
93
+ },
94
+ defaults: { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.278 }
95
+ },
96
+ thinking: {
97
+ transport: "none",
98
+ defaultEnabled: false
99
+ },
100
+ defaultContextTokens: 131072
101
+ };
102
+
103
+ // src/providers/profiles/modelscope.ts
104
+ var modelscope = {
105
+ id: "modelscope",
106
+ label: "\u9B54\u5854\u793E\u533A (ModelScope)",
107
+ auth: {
108
+ envKey: "MODELSCOPE_API_KEY",
109
+ header: "Authorization",
110
+ prefix: "Bearer "
111
+ },
112
+ endpoints: {
113
+ chat: "https://api-inference.modelscope.cn/v1",
114
+ balance: null,
115
+ models: "/models"
116
+ },
117
+ models: [
118
+ "Qwen/Qwen2.5-72B-Instruct",
119
+ "Qwen/Qwen2.5-32B-Instruct",
120
+ "Qwen/Qwen2.5-14B-Instruct",
121
+ "Qwen/Qwen2.5-7B-Instruct",
122
+ "deepseek-ai/DeepSeek-V3",
123
+ "deepseek-ai/DeepSeek-R1",
124
+ "LLM-Research/Meta-Llama-3.1-70B-Instruct"
125
+ ],
126
+ defaultModel: "Qwen/Qwen2.5-72B-Instruct",
127
+ pricing: {
128
+ defaults: { inputCacheHit: 0, inputCacheMiss: 0, output: 0 }
129
+ },
130
+ thinking: {
131
+ transport: "none",
132
+ defaultEnabled: false
133
+ },
134
+ defaultContextTokens: 131072
135
+ };
136
+
137
+ // src/providers/profiles/zhipu.ts
138
+ var zhipu = {
139
+ id: "zhipu",
140
+ label: "\u667A\u8C31AI (Zhipu)",
141
+ auth: {
142
+ envKey: "ZHIPU_API_KEY",
143
+ header: "Authorization",
144
+ prefix: "Bearer "
145
+ },
146
+ endpoints: {
147
+ chat: "https://open.bigmodel.cn/api/paas/v4",
148
+ balance: null,
149
+ models: "/models"
150
+ },
151
+ models: [
152
+ "glm-4-plus",
153
+ "glm-4-flash",
154
+ "glm-4-air",
155
+ "glm-4-long",
156
+ "glm-4",
157
+ "glm-4v-plus",
158
+ "glm-4v-flash",
159
+ "glm-4v"
160
+ ],
161
+ defaultModel: "glm-4-flash",
162
+ pricing: {
163
+ models: {
164
+ "glm-4-plus": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 },
165
+ "glm-4-flash": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },
166
+ "glm-4-air": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 },
167
+ "glm-4-long": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 },
168
+ "glm-4": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 },
169
+ "glm-4v-plus": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 },
170
+ "glm-4v-flash": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },
171
+ "glm-4v": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 }
172
+ },
173
+ defaults: { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 }
174
+ },
175
+ thinking: {
176
+ transport: "none",
177
+ defaultEnabled: false
178
+ },
179
+ contextTokens: {
180
+ "glm-4-plus": 128e3,
181
+ "glm-4-flash": 128e3,
182
+ "glm-4-air": 128e3,
183
+ "glm-4-long": 1e6,
184
+ "glm-4": 128e3,
185
+ "glm-4v-plus": 128e3,
186
+ "glm-4v-flash": 128e3,
187
+ "glm-4v": 128e3
188
+ },
189
+ defaultContextTokens: 128e3
190
+ };
191
+
192
+ // src/providers/profiles/moonshot.ts
193
+ var moonshot = {
194
+ id: "moonshot",
195
+ label: "Kimi (Moonshot)",
196
+ auth: {
197
+ envKey: "MOONSHOT_API_KEY",
198
+ header: "Authorization",
199
+ prefix: "Bearer "
200
+ },
201
+ endpoints: {
202
+ chat: "https://api.moonshot.cn/v1",
203
+ balance: null,
204
+ models: "/models"
205
+ },
206
+ models: [
207
+ "moonshot-v1-8k",
208
+ "moonshot-v1-32k",
209
+ "moonshot-v1-128k",
210
+ "kimi-latest"
211
+ ],
212
+ defaultModel: "kimi-latest",
213
+ pricing: {
214
+ models: {
215
+ "moonshot-v1-8k": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },
216
+ "moonshot-v1-32k": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },
217
+ "moonshot-v1-128k": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },
218
+ "kimi-latest": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 }
219
+ },
220
+ defaults: { inputCacheHit: 0, inputCacheMiss: 0, output: 0 }
221
+ },
222
+ thinking: {
223
+ transport: "none",
224
+ defaultEnabled: false
225
+ },
226
+ contextTokens: {
227
+ "moonshot-v1-8k": 8192,
228
+ "moonshot-v1-32k": 32768,
229
+ "moonshot-v1-128k": 131072,
230
+ "kimi-latest": 131072
231
+ },
232
+ defaultContextTokens: 131072
233
+ };
234
+
235
+ // src/providers/profiles/qwen.ts
236
+ var qwen = {
237
+ id: "qwen",
238
+ label: "\u901A\u4E49\u5343\u95EE (Qwen/DashScope)",
239
+ auth: {
240
+ envKey: "DASHSCOPE_API_KEY",
241
+ header: "Authorization",
242
+ prefix: "Bearer "
243
+ },
244
+ endpoints: {
245
+ chat: "https://dashscope.aliyuncs.com/compatible-mode/v1",
246
+ balance: null,
247
+ models: null
248
+ },
249
+ models: [
250
+ "qwen-max",
251
+ "qwen-plus",
252
+ "qwen-turbo",
253
+ "qwen-long",
254
+ "qwen2.5-72b-instruct",
255
+ "qwen2.5-32b-instruct",
256
+ "qwen2.5-14b-instruct",
257
+ "qwen2.5-7b-instruct",
258
+ "qwq-plus"
259
+ ],
260
+ defaultModel: "qwen-plus",
261
+ pricing: {
262
+ models: {
263
+ "qwen-max": { inputCacheHit: 2.778, inputCacheMiss: 2.778, output: 8.333 },
264
+ "qwen-plus": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.833 },
265
+ "qwen-turbo": { inputCacheHit: 0.042, inputCacheMiss: 0.042, output: 0.167 },
266
+ "qwen-long": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.278 },
267
+ "qwen2.5-72b-instruct": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 1.111 },
268
+ "qwen2.5-32b-instruct": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.556 },
269
+ "qwen2.5-14b-instruct": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.278 },
270
+ "qwen2.5-7b-instruct": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.139 },
271
+ "qwq-plus": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.833 }
272
+ },
273
+ defaults: { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.833 }
274
+ },
275
+ thinking: {
276
+ transport: "none",
277
+ defaultEnabled: false
278
+ },
279
+ contextTokens: {
280
+ "qwen-max": 32768,
281
+ "qwen-plus": 131072,
282
+ "qwen-turbo": 131072,
283
+ "qwen-long": 1e7,
284
+ "qwq-plus": 131072
285
+ },
286
+ defaultContextTokens: 131072
287
+ };
288
+
289
+ // src/providers/profiles/openai.ts
290
+ var openai = {
291
+ id: "openai",
292
+ label: "OpenAI",
293
+ auth: {
294
+ envKey: "OPENAI_API_KEY",
295
+ header: "Authorization",
296
+ prefix: "Bearer "
297
+ },
298
+ endpoints: {
299
+ chat: "https://api.openai.com/v1",
300
+ balance: null,
301
+ models: "/models"
302
+ },
303
+ models: [
304
+ "gpt-5",
305
+ "gpt-5-mini",
306
+ "gpt-5-nano",
307
+ "gpt-4.1",
308
+ "gpt-4.1-mini",
309
+ "gpt-4.1-nano",
310
+ "o4-mini",
311
+ "o3",
312
+ "o3-mini"
313
+ ],
314
+ defaultModel: "gpt-5-mini",
315
+ pricing: {
316
+ models: {
317
+ "gpt-5": { inputCacheHit: 0.625, inputCacheMiss: 2.5, output: 5 },
318
+ "gpt-5-mini": { inputCacheHit: 0.075, inputCacheMiss: 0.3, output: 0.6 },
319
+ "gpt-5-nano": { inputCacheHit: 0.025, inputCacheMiss: 0.1, output: 0.2 },
320
+ "gpt-4.1": { inputCacheHit: 0.5, inputCacheMiss: 2, output: 8 },
321
+ "gpt-4.1-mini": { inputCacheHit: 0.1, inputCacheMiss: 0.4, output: 1.6 },
322
+ "gpt-4.1-nano": { inputCacheHit: 0.025, inputCacheMiss: 0.1, output: 0.4 },
323
+ "o4-mini": { inputCacheHit: 0.275, inputCacheMiss: 1.1, output: 4.4 },
324
+ "o3": { inputCacheHit: 1.25, inputCacheMiss: 5, output: 20 },
325
+ "o3-mini": { inputCacheHit: 0.275, inputCacheMiss: 1.1, output: 4.4 }
326
+ },
327
+ defaults: { inputCacheHit: 0.3, inputCacheMiss: 1.2, output: 2.4 }
328
+ },
329
+ thinking: {
330
+ transport: "reasoning_effort",
331
+ thinkingModels: ["o4-mini", "o3", "o3-mini", "gpt-5"],
332
+ defaultEnabled: true
333
+ },
334
+ contextTokens: {
335
+ "gpt-5": 4e5,
336
+ "gpt-5-mini": 4e5,
337
+ "gpt-5-nano": 4e5,
338
+ "gpt-4.1": 1e6,
339
+ "gpt-4.1-mini": 1e6,
340
+ "gpt-4.1-nano": 1e6,
341
+ "o4-mini": 2e5,
342
+ "o3": 2e5,
343
+ "o3-mini": 2e5
344
+ },
345
+ defaultContextTokens: 131072
346
+ };
347
+
348
+ // src/providers/profiles/anthropic.ts
349
+ var anthropic = {
350
+ id: "anthropic",
351
+ label: "Anthropic",
352
+ auth: {
353
+ envKey: "ANTHROPIC_API_KEY",
354
+ header: "x-api-key",
355
+ prefix: ""
356
+ },
357
+ endpoints: {
358
+ chat: "https://api.anthropic.com/v1",
359
+ balance: null,
360
+ models: null
361
+ },
362
+ models: [
363
+ "claude-sonnet-4-20250514",
364
+ "claude-opus-4-20250514",
365
+ "claude-3.5-haiku-20241022"
366
+ ],
367
+ defaultModel: "claude-sonnet-4-20250514",
368
+ pricing: {
369
+ models: {
370
+ "claude-sonnet-4-20250514": { inputCacheHit: 0.3, inputCacheMiss: 3, output: 15 },
371
+ "claude-opus-4-20250514": { inputCacheHit: 1.5, inputCacheMiss: 15, output: 75 },
372
+ "claude-3.5-haiku-20241022": { inputCacheHit: 0.08, inputCacheMiss: 0.8, output: 4 }
373
+ },
374
+ defaults: { inputCacheHit: 0.3, inputCacheMiss: 3, output: 15 }
375
+ },
376
+ thinking: {
377
+ transport: "include",
378
+ thinkingModels: [
379
+ "claude-sonnet-4-20250514",
380
+ "claude-opus-4-20250514"
381
+ ],
382
+ defaultEnabled: true
383
+ },
384
+ contextTokens: {
385
+ "claude-sonnet-4-20250514": 2e5,
386
+ "claude-opus-4-20250514": 2e5,
387
+ "claude-3.5-haiku-20241022": 2e5
388
+ },
389
+ defaultContextTokens: 2e5,
390
+ extraHeaders: {
391
+ "anthropic-version": "2023-06-01"
392
+ }
393
+ };
394
+
395
+ // src/providers/profiles/groq.ts
396
+ var groq = {
397
+ id: "groq",
398
+ label: "Groq",
399
+ auth: {
400
+ envKey: "GROQ_API_KEY",
401
+ header: "Authorization",
402
+ prefix: "Bearer "
403
+ },
404
+ endpoints: {
405
+ chat: "https://api.groq.com/openai/v1",
406
+ balance: null,
407
+ models: "/models"
408
+ },
409
+ models: [
410
+ "llama-3.3-70b-versatile",
411
+ "llama-3.1-8b-instant",
412
+ "mixtral-8x7b-32768",
413
+ "gemma2-9b-it"
414
+ ],
415
+ defaultModel: "llama-3.3-70b-versatile",
416
+ pricing: {
417
+ models: {
418
+ "llama-3.3-70b-versatile": { inputCacheHit: 0, inputCacheMiss: 0.59, output: 0.79 },
419
+ "llama-3.1-8b-instant": { inputCacheHit: 0, inputCacheMiss: 0.05, output: 0.08 },
420
+ "mixtral-8x7b-32768": { inputCacheHit: 0, inputCacheMiss: 0.24, output: 0.24 },
421
+ "gemma2-9b-it": { inputCacheHit: 0, inputCacheMiss: 0.03, output: 0.03 }
422
+ },
423
+ defaults: { inputCacheHit: 0, inputCacheMiss: 0.59, output: 0.79 }
424
+ },
425
+ thinking: {
426
+ transport: "none",
427
+ defaultEnabled: false
428
+ },
429
+ defaultContextTokens: 131072
430
+ };
431
+
432
+ // src/providers/profiles/openrouter.ts
433
+ var openrouter = {
434
+ id: "openrouter",
435
+ label: "OpenRouter",
436
+ auth: {
437
+ envKey: "OPENROUTER_API_KEY",
438
+ header: "Authorization",
439
+ prefix: "Bearer "
440
+ },
441
+ endpoints: {
442
+ chat: "https://openrouter.ai/api/v1",
443
+ balance: null,
444
+ models: "/models"
445
+ },
446
+ models: [
447
+ "openai/gpt-5-mini",
448
+ "openai/gpt-5",
449
+ "anthropic/claude-sonnet-4-20250514",
450
+ "anthropic/claude-opus-4-20250514",
451
+ "google/gemini-2.5-pro",
452
+ "google/gemini-2.5-flash",
453
+ "meta-llama/llama-3.3-70b-instruct",
454
+ "deepseek/deepseek-chat",
455
+ "deepseek/deepseek-r1"
456
+ ],
457
+ defaultModel: "anthropic/claude-sonnet-4-20250514",
458
+ pricing: {
459
+ // OpenRouter pricing is per-model and changes frequently.
460
+ // Users should check https://openrouter.ai/models for current rates.
461
+ defaults: { inputCacheHit: 0, inputCacheMiss: 0, output: 0 }
462
+ },
463
+ thinking: {
464
+ transport: "none",
465
+ defaultEnabled: false
466
+ },
467
+ defaultContextTokens: 131072,
468
+ extraHeaders: {
469
+ "HTTP-Referer": "https://github.com/luckerr/luckerr",
470
+ "X-Title": "Luckerr"
471
+ }
472
+ };
473
+
474
+ // src/providers/registry.ts
475
+ var providers = /* @__PURE__ */ new Map();
476
+ var modelToProvider = /* @__PURE__ */ new Map();
477
+ function register(p) {
478
+ if (providers.has(p.id)) {
479
+ throw new Error(`Duplicate provider id: ${p.id}`);
480
+ }
481
+ providers.set(p.id, p);
482
+ for (const mid of p.models) {
483
+ if (modelToProvider.has(mid)) continue;
484
+ modelToProvider.set(mid, p.id);
485
+ }
486
+ }
487
+ register(deepseek);
488
+ register(siliconflow);
489
+ register(modelscope);
490
+ register(zhipu);
491
+ register(moonshot);
492
+ register(qwen);
493
+ register(openai);
494
+ register(anthropic);
495
+ register(groq);
496
+ register(openrouter);
497
+ function getProvider(id) {
498
+ return providers.get(id);
499
+ }
500
+ function listProviders() {
501
+ return [...providers.values()];
502
+ }
503
+ function resolveProvider(modelId) {
504
+ const pid = modelToProvider.get(modelId);
505
+ if (pid) return providers.get(pid);
506
+ for (const [prefix, providerId] of PREFIX_MAP) {
507
+ if (modelId.startsWith(prefix)) return providers.get(providerId);
508
+ }
509
+ return void 0;
510
+ }
511
+ var PREFIX_MAP = [
512
+ ["openai/", "openai"],
513
+ ["anthropic/", "anthropic"],
514
+ ["deepseek/", "deepseek"],
515
+ ["deepseek-ai/", "siliconflow"],
516
+ ["Qwen/", "siliconflow"],
517
+ ["meta-llama/", "siliconflow"],
518
+ ["THUDM/", "siliconflow"],
519
+ ["Pro/", "siliconflow"],
520
+ ["google/", "openrouter"],
521
+ ["mistral/", "openrouter"],
522
+ ["cohere/", "openrouter"],
523
+ ["microsoft/", "openrouter"],
524
+ ["amazon/", "openrouter"],
525
+ ["nvidia/", "openrouter"],
526
+ ["x-ai/", "openrouter"]
527
+ ];
528
+ function defaultProvider() {
529
+ return deepseek;
530
+ }
531
+ function pricingFor(modelId) {
532
+ const provider = resolveProvider(modelId);
533
+ if (!provider) return ZERO_PRICING;
534
+ return provider.pricing.models?.[modelId] ?? provider.pricing.defaults;
535
+ }
536
+ var ZERO_PRICING = { inputCacheHit: 0, inputCacheMiss: 0, output: 0 };
537
+ function contextTokensFor(modelId) {
538
+ const provider = resolveProvider(modelId);
539
+ if (!provider) return 131072;
540
+ return provider.contextTokens?.[modelId] ?? provider.defaultContextTokens;
541
+ }
542
+
543
+ export {
544
+ getProvider,
545
+ listProviders,
546
+ resolveProvider,
547
+ defaultProvider,
548
+ pricingFor,
549
+ contextTokensFor
550
+ };
551
+ //# sourceMappingURL=chunk-JMWHXZEL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/providers/profiles/deepseek.ts","../../src/providers/profiles/siliconflow.ts","../../src/providers/profiles/modelscope.ts","../../src/providers/profiles/zhipu.ts","../../src/providers/profiles/moonshot.ts","../../src/providers/profiles/qwen.ts","../../src/providers/profiles/openai.ts","../../src/providers/profiles/anthropic.ts","../../src/providers/profiles/groq.ts","../../src/providers/profiles/openrouter.ts","../../src/providers/registry.ts"],"sourcesContent":["/** DeepSeek provider profile. https://api.deepseek.com */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const deepseek: ProviderProfile = {\n id: \"deepseek\",\n label: \"DeepSeek\",\n auth: {\n envKey: \"DEEPSEEK_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://api.deepseek.com\",\n balance: \"/user/balance\",\n models: \"/models\",\n },\n models: [\n \"deepseek-v4-flash\",\n \"deepseek-v4-pro\",\n \"deepseek-chat\",\n \"deepseek-reasoner\",\n ],\n defaultModel: \"deepseek-v4-flash\",\n escalationModel: \"deepseek-v4-pro\",\n pricing: {\n models: {\n \"deepseek-v4-flash\": { inputCacheHit: 0.028, inputCacheMiss: 0.139, output: 0.278 },\n \"deepseek-v4-pro\": { inputCacheHit: 0.139, inputCacheMiss: 1.667, output: 3.333 },\n \"deepseek-chat\": { inputCacheHit: 0.028, inputCacheMiss: 0.139, output: 0.278 },\n \"deepseek-reasoner\": { inputCacheHit: 0.028, inputCacheMiss: 0.139, output: 0.278 },\n },\n defaults: { inputCacheHit: 0.139, inputCacheMiss: 1.667, output: 3.333 },\n },\n thinking: {\n transport: \"extra_body\",\n thinkingModels: [\"deepseek-v4-flash\", \"deepseek-v4-pro\", \"deepseek-reasoner\"],\n defaultEnabled: true,\n },\n contextTokens: {\n \"deepseek-v4-flash\": 1_000_000,\n \"deepseek-v4-pro\": 1_000_000,\n \"deepseek-chat\": 1_000_000,\n \"deepseek-reasoner\": 1_000_000,\n },\n defaultContextTokens: 131_072,\n};\n","/** 硅基流动 (SiliconFlow) provider profile. OpenAI-compatible API. https://docs.siliconflow.cn */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const siliconflow: ProviderProfile = {\n id: \"siliconflow\",\n label: \"硅基流动 (SiliconFlow)\",\n auth: {\n envKey: \"SILICONFLOW_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://api.siliconflow.cn/v1\",\n balance: \"/user/info\", // returns balance in user info\n models: \"/models\",\n },\n models: [\n \"deepseek-ai/DeepSeek-V3\",\n \"deepseek-ai/DeepSeek-R1\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"Qwen/Qwen2.5-32B-Instruct\",\n \"Qwen/Qwen2.5-14B-Instruct\",\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"meta-llama/Llama-3.1-8B-Instruct\",\n \"Pro/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n ],\n defaultModel: \"deepseek-ai/DeepSeek-V3\",\n pricing: {\n models: {\n // DeepSeek models on SiliconFlow — ¥1.00 / 1M input, ¥2.00 / 1M output ≈ $0.14 / $0.28\n \"deepseek-ai/DeepSeek-V3\": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.278 },\n \"deepseek-ai/DeepSeek-R1\": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 1.111 },\n // Qwen series — ¥0.50–4.00 / 1M tokens\n \"Qwen/Qwen2.5-72B-Instruct\": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 0.556 },\n \"Qwen/Qwen2.5-32B-Instruct\": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.278 },\n \"Qwen/Qwen2.5-14B-Instruct\": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 },\n \"Qwen/Qwen2.5-7B-Instruct\": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.069 },\n // Llama\n \"meta-llama/Llama-3.3-70B-Instruct\": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 0.556 },\n \"meta-llama/Llama-3.1-8B-Instruct\": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.069 },\n \"Pro/Llama-3.3-70B-Instruct\": { inputCacheHit: 0.833, inputCacheMiss: 0.833, output: 0.833 },\n // GLM\n \"THUDM/glm-4-9b-chat\": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.069 },\n },\n defaults: { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.278 },\n },\n thinking: {\n transport: \"none\",\n defaultEnabled: false,\n },\n defaultContextTokens: 131_072,\n};\n","/** 魔塔社区 (ModelScope) provider profile. Alibaba model hub, OpenAI-compatible. */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const modelscope: ProviderProfile = {\n id: \"modelscope\",\n label: \"魔塔社区 (ModelScope)\",\n auth: {\n envKey: \"MODELSCOPE_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://api-inference.modelscope.cn/v1\",\n balance: null,\n models: \"/models\",\n },\n models: [\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"Qwen/Qwen2.5-32B-Instruct\",\n \"Qwen/Qwen2.5-14B-Instruct\",\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"deepseek-ai/DeepSeek-V3\",\n \"deepseek-ai/DeepSeek-R1\",\n \"LLM-Research/Meta-Llama-3.1-70B-Instruct\",\n ],\n defaultModel: \"Qwen/Qwen2.5-72B-Instruct\",\n pricing: {\n defaults: { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n },\n thinking: {\n transport: \"none\",\n defaultEnabled: false,\n },\n defaultContextTokens: 131_072,\n};\n","/** 智谱AI (Zhipu) provider profile. GLM series. https://open.bigmodel.cn */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const zhipu: ProviderProfile = {\n id: \"zhipu\",\n label: \"智谱AI (Zhipu)\",\n auth: {\n envKey: \"ZHIPU_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://open.bigmodel.cn/api/paas/v4\",\n balance: null,\n models: \"/models\",\n },\n models: [\n \"glm-4-plus\",\n \"glm-4-flash\",\n \"glm-4-air\",\n \"glm-4-long\",\n \"glm-4\",\n \"glm-4v-plus\",\n \"glm-4v-flash\",\n \"glm-4v\",\n ],\n defaultModel: \"glm-4-flash\",\n pricing: {\n models: {\n \"glm-4-plus\": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 },\n \"glm-4-flash\": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n \"glm-4-air\": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 },\n \"glm-4-long\": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 },\n \"glm-4\": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 },\n \"glm-4v-plus\": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 },\n \"glm-4v-flash\":{ inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n \"glm-4v\": { inputCacheHit: 6.944, inputCacheMiss: 6.944, output: 6.944 },\n },\n defaults: { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.139 },\n },\n thinking: {\n transport: \"none\",\n defaultEnabled: false,\n },\n contextTokens: {\n \"glm-4-plus\": 128_000,\n \"glm-4-flash\": 128_000,\n \"glm-4-air\": 128_000,\n \"glm-4-long\": 1_000_000,\n \"glm-4\": 128_000,\n \"glm-4v-plus\": 128_000,\n \"glm-4v-flash\": 128_000,\n \"glm-4v\": 128_000,\n },\n defaultContextTokens: 128_000,\n};\n","/** Moonshot (Kimi) provider profile. https://platform.moonshot.cn */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const moonshot: ProviderProfile = {\n id: \"moonshot\",\n label: \"Kimi (Moonshot)\",\n auth: {\n envKey: \"MOONSHOT_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://api.moonshot.cn/v1\",\n balance: null,\n models: \"/models\",\n },\n models: [\n \"moonshot-v1-8k\",\n \"moonshot-v1-32k\",\n \"moonshot-v1-128k\",\n \"kimi-latest\",\n ],\n defaultModel: \"kimi-latest\",\n pricing: {\n models: {\n \"moonshot-v1-8k\": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n \"moonshot-v1-32k\": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n \"moonshot-v1-128k\": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n \"kimi-latest\": { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n },\n defaults: { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n },\n thinking: {\n transport: \"none\",\n defaultEnabled: false,\n },\n contextTokens: {\n \"moonshot-v1-8k\": 8_192,\n \"moonshot-v1-32k\": 32_768,\n \"moonshot-v1-128k\": 131_072,\n \"kimi-latest\": 131_072,\n },\n defaultContextTokens: 131_072,\n};\n","/** 通义千问 (Qwen/DashScope) provider profile. https://dashscope.aliyun.com */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const qwen: ProviderProfile = {\n id: \"qwen\",\n label: \"通义千问 (Qwen/DashScope)\",\n auth: {\n envKey: \"DASHSCOPE_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://dashscope.aliyuncs.com/compatible-mode/v1\",\n balance: null,\n models: null,\n },\n models: [\n \"qwen-max\",\n \"qwen-plus\",\n \"qwen-turbo\",\n \"qwen-long\",\n \"qwen2.5-72b-instruct\",\n \"qwen2.5-32b-instruct\",\n \"qwen2.5-14b-instruct\",\n \"qwen2.5-7b-instruct\",\n \"qwq-plus\",\n ],\n defaultModel: \"qwen-plus\",\n pricing: {\n models: {\n \"qwen-max\": { inputCacheHit: 2.778, inputCacheMiss: 2.778, output: 8.333 },\n \"qwen-plus\": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.833 },\n \"qwen-turbo\": { inputCacheHit: 0.042, inputCacheMiss: 0.042, output: 0.167 },\n \"qwen-long\": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.278 },\n \"qwen2.5-72b-instruct\": { inputCacheHit: 0.556, inputCacheMiss: 0.556, output: 1.111 },\n \"qwen2.5-32b-instruct\": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.556 },\n \"qwen2.5-14b-instruct\": { inputCacheHit: 0.139, inputCacheMiss: 0.139, output: 0.278 },\n \"qwen2.5-7b-instruct\": { inputCacheHit: 0.069, inputCacheMiss: 0.069, output: 0.139 },\n \"qwq-plus\": { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.833 },\n },\n defaults: { inputCacheHit: 0.278, inputCacheMiss: 0.278, output: 0.833 },\n },\n thinking: {\n transport: \"none\",\n defaultEnabled: false,\n },\n contextTokens: {\n \"qwen-max\": 32_768,\n \"qwen-plus\": 131_072,\n \"qwen-turbo\": 131_072,\n \"qwen-long\": 10_000_000,\n \"qwq-plus\": 131_072,\n },\n defaultContextTokens: 131_072,\n};\n","/** OpenAI provider profile. https://api.openai.com/v1 */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const openai: ProviderProfile = {\n id: \"openai\",\n label: \"OpenAI\",\n auth: {\n envKey: \"OPENAI_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://api.openai.com/v1\",\n balance: null,\n models: \"/models\",\n },\n models: [\n \"gpt-5\",\n \"gpt-5-mini\",\n \"gpt-5-nano\",\n \"gpt-4.1\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-nano\",\n \"o4-mini\",\n \"o3\",\n \"o3-mini\",\n ],\n defaultModel: \"gpt-5-mini\",\n pricing: {\n models: {\n \"gpt-5\": { inputCacheHit: 0.625, inputCacheMiss: 2.50, output: 5.00 },\n \"gpt-5-mini\": { inputCacheHit: 0.075, inputCacheMiss: 0.30, output: 0.60 },\n \"gpt-5-nano\": { inputCacheHit: 0.025, inputCacheMiss: 0.10, output: 0.20 },\n \"gpt-4.1\": { inputCacheHit: 0.50, inputCacheMiss: 2.00, output: 8.00 },\n \"gpt-4.1-mini\":{ inputCacheHit: 0.10, inputCacheMiss: 0.40, output: 1.60 },\n \"gpt-4.1-nano\":{ inputCacheHit: 0.025, inputCacheMiss: 0.10, output: 0.40 },\n \"o4-mini\": { inputCacheHit: 0.275, inputCacheMiss: 1.10, output: 4.40 },\n \"o3\": { inputCacheHit: 1.25, inputCacheMiss: 5.00, output: 20.00 },\n \"o3-mini\": { inputCacheHit: 0.275, inputCacheMiss: 1.10, output: 4.40 },\n },\n defaults: { inputCacheHit: 0.30, inputCacheMiss: 1.20, output: 2.40 },\n },\n thinking: {\n transport: \"reasoning_effort\",\n thinkingModels: [\"o4-mini\", \"o3\", \"o3-mini\", \"gpt-5\"],\n defaultEnabled: true,\n },\n contextTokens: {\n \"gpt-5\": 400_000,\n \"gpt-5-mini\": 400_000,\n \"gpt-5-nano\": 400_000,\n \"gpt-4.1\": 1_000_000,\n \"gpt-4.1-mini\": 1_000_000,\n \"gpt-4.1-nano\": 1_000_000,\n \"o4-mini\": 200_000,\n \"o3\": 200_000,\n \"o3-mini\": 200_000,\n },\n defaultContextTokens: 131_072,\n};\n","/** Anthropic provider profile. Uses x-api-key auth. Anthropic's Messages API needs a translation adapter (TBD). */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const anthropic: ProviderProfile = {\n id: \"anthropic\",\n label: \"Anthropic\",\n auth: {\n envKey: \"ANTHROPIC_API_KEY\",\n header: \"x-api-key\",\n prefix: \"\",\n },\n endpoints: {\n chat: \"https://api.anthropic.com/v1\",\n balance: null,\n models: null,\n },\n models: [\n \"claude-sonnet-4-20250514\",\n \"claude-opus-4-20250514\",\n \"claude-3.5-haiku-20241022\",\n ],\n defaultModel: \"claude-sonnet-4-20250514\",\n pricing: {\n models: {\n \"claude-sonnet-4-20250514\": { inputCacheHit: 0.30, inputCacheMiss: 3.00, output: 15.00 },\n \"claude-opus-4-20250514\": { inputCacheHit: 1.50, inputCacheMiss: 15.00, output: 75.00 },\n \"claude-3.5-haiku-20241022\":{ inputCacheHit: 0.08, inputCacheMiss: 0.80, output: 4.00 },\n },\n defaults: { inputCacheHit: 0.30, inputCacheMiss: 3.00, output: 15.00 },\n },\n thinking: {\n transport: \"include\",\n thinkingModels: [\n \"claude-sonnet-4-20250514\",\n \"claude-opus-4-20250514\",\n ],\n defaultEnabled: true,\n },\n contextTokens: {\n \"claude-sonnet-4-20250514\": 200_000,\n \"claude-opus-4-20250514\": 200_000,\n \"claude-3.5-haiku-20241022\": 200_000,\n },\n defaultContextTokens: 200_000,\n extraHeaders: {\n \"anthropic-version\": \"2023-06-01\",\n },\n};\n","/** Groq provider profile. OpenAI-compatible. https://groq.com */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const groq: ProviderProfile = {\n id: \"groq\",\n label: \"Groq\",\n auth: {\n envKey: \"GROQ_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://api.groq.com/openai/v1\",\n balance: null,\n models: \"/models\",\n },\n models: [\n \"llama-3.3-70b-versatile\",\n \"llama-3.1-8b-instant\",\n \"mixtral-8x7b-32768\",\n \"gemma2-9b-it\",\n ],\n defaultModel: \"llama-3.3-70b-versatile\",\n pricing: {\n models: {\n \"llama-3.3-70b-versatile\": { inputCacheHit: 0, inputCacheMiss: 0.59, output: 0.79 },\n \"llama-3.1-8b-instant\": { inputCacheHit: 0, inputCacheMiss: 0.05, output: 0.08 },\n \"mixtral-8x7b-32768\": { inputCacheHit: 0, inputCacheMiss: 0.24, output: 0.24 },\n \"gemma2-9b-it\": { inputCacheHit: 0, inputCacheMiss: 0.03, output: 0.03 },\n },\n defaults: { inputCacheHit: 0, inputCacheMiss: 0.59, output: 0.79 },\n },\n thinking: {\n transport: \"none\",\n defaultEnabled: false,\n },\n defaultContextTokens: 131_072,\n};\n","/** OpenRouter provider profile. Unified API gateway. https://openrouter.ai */\nimport type { ProviderProfile } from \"../types.js\";\n\nexport const openrouter: ProviderProfile = {\n id: \"openrouter\",\n label: \"OpenRouter\",\n auth: {\n envKey: \"OPENROUTER_API_KEY\",\n header: \"Authorization\",\n prefix: \"Bearer \",\n },\n endpoints: {\n chat: \"https://openrouter.ai/api/v1\",\n balance: null,\n models: \"/models\",\n },\n models: [\n \"openai/gpt-5-mini\",\n \"openai/gpt-5\",\n \"anthropic/claude-sonnet-4-20250514\",\n \"anthropic/claude-opus-4-20250514\",\n \"google/gemini-2.5-pro\",\n \"google/gemini-2.5-flash\",\n \"meta-llama/llama-3.3-70b-instruct\",\n \"deepseek/deepseek-chat\",\n \"deepseek/deepseek-r1\",\n ],\n defaultModel: \"anthropic/claude-sonnet-4-20250514\",\n pricing: {\n // OpenRouter pricing is per-model and changes frequently.\n // Users should check https://openrouter.ai/models for current rates.\n defaults: { inputCacheHit: 0, inputCacheMiss: 0, output: 0 },\n },\n thinking: {\n transport: \"none\",\n defaultEnabled: false,\n },\n defaultContextTokens: 131_072,\n extraHeaders: {\n \"HTTP-Referer\": \"https://github.com/luckerr/luckerr\",\n \"X-Title\": \"Luckerr\",\n },\n};\n","/** Provider registry — maps model ids to provider profiles. Call registerProvider() to add custom providers. */\n\nimport type { ProviderProfile } from \"./types.js\";\n\n// Built-in profiles\nimport { deepseek } from \"./profiles/deepseek.js\";\nimport { siliconflow } from \"./profiles/siliconflow.js\";\nimport { modelscope } from \"./profiles/modelscope.js\";\nimport { zhipu } from \"./profiles/zhipu.js\";\nimport { moonshot } from \"./profiles/moonshot.js\";\nimport { qwen } from \"./profiles/qwen.js\";\nimport { openai } from \"./profiles/openai.js\";\nimport { anthropic } from \"./profiles/anthropic.js\";\nimport { groq } from \"./profiles/groq.js\";\nimport { openrouter } from \"./profiles/openrouter.js\";\n\nconst providers = new Map<string, ProviderProfile>();\n\n/** Map from model id → provider id, built lazily. */\nconst modelToProvider = new Map<string, string>();\n\nfunction register(p: ProviderProfile): void {\n if (providers.has(p.id)) {\n throw new Error(`Duplicate provider id: ${p.id}`);\n }\n providers.set(p.id, p);\n for (const mid of p.models) {\n if (modelToProvider.has(mid)) continue;\n modelToProvider.set(mid, p.id);\n }\n}\n\n// Register built-ins.\nregister(deepseek);\nregister(siliconflow);\nregister(modelscope);\nregister(zhipu);\nregister(moonshot);\nregister(qwen);\nregister(openai);\nregister(anthropic);\nregister(groq);\nregister(openrouter);\n\n/** Register a custom or third-party provider at runtime. */\nexport function registerProvider(profile: ProviderProfile): void {\n register(profile);\n}\n\n/** Unregister a provider by id. */\nexport function unregisterProvider(id: string): boolean {\n const p = providers.get(id);\n if (!p) return false;\n for (const mid of p.models) {\n if (modelToProvider.get(mid) === id) modelToProvider.delete(mid);\n }\n return providers.delete(id);\n}\n\n/** Get a provider profile by id. */\nexport function getProvider(id: string): ProviderProfile | undefined {\n return providers.get(id);\n}\n\n/** List all registered provider profiles. */\nexport function listProviders(): ProviderProfile[] {\n return [...providers.values()];\n}\n\n/**\n * Resolve which provider owns a given model id.\n * Returns undefined for unknown models — callers should fall back\n * to the default provider (\"deepseek\").\n */\nexport function resolveProvider(modelId: string): ProviderProfile | undefined {\n const pid = modelToProvider.get(modelId);\n if (pid) return providers.get(pid);\n\n // Prefix-based fallback for OpenRouter-style model ids.\n for (const [prefix, providerId] of PREFIX_MAP) {\n if (modelId.startsWith(prefix)) return providers.get(providerId);\n }\n\n return undefined;\n}\n\nconst PREFIX_MAP: [string, string][] = [\n [\"openai/\", \"openai\"],\n [\"anthropic/\", \"anthropic\"],\n [\"deepseek/\", \"deepseek\"],\n [\"deepseek-ai/\", \"siliconflow\"],\n [\"Qwen/\", \"siliconflow\"],\n [\"meta-llama/\", \"siliconflow\"],\n [\"THUDM/\", \"siliconflow\"],\n [\"Pro/\", \"siliconflow\"],\n [\"google/\", \"openrouter\"],\n [\"mistral/\", \"openrouter\"],\n [\"cohere/\", \"openrouter\"],\n [\"microsoft/\", \"openrouter\"],\n [\"amazon/\", \"openrouter\"],\n [\"nvidia/\", \"openrouter\"],\n [\"x-ai/\", \"openrouter\"],\n];\n\n/** The default provider (DeepSeek), used when no provider can be resolved. */\nexport function defaultProvider(): ProviderProfile {\n return deepseek;\n}\n\n/**\n * Pricing for a given model. Falls back: model-specific → provider\n * defaults → all-zeros for completely unknown models.\n */\nexport function pricingFor(modelId: string): {\n inputCacheHit: number;\n inputCacheMiss: number;\n output: number;\n} {\n const provider = resolveProvider(modelId);\n if (!provider) return ZERO_PRICING;\n return provider.pricing.models?.[modelId] ?? provider.pricing.defaults;\n}\n\nconst ZERO_PRICING = { inputCacheHit: 0, inputCacheMiss: 0, output: 0 };\n\n/** Context window size for a given model, resolved through the registry. */\nexport function contextTokensFor(modelId: string): number {\n const provider = resolveProvider(modelId);\n if (!provider) return 131_072;\n return provider.contextTokens?.[modelId] ?? provider.defaultContextTokens;\n}\n"],"mappings":";;;;AAGO,IAAM,WAA4B;AAAA,EACvC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AAAA,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AAAA,EACA,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,SAAS;AAAA,IACP,QAAQ;AAAA,MACN,qBAAqB,EAAE,eAAe,OAAO,gBAAgB,OAAO,QAAQ,MAAM;AAAA,MAClF,mBAAqB,EAAE,eAAe,OAAO,gBAAgB,OAAO,QAAQ,MAAM;AAAA,MAClF,iBAAqB,EAAE,eAAe,OAAO,gBAAgB,OAAO,QAAQ,MAAM;AAAA,MAClF,qBAAqB,EAAE,eAAe,OAAO,gBAAgB,OAAO,QAAQ,MAAM;AAAA,IACpF;AAAA,IACA,UAAU,EAAE,eAAe,OAAO,gBAAgB,OAAO,QAAQ,MAAM;AAAA,EACzE;AAAA,EACA,UAAU;AAAA,IACR,WAAW;AAAA,IACX,gBAAgB,CAAC,qBAAqB,mBAAmB,mBAAmB;AAAA,IAC5E,gBAAgB;AAAA,EAClB;AAAA,EACA,eAAe;AAAA,IACb,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,EACvB;AAAA,EACA,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