@shareai-lab/kode 1.0.69 → 1.0.71

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 (253) hide show
  1. package/README.md +205 -72
  2. package/README.zh-CN.md +246 -0
  3. package/cli.js +62 -0
  4. package/package.json +45 -25
  5. package/scripts/postinstall.js +56 -0
  6. package/src/ProjectOnboarding.tsx +180 -0
  7. package/src/Tool.ts +53 -0
  8. package/src/commands/approvedTools.ts +53 -0
  9. package/src/commands/bug.tsx +20 -0
  10. package/src/commands/clear.ts +43 -0
  11. package/src/commands/compact.ts +120 -0
  12. package/src/commands/config.tsx +19 -0
  13. package/src/commands/cost.ts +18 -0
  14. package/src/commands/ctx_viz.ts +209 -0
  15. package/src/commands/doctor.ts +24 -0
  16. package/src/commands/help.tsx +19 -0
  17. package/src/commands/init.ts +37 -0
  18. package/src/commands/listen.ts +42 -0
  19. package/src/commands/login.tsx +51 -0
  20. package/src/commands/logout.tsx +40 -0
  21. package/src/commands/mcp.ts +41 -0
  22. package/src/commands/model.tsx +40 -0
  23. package/src/commands/modelstatus.tsx +20 -0
  24. package/src/commands/onboarding.tsx +34 -0
  25. package/src/commands/pr_comments.ts +59 -0
  26. package/src/commands/refreshCommands.ts +54 -0
  27. package/src/commands/release-notes.ts +34 -0
  28. package/src/commands/resume.tsx +30 -0
  29. package/src/commands/review.ts +49 -0
  30. package/src/commands/terminalSetup.ts +221 -0
  31. package/src/commands.ts +136 -0
  32. package/src/components/ApproveApiKey.tsx +93 -0
  33. package/src/components/AsciiLogo.tsx +13 -0
  34. package/src/components/AutoUpdater.tsx +148 -0
  35. package/src/components/Bug.tsx +367 -0
  36. package/src/components/Config.tsx +289 -0
  37. package/src/components/ConsoleOAuthFlow.tsx +326 -0
  38. package/src/components/Cost.tsx +23 -0
  39. package/src/components/CostThresholdDialog.tsx +46 -0
  40. package/src/components/CustomSelect/option-map.ts +42 -0
  41. package/src/components/CustomSelect/select-option.tsx +52 -0
  42. package/src/components/CustomSelect/select.tsx +143 -0
  43. package/src/components/CustomSelect/use-select-state.ts +414 -0
  44. package/src/components/CustomSelect/use-select.ts +35 -0
  45. package/src/components/FallbackToolUseRejectedMessage.tsx +15 -0
  46. package/src/components/FileEditToolUpdatedMessage.tsx +66 -0
  47. package/src/components/Help.tsx +215 -0
  48. package/src/components/HighlightedCode.tsx +33 -0
  49. package/src/components/InvalidConfigDialog.tsx +113 -0
  50. package/src/components/Link.tsx +32 -0
  51. package/src/components/LogSelector.tsx +86 -0
  52. package/src/components/Logo.tsx +145 -0
  53. package/src/components/MCPServerApprovalDialog.tsx +100 -0
  54. package/src/components/MCPServerDialogCopy.tsx +25 -0
  55. package/src/components/MCPServerMultiselectDialog.tsx +109 -0
  56. package/src/components/Message.tsx +219 -0
  57. package/src/components/MessageResponse.tsx +15 -0
  58. package/src/components/MessageSelector.tsx +211 -0
  59. package/src/components/ModeIndicator.tsx +88 -0
  60. package/src/components/ModelConfig.tsx +301 -0
  61. package/src/components/ModelListManager.tsx +223 -0
  62. package/src/components/ModelSelector.tsx +3208 -0
  63. package/src/components/ModelStatusDisplay.tsx +228 -0
  64. package/src/components/Onboarding.tsx +274 -0
  65. package/src/components/PressEnterToContinue.tsx +11 -0
  66. package/src/components/PromptInput.tsx +710 -0
  67. package/src/components/SentryErrorBoundary.ts +33 -0
  68. package/src/components/Spinner.tsx +129 -0
  69. package/src/components/StructuredDiff.tsx +184 -0
  70. package/src/components/TextInput.tsx +246 -0
  71. package/src/components/TokenWarning.tsx +31 -0
  72. package/src/components/ToolUseLoader.tsx +40 -0
  73. package/src/components/TrustDialog.tsx +106 -0
  74. package/src/components/binary-feedback/BinaryFeedback.tsx +63 -0
  75. package/src/components/binary-feedback/BinaryFeedbackOption.tsx +111 -0
  76. package/src/components/binary-feedback/BinaryFeedbackView.tsx +172 -0
  77. package/src/components/binary-feedback/utils.ts +220 -0
  78. package/src/components/messages/AssistantBashOutputMessage.tsx +22 -0
  79. package/src/components/messages/AssistantLocalCommandOutputMessage.tsx +45 -0
  80. package/src/components/messages/AssistantRedactedThinkingMessage.tsx +19 -0
  81. package/src/components/messages/AssistantTextMessage.tsx +144 -0
  82. package/src/components/messages/AssistantThinkingMessage.tsx +40 -0
  83. package/src/components/messages/AssistantToolUseMessage.tsx +123 -0
  84. package/src/components/messages/UserBashInputMessage.tsx +28 -0
  85. package/src/components/messages/UserCommandMessage.tsx +30 -0
  86. package/src/components/messages/UserKodingInputMessage.tsx +28 -0
  87. package/src/components/messages/UserPromptMessage.tsx +35 -0
  88. package/src/components/messages/UserTextMessage.tsx +39 -0
  89. package/src/components/messages/UserToolResultMessage/UserToolCanceledMessage.tsx +12 -0
  90. package/src/components/messages/UserToolResultMessage/UserToolErrorMessage.tsx +36 -0
  91. package/src/components/messages/UserToolResultMessage/UserToolRejectMessage.tsx +31 -0
  92. package/src/components/messages/UserToolResultMessage/UserToolResultMessage.tsx +57 -0
  93. package/src/components/messages/UserToolResultMessage/UserToolSuccessMessage.tsx +35 -0
  94. package/src/components/messages/UserToolResultMessage/utils.tsx +56 -0
  95. package/src/components/permissions/BashPermissionRequest/BashPermissionRequest.tsx +121 -0
  96. package/src/components/permissions/FallbackPermissionRequest.tsx +155 -0
  97. package/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.tsx +182 -0
  98. package/src/components/permissions/FileEditPermissionRequest/FileEditToolDiff.tsx +75 -0
  99. package/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.tsx +164 -0
  100. package/src/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.tsx +81 -0
  101. package/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.tsx +242 -0
  102. package/src/components/permissions/PermissionRequest.tsx +103 -0
  103. package/src/components/permissions/PermissionRequestTitle.tsx +69 -0
  104. package/src/components/permissions/hooks.ts +44 -0
  105. package/src/components/permissions/toolUseOptions.ts +59 -0
  106. package/src/components/permissions/utils.ts +23 -0
  107. package/src/constants/betas.ts +5 -0
  108. package/src/constants/claude-asterisk-ascii-art.tsx +238 -0
  109. package/src/constants/figures.ts +4 -0
  110. package/src/constants/keys.ts +3 -0
  111. package/src/constants/macros.ts +6 -0
  112. package/src/constants/models.ts +935 -0
  113. package/src/constants/oauth.ts +18 -0
  114. package/src/constants/product.ts +17 -0
  115. package/src/constants/prompts.ts +177 -0
  116. package/src/constants/releaseNotes.ts +7 -0
  117. package/src/context/PermissionContext.tsx +149 -0
  118. package/src/context.ts +278 -0
  119. package/src/cost-tracker.ts +84 -0
  120. package/src/entrypoints/cli.tsx +1498 -0
  121. package/src/entrypoints/mcp.ts +176 -0
  122. package/src/history.ts +25 -0
  123. package/src/hooks/useApiKeyVerification.ts +59 -0
  124. package/src/hooks/useArrowKeyHistory.ts +55 -0
  125. package/src/hooks/useCanUseTool.ts +138 -0
  126. package/src/hooks/useCancelRequest.ts +39 -0
  127. package/src/hooks/useDoublePress.ts +42 -0
  128. package/src/hooks/useExitOnCtrlCD.ts +31 -0
  129. package/src/hooks/useInterval.ts +25 -0
  130. package/src/hooks/useLogMessages.ts +16 -0
  131. package/src/hooks/useLogStartupTime.ts +12 -0
  132. package/src/hooks/useNotifyAfterTimeout.ts +65 -0
  133. package/src/hooks/usePermissionRequestLogging.ts +44 -0
  134. package/src/hooks/useSlashCommandTypeahead.ts +137 -0
  135. package/src/hooks/useTerminalSize.ts +49 -0
  136. package/src/hooks/useTextInput.ts +315 -0
  137. package/src/messages.ts +37 -0
  138. package/src/permissions.ts +268 -0
  139. package/src/query.ts +704 -0
  140. package/src/screens/ConfigureNpmPrefix.tsx +197 -0
  141. package/src/screens/Doctor.tsx +219 -0
  142. package/src/screens/LogList.tsx +68 -0
  143. package/src/screens/REPL.tsx +792 -0
  144. package/src/screens/ResumeConversation.tsx +68 -0
  145. package/src/services/browserMocks.ts +66 -0
  146. package/src/services/claude.ts +1947 -0
  147. package/src/services/customCommands.ts +683 -0
  148. package/src/services/fileFreshness.ts +377 -0
  149. package/src/services/mcpClient.ts +564 -0
  150. package/src/services/mcpServerApproval.tsx +50 -0
  151. package/src/services/notifier.ts +40 -0
  152. package/src/services/oauth.ts +357 -0
  153. package/src/services/openai.ts +796 -0
  154. package/src/services/sentry.ts +3 -0
  155. package/src/services/statsig.ts +171 -0
  156. package/src/services/statsigStorage.ts +86 -0
  157. package/src/services/systemReminder.ts +406 -0
  158. package/src/services/vcr.ts +161 -0
  159. package/src/tools/ArchitectTool/ArchitectTool.tsx +122 -0
  160. package/src/tools/ArchitectTool/prompt.ts +15 -0
  161. package/src/tools/AskExpertModelTool/AskExpertModelTool.tsx +505 -0
  162. package/src/tools/BashTool/BashTool.tsx +270 -0
  163. package/src/tools/BashTool/BashToolResultMessage.tsx +38 -0
  164. package/src/tools/BashTool/OutputLine.tsx +48 -0
  165. package/src/tools/BashTool/prompt.ts +174 -0
  166. package/src/tools/BashTool/utils.ts +56 -0
  167. package/src/tools/FileEditTool/FileEditTool.tsx +316 -0
  168. package/src/tools/FileEditTool/prompt.ts +51 -0
  169. package/src/tools/FileEditTool/utils.ts +58 -0
  170. package/src/tools/FileReadTool/FileReadTool.tsx +371 -0
  171. package/src/tools/FileReadTool/prompt.ts +7 -0
  172. package/src/tools/FileWriteTool/FileWriteTool.tsx +297 -0
  173. package/src/tools/FileWriteTool/prompt.ts +10 -0
  174. package/src/tools/GlobTool/GlobTool.tsx +119 -0
  175. package/src/tools/GlobTool/prompt.ts +8 -0
  176. package/src/tools/GrepTool/GrepTool.tsx +147 -0
  177. package/src/tools/GrepTool/prompt.ts +11 -0
  178. package/src/tools/MCPTool/MCPTool.tsx +106 -0
  179. package/src/tools/MCPTool/prompt.ts +3 -0
  180. package/src/tools/MemoryReadTool/MemoryReadTool.tsx +127 -0
  181. package/src/tools/MemoryReadTool/prompt.ts +3 -0
  182. package/src/tools/MemoryWriteTool/MemoryWriteTool.tsx +89 -0
  183. package/src/tools/MemoryWriteTool/prompt.ts +3 -0
  184. package/src/tools/MultiEditTool/MultiEditTool.tsx +366 -0
  185. package/src/tools/MultiEditTool/prompt.ts +45 -0
  186. package/src/tools/NotebookEditTool/NotebookEditTool.tsx +298 -0
  187. package/src/tools/NotebookEditTool/prompt.ts +3 -0
  188. package/src/tools/NotebookReadTool/NotebookReadTool.tsx +266 -0
  189. package/src/tools/NotebookReadTool/prompt.ts +3 -0
  190. package/src/tools/StickerRequestTool/StickerRequestTool.tsx +93 -0
  191. package/src/tools/StickerRequestTool/prompt.ts +19 -0
  192. package/src/tools/TaskTool/TaskTool.tsx +382 -0
  193. package/src/tools/TaskTool/constants.ts +1 -0
  194. package/src/tools/TaskTool/prompt.ts +56 -0
  195. package/src/tools/ThinkTool/ThinkTool.tsx +56 -0
  196. package/src/tools/ThinkTool/prompt.ts +12 -0
  197. package/src/tools/TodoWriteTool/TodoWriteTool.tsx +289 -0
  198. package/src/tools/TodoWriteTool/prompt.ts +63 -0
  199. package/src/tools/lsTool/lsTool.tsx +269 -0
  200. package/src/tools/lsTool/prompt.ts +2 -0
  201. package/src/tools.ts +63 -0
  202. package/src/types/PermissionMode.ts +120 -0
  203. package/src/types/RequestContext.ts +72 -0
  204. package/src/utils/Cursor.ts +436 -0
  205. package/src/utils/PersistentShell.ts +373 -0
  206. package/src/utils/agentStorage.ts +97 -0
  207. package/src/utils/array.ts +3 -0
  208. package/src/utils/ask.tsx +98 -0
  209. package/src/utils/auth.ts +13 -0
  210. package/src/utils/autoCompactCore.ts +223 -0
  211. package/src/utils/autoUpdater.ts +318 -0
  212. package/src/utils/betas.ts +20 -0
  213. package/src/utils/browser.ts +14 -0
  214. package/src/utils/cleanup.ts +72 -0
  215. package/src/utils/commands.ts +261 -0
  216. package/src/utils/config.ts +771 -0
  217. package/src/utils/conversationRecovery.ts +54 -0
  218. package/src/utils/debugLogger.ts +1123 -0
  219. package/src/utils/diff.ts +42 -0
  220. package/src/utils/env.ts +57 -0
  221. package/src/utils/errors.ts +21 -0
  222. package/src/utils/exampleCommands.ts +108 -0
  223. package/src/utils/execFileNoThrow.ts +51 -0
  224. package/src/utils/expertChatStorage.ts +136 -0
  225. package/src/utils/file.ts +402 -0
  226. package/src/utils/fileRecoveryCore.ts +71 -0
  227. package/src/utils/format.tsx +44 -0
  228. package/src/utils/generators.ts +62 -0
  229. package/src/utils/git.ts +92 -0
  230. package/src/utils/globalLogger.ts +77 -0
  231. package/src/utils/http.ts +10 -0
  232. package/src/utils/imagePaste.ts +38 -0
  233. package/src/utils/json.ts +13 -0
  234. package/src/utils/log.ts +382 -0
  235. package/src/utils/markdown.ts +213 -0
  236. package/src/utils/messageContextManager.ts +289 -0
  237. package/src/utils/messages.tsx +938 -0
  238. package/src/utils/model.ts +836 -0
  239. package/src/utils/permissions/filesystem.ts +118 -0
  240. package/src/utils/ripgrep.ts +167 -0
  241. package/src/utils/sessionState.ts +49 -0
  242. package/src/utils/state.ts +25 -0
  243. package/src/utils/style.ts +29 -0
  244. package/src/utils/terminal.ts +49 -0
  245. package/src/utils/theme.ts +122 -0
  246. package/src/utils/thinking.ts +144 -0
  247. package/src/utils/todoStorage.ts +431 -0
  248. package/src/utils/tokens.ts +43 -0
  249. package/src/utils/toolExecutionController.ts +163 -0
  250. package/src/utils/unaryLogging.ts +26 -0
  251. package/src/utils/user.ts +37 -0
  252. package/src/utils/validate.ts +165 -0
  253. package/cli.mjs +0 -1803
@@ -0,0 +1,935 @@
1
+ export default {
2
+ openai: [
3
+ {
4
+ model: 'gpt-4',
5
+ max_tokens: 4096,
6
+ max_input_tokens: 8192,
7
+ max_output_tokens: 4096,
8
+ input_cost_per_token: 0.00003,
9
+ output_cost_per_token: 0.00006,
10
+ provider: 'openai',
11
+ mode: 'chat',
12
+ supports_function_calling: true,
13
+ supports_prompt_caching: true,
14
+ supports_system_messages: true,
15
+ supports_tool_choice: true,
16
+ },
17
+ {
18
+ model: 'gpt-4o',
19
+ max_tokens: 16384,
20
+ max_input_tokens: 128000,
21
+ max_output_tokens: 16384,
22
+ input_cost_per_token: 0.0000025,
23
+ output_cost_per_token: 0.00001,
24
+ input_cost_per_token_batches: 0.00000125,
25
+ output_cost_per_token_batches: 0.000005,
26
+ cache_read_input_token_cost: 0.00000125,
27
+ provider: 'openai',
28
+ mode: 'chat',
29
+ supports_function_calling: true,
30
+ supports_parallel_function_calling: true,
31
+ supports_response_schema: true,
32
+ supports_vision: true,
33
+ supports_prompt_caching: true,
34
+ supports_system_messages: true,
35
+ supports_tool_choice: true,
36
+ },
37
+ {
38
+ model: 'gpt-4.5-preview',
39
+ max_tokens: 16384,
40
+ max_input_tokens: 128000,
41
+ max_output_tokens: 16384,
42
+ input_cost_per_token: 0.000075,
43
+ output_cost_per_token: 0.00015,
44
+ input_cost_per_token_batches: 0.0000375,
45
+ output_cost_per_token_batches: 0.000075,
46
+ cache_read_input_token_cost: 0.0000375,
47
+ provider: 'openai',
48
+ mode: 'chat',
49
+ supports_function_calling: true,
50
+ supports_parallel_function_calling: true,
51
+ supports_response_schema: true,
52
+ supports_vision: true,
53
+ supports_prompt_caching: true,
54
+ supports_system_messages: true,
55
+ supports_tool_choice: true,
56
+ },
57
+ {
58
+ model: 'gpt-4.5-preview-2025-02-27',
59
+ max_tokens: 16384,
60
+ max_input_tokens: 128000,
61
+ max_output_tokens: 16384,
62
+ input_cost_per_token: 0.000075,
63
+ output_cost_per_token: 0.00015,
64
+ input_cost_per_token_batches: 0.0000375,
65
+ output_cost_per_token_batches: 0.000075,
66
+ cache_read_input_token_cost: 0.0000375,
67
+ provider: 'openai',
68
+ mode: 'chat',
69
+ supports_function_calling: true,
70
+ supports_parallel_function_calling: true,
71
+ supports_response_schema: true,
72
+ supports_vision: true,
73
+ supports_prompt_caching: true,
74
+ supports_system_messages: true,
75
+ supports_tool_choice: true,
76
+ },
77
+ {
78
+ model: 'gpt-4o-mini',
79
+ max_tokens: 16384,
80
+ max_input_tokens: 128000,
81
+ max_output_tokens: 16384,
82
+ input_cost_per_token: 1.5e-7,
83
+ output_cost_per_token: 6e-7,
84
+ input_cost_per_token_batches: 7.5e-8,
85
+ output_cost_per_token_batches: 3e-7,
86
+ cache_read_input_token_cost: 7.5e-8,
87
+ provider: 'openai',
88
+ mode: 'chat',
89
+ supports_function_calling: true,
90
+ supports_parallel_function_calling: true,
91
+ supports_response_schema: true,
92
+ supports_vision: true,
93
+ supports_prompt_caching: true,
94
+ supports_system_messages: true,
95
+ supports_tool_choice: true,
96
+ },
97
+ {
98
+ model: 'gpt-4o-mini-2024-07-18',
99
+ max_tokens: 16384,
100
+ max_input_tokens: 128000,
101
+ max_output_tokens: 16384,
102
+ input_cost_per_token: 1.5e-7,
103
+ output_cost_per_token: 6e-7,
104
+ input_cost_per_token_batches: 7.5e-8,
105
+ output_cost_per_token_batches: 3e-7,
106
+ cache_read_input_token_cost: 7.5e-8,
107
+ provider: 'openai',
108
+ mode: 'chat',
109
+ supports_function_calling: true,
110
+ supports_parallel_function_calling: true,
111
+ supports_response_schema: true,
112
+ supports_vision: true,
113
+ supports_prompt_caching: true,
114
+ supports_system_messages: true,
115
+ supports_tool_choice: true,
116
+ },
117
+ {
118
+ model: 'o1',
119
+ max_tokens: 100000,
120
+ max_input_tokens: 200000,
121
+ max_output_tokens: 100000,
122
+ input_cost_per_token: 0.000015,
123
+ output_cost_per_token: 0.00006,
124
+ cache_read_input_token_cost: 0.0000075,
125
+ provider: 'openai',
126
+ mode: 'chat',
127
+ supports_function_calling: true,
128
+ supports_parallel_function_calling: true,
129
+ supports_vision: true,
130
+ supports_prompt_caching: true,
131
+ supports_system_messages: true,
132
+ supports_response_schema: true,
133
+ supports_tool_choice: true,
134
+ supports_reasoning_effort: true,
135
+ },
136
+ {
137
+ model: 'o3-mini',
138
+ max_tokens: 100000,
139
+ max_input_tokens: 200000,
140
+ max_output_tokens: 100000,
141
+ input_cost_per_token: 0.0000011,
142
+ output_cost_per_token: 0.0000044,
143
+ cache_read_input_token_cost: 5.5e-7,
144
+ provider: 'openai',
145
+ mode: 'chat',
146
+ supports_function_calling: true,
147
+ supports_parallel_function_calling: false,
148
+ supports_vision: false,
149
+ supports_prompt_caching: true,
150
+ supports_response_schema: true,
151
+ supports_tool_choice: true,
152
+ supports_reasoning_effort: true,
153
+ },
154
+ {
155
+ model: 'o3-mini-2025-01-31',
156
+ max_tokens: 100000,
157
+ max_input_tokens: 200000,
158
+ max_output_tokens: 100000,
159
+ input_cost_per_token: 0.0000011,
160
+ output_cost_per_token: 0.0000044,
161
+ cache_read_input_token_cost: 5.5e-7,
162
+ provider: 'openai',
163
+ mode: 'chat',
164
+ supports_function_calling: true,
165
+ supports_parallel_function_calling: false,
166
+ supports_vision: false,
167
+ supports_prompt_caching: true,
168
+ supports_response_schema: true,
169
+ supports_tool_choice: true,
170
+ supports_reasoning_effort: true,
171
+ },
172
+ {
173
+ model: 'o1-2024-12-17',
174
+ max_tokens: 100000,
175
+ max_input_tokens: 200000,
176
+ max_output_tokens: 100000,
177
+ input_cost_per_token: 0.000015,
178
+ output_cost_per_token: 0.00006,
179
+ cache_read_input_token_cost: 0.0000075,
180
+ provider: 'openai',
181
+ mode: 'chat',
182
+ supports_function_calling: true,
183
+ supports_parallel_function_calling: true,
184
+ supports_vision: true,
185
+ supports_prompt_caching: true,
186
+ supports_system_messages: true,
187
+ supports_response_schema: true,
188
+ supports_tool_choice: true,
189
+ supports_reasoning_effort: true,
190
+ },
191
+ {
192
+ model: 'chatgpt-4o-latest',
193
+ max_tokens: 4096,
194
+ max_input_tokens: 128000,
195
+ max_output_tokens: 4096,
196
+ input_cost_per_token: 0.000005,
197
+ output_cost_per_token: 0.000015,
198
+ provider: 'openai',
199
+ mode: 'chat',
200
+ supports_function_calling: true,
201
+ supports_parallel_function_calling: true,
202
+ supports_vision: true,
203
+ supports_prompt_caching: true,
204
+ supports_system_messages: true,
205
+ supports_tool_choice: true,
206
+ },
207
+ {
208
+ model: 'gpt-4o-2024-05-13',
209
+ max_tokens: 4096,
210
+ max_input_tokens: 128000,
211
+ max_output_tokens: 4096,
212
+ input_cost_per_token: 0.000005,
213
+ output_cost_per_token: 0.000015,
214
+ input_cost_per_token_batches: 0.0000025,
215
+ output_cost_per_token_batches: 0.0000075,
216
+ provider: 'openai',
217
+ mode: 'chat',
218
+ supports_function_calling: true,
219
+ supports_parallel_function_calling: true,
220
+ supports_vision: true,
221
+ supports_prompt_caching: true,
222
+ supports_system_messages: true,
223
+ supports_tool_choice: true,
224
+ },
225
+ {
226
+ model: 'gpt-4o-2024-08-06',
227
+ max_tokens: 16384,
228
+ max_input_tokens: 128000,
229
+ max_output_tokens: 16384,
230
+ input_cost_per_token: 0.0000025,
231
+ output_cost_per_token: 0.00001,
232
+ input_cost_per_token_batches: 0.00000125,
233
+ output_cost_per_token_batches: 0.000005,
234
+ cache_read_input_token_cost: 0.00000125,
235
+ provider: 'openai',
236
+ mode: 'chat',
237
+ supports_function_calling: true,
238
+ supports_parallel_function_calling: true,
239
+ supports_response_schema: true,
240
+ supports_vision: true,
241
+ supports_prompt_caching: true,
242
+ supports_system_messages: true,
243
+ supports_tool_choice: true,
244
+ },
245
+ {
246
+ model: 'gpt-4o-2024-11-20',
247
+ max_tokens: 16384,
248
+ max_input_tokens: 128000,
249
+ max_output_tokens: 16384,
250
+ input_cost_per_token: 0.0000025,
251
+ output_cost_per_token: 0.00001,
252
+ input_cost_per_token_batches: 0.00000125,
253
+ output_cost_per_token_batches: 0.000005,
254
+ cache_read_input_token_cost: 0.00000125,
255
+ provider: 'openai',
256
+ mode: 'chat',
257
+ supports_function_calling: true,
258
+ supports_parallel_function_calling: true,
259
+ supports_response_schema: true,
260
+ supports_vision: true,
261
+ supports_prompt_caching: true,
262
+ supports_system_messages: true,
263
+ supports_tool_choice: true,
264
+ },
265
+ {
266
+ model: 'gpt-4-turbo',
267
+ max_tokens: 4096,
268
+ max_input_tokens: 128000,
269
+ max_output_tokens: 4096,
270
+ input_cost_per_token: 0.00001,
271
+ output_cost_per_token: 0.00003,
272
+ provider: 'openai',
273
+ mode: 'chat',
274
+ supports_function_calling: true,
275
+ supports_parallel_function_calling: true,
276
+ supports_vision: true,
277
+ supports_prompt_caching: true,
278
+ supports_system_messages: true,
279
+ supports_tool_choice: true,
280
+ },
281
+ ],
282
+ mistral: [
283
+ {
284
+ model: 'mistral-small',
285
+ max_tokens: 8191,
286
+ max_input_tokens: 32000,
287
+ max_output_tokens: 8191,
288
+ input_cost_per_token: 0.000001,
289
+ output_cost_per_token: 0.000003,
290
+ provider: 'mistral',
291
+ supports_function_calling: true,
292
+ mode: 'chat',
293
+ supports_assistant_prefill: true,
294
+ supports_tool_choice: true,
295
+ },
296
+ {
297
+ model: 'mistral-small-latest',
298
+ max_tokens: 8191,
299
+ max_input_tokens: 32000,
300
+ max_output_tokens: 8191,
301
+ input_cost_per_token: 0.000001,
302
+ output_cost_per_token: 0.000003,
303
+ provider: 'mistral',
304
+ supports_function_calling: true,
305
+ mode: 'chat',
306
+ supports_assistant_prefill: true,
307
+ supports_tool_choice: true,
308
+ },
309
+ {
310
+ model: 'mistral-large-latest',
311
+ max_tokens: 128000,
312
+ max_input_tokens: 128000,
313
+ max_output_tokens: 128000,
314
+ input_cost_per_token: 0.000002,
315
+ output_cost_per_token: 0.000006,
316
+ provider: 'mistral',
317
+ mode: 'chat',
318
+ supports_function_calling: true,
319
+ supports_assistant_prefill: true,
320
+ supports_tool_choice: true,
321
+ },
322
+ {
323
+ model: 'open-mixtral-8x7b',
324
+ max_tokens: 8191,
325
+ max_input_tokens: 32000,
326
+ max_output_tokens: 8191,
327
+ input_cost_per_token: 7e-7,
328
+ output_cost_per_token: 7e-7,
329
+ provider: 'mistral',
330
+ mode: 'chat',
331
+ supports_function_calling: true,
332
+ supports_assistant_prefill: true,
333
+ supports_tool_choice: true,
334
+ },
335
+ {
336
+ model: 'open-mixtral-8x22b',
337
+ max_tokens: 8191,
338
+ max_input_tokens: 65336,
339
+ max_output_tokens: 8191,
340
+ input_cost_per_token: 0.000002,
341
+ output_cost_per_token: 0.000006,
342
+ provider: 'mistral',
343
+ mode: 'chat',
344
+ supports_function_calling: true,
345
+ supports_assistant_prefill: true,
346
+ supports_tool_choice: true,
347
+ },
348
+ ],
349
+ deepseek: [
350
+ {
351
+ model: 'deepseek-reasoner',
352
+ max_tokens: 8192,
353
+ max_input_tokens: 65536,
354
+ max_output_tokens: 8192,
355
+ input_cost_per_token: 5.5e-7,
356
+ input_cost_per_token_cache_hit: 1.4e-7,
357
+ output_cost_per_token: 0.00000219,
358
+ provider: 'deepseek',
359
+ mode: 'chat',
360
+ supports_function_calling: true,
361
+ supports_assistant_prefill: true,
362
+ supports_tool_choice: true,
363
+ supports_prompt_caching: true,
364
+ },
365
+ {
366
+ model: 'deepseek-chat',
367
+ max_tokens: 8192,
368
+ max_input_tokens: 65536,
369
+ max_output_tokens: 8192,
370
+ input_cost_per_token: 2.7e-7,
371
+ input_cost_per_token_cache_hit: 7e-8,
372
+ cache_read_input_token_cost: 7e-8,
373
+ cache_creation_input_token_cost: 0,
374
+ output_cost_per_token: 0.0000011,
375
+ provider: 'deepseek',
376
+ mode: 'chat',
377
+ supports_function_calling: true,
378
+ supports_assistant_prefill: true,
379
+ supports_tool_choice: true,
380
+ supports_prompt_caching: true,
381
+ },
382
+ {
383
+ model: 'deepseek-coder',
384
+ max_tokens: 4096,
385
+ max_input_tokens: 128000,
386
+ max_output_tokens: 4096,
387
+ input_cost_per_token: 1.4e-7,
388
+ input_cost_per_token_cache_hit: 1.4e-8,
389
+ output_cost_per_token: 2.8e-7,
390
+ provider: 'deepseek',
391
+ mode: 'chat',
392
+ supports_function_calling: true,
393
+ supports_assistant_prefill: true,
394
+ supports_tool_choice: true,
395
+ supports_prompt_caching: true,
396
+ },
397
+ ],
398
+ xai: [
399
+ {
400
+ model: 'grok-beta',
401
+ max_tokens: 131072,
402
+ max_input_tokens: 131072,
403
+ max_output_tokens: 131072,
404
+ input_cost_per_token: 0.000005,
405
+ output_cost_per_token: 0.000015,
406
+ provider: 'xai',
407
+ mode: 'chat',
408
+ supports_function_calling: true,
409
+ supports_vision: true,
410
+ supports_tool_choice: true,
411
+ },
412
+ ],
413
+ groq: [
414
+ {
415
+ model: 'llama-3.3-70b-versatile',
416
+ max_tokens: 8192,
417
+ max_input_tokens: 128000,
418
+ max_output_tokens: 8192,
419
+ input_cost_per_token: 5.9e-7,
420
+ output_cost_per_token: 7.9e-7,
421
+ provider: 'groq',
422
+ mode: 'chat',
423
+ supports_function_calling: true,
424
+ supports_response_schema: true,
425
+ supports_tool_choice: true,
426
+ },
427
+ {
428
+ model: 'llama2-70b-4096',
429
+ max_tokens: 4096,
430
+ max_input_tokens: 4096,
431
+ max_output_tokens: 4096,
432
+ input_cost_per_token: 7e-7,
433
+ output_cost_per_token: 8e-7,
434
+ provider: 'groq',
435
+ mode: 'chat',
436
+ supports_function_calling: true,
437
+ supports_response_schema: true,
438
+ supports_tool_choice: true,
439
+ },
440
+ {
441
+ model: 'llama3-8b-8192',
442
+ max_tokens: 8192,
443
+ max_input_tokens: 8192,
444
+ max_output_tokens: 8192,
445
+ input_cost_per_token: 5e-8,
446
+ output_cost_per_token: 8e-8,
447
+ provider: 'groq',
448
+ mode: 'chat',
449
+ supports_function_calling: true,
450
+ supports_response_schema: true,
451
+ supports_tool_choice: true,
452
+ },
453
+ {
454
+ model: 'llama-3.2-1b-preview',
455
+ max_tokens: 8192,
456
+ max_input_tokens: 8192,
457
+ max_output_tokens: 8192,
458
+ input_cost_per_token: 4e-8,
459
+ output_cost_per_token: 4e-8,
460
+ provider: 'groq',
461
+ mode: 'chat',
462
+ supports_function_calling: true,
463
+ supports_response_schema: true,
464
+ supports_tool_choice: true,
465
+ },
466
+ {
467
+ model: 'llama-3.2-3b-preview',
468
+ max_tokens: 8192,
469
+ max_input_tokens: 8192,
470
+ max_output_tokens: 8192,
471
+ input_cost_per_token: 6e-8,
472
+ output_cost_per_token: 6e-8,
473
+ provider: 'groq',
474
+ mode: 'chat',
475
+ supports_function_calling: true,
476
+ supports_response_schema: true,
477
+ supports_tool_choice: true,
478
+ },
479
+ {
480
+ model: 'llama-3.2-11b-text-preview',
481
+ max_tokens: 8192,
482
+ max_input_tokens: 8192,
483
+ max_output_tokens: 8192,
484
+ input_cost_per_token: 1.8e-7,
485
+ output_cost_per_token: 1.8e-7,
486
+ provider: 'groq',
487
+ mode: 'chat',
488
+ supports_function_calling: true,
489
+ supports_response_schema: true,
490
+ supports_tool_choice: true,
491
+ },
492
+ {
493
+ model: 'llama-3.2-90b-text-preview',
494
+ max_tokens: 8192,
495
+ max_input_tokens: 8192,
496
+ max_output_tokens: 8192,
497
+ input_cost_per_token: 9e-7,
498
+ output_cost_per_token: 9e-7,
499
+ provider: 'groq',
500
+ mode: 'chat',
501
+ supports_function_calling: true,
502
+ supports_response_schema: true,
503
+ supports_tool_choice: true,
504
+ },
505
+ {
506
+ model: 'llama3-70b-8192',
507
+ max_tokens: 8192,
508
+ max_input_tokens: 8192,
509
+ max_output_tokens: 8192,
510
+ input_cost_per_token: 5.9e-7,
511
+ output_cost_per_token: 7.9e-7,
512
+ provider: 'groq',
513
+ mode: 'chat',
514
+ supports_function_calling: true,
515
+ supports_response_schema: true,
516
+ supports_tool_choice: true,
517
+ },
518
+ {
519
+ model: 'llama-3.1-8b-instant',
520
+ max_tokens: 8000,
521
+ max_input_tokens: 8000,
522
+ max_output_tokens: 8000,
523
+ input_cost_per_token: 5e-8,
524
+ output_cost_per_token: 8e-8,
525
+ provider: 'groq',
526
+ mode: 'chat',
527
+ supports_function_calling: true,
528
+ supports_response_schema: true,
529
+ supports_tool_choice: true,
530
+ },
531
+ {
532
+ model: 'llama-3.1-70b-versatile',
533
+ max_tokens: 8000,
534
+ max_input_tokens: 8000,
535
+ max_output_tokens: 8000,
536
+ input_cost_per_token: 5.9e-7,
537
+ output_cost_per_token: 7.9e-7,
538
+ provider: 'groq',
539
+ mode: 'chat',
540
+ supports_function_calling: true,
541
+ supports_response_schema: true,
542
+ supports_tool_choice: true,
543
+ },
544
+ {
545
+ model: 'llama-3.1-405b-reasoning',
546
+ max_tokens: 8000,
547
+ max_input_tokens: 8000,
548
+ max_output_tokens: 8000,
549
+ input_cost_per_token: 5.9e-7,
550
+ output_cost_per_token: 7.9e-7,
551
+ provider: 'groq',
552
+ mode: 'chat',
553
+ supports_function_calling: true,
554
+ supports_response_schema: true,
555
+ supports_tool_choice: true,
556
+ },
557
+ {
558
+ model: 'mixtral-8x7b-32768',
559
+ max_tokens: 32768,
560
+ max_input_tokens: 32768,
561
+ max_output_tokens: 32768,
562
+ input_cost_per_token: 2.4e-7,
563
+ output_cost_per_token: 2.4e-7,
564
+ provider: 'groq',
565
+ mode: 'chat',
566
+ supports_function_calling: true,
567
+ supports_response_schema: true,
568
+ supports_tool_choice: true,
569
+ },
570
+ {
571
+ model: 'gemma-7b-it',
572
+ max_tokens: 8192,
573
+ max_input_tokens: 8192,
574
+ max_output_tokens: 8192,
575
+ input_cost_per_token: 7e-8,
576
+ output_cost_per_token: 7e-8,
577
+ provider: 'groq',
578
+ mode: 'chat',
579
+ supports_function_calling: true,
580
+ supports_response_schema: true,
581
+ supports_tool_choice: true,
582
+ },
583
+ {
584
+ model: 'gemma2-9b-it',
585
+ max_tokens: 8192,
586
+ max_input_tokens: 8192,
587
+ max_output_tokens: 8192,
588
+ input_cost_per_token: 2e-7,
589
+ output_cost_per_token: 2e-7,
590
+ provider: 'groq',
591
+ mode: 'chat',
592
+ supports_function_calling: true,
593
+ supports_response_schema: true,
594
+ supports_tool_choice: true,
595
+ },
596
+ {
597
+ model: 'llama3-groq-70b-8192-tool-use-preview',
598
+ max_tokens: 8192,
599
+ max_input_tokens: 8192,
600
+ max_output_tokens: 8192,
601
+ input_cost_per_token: 8.9e-7,
602
+ output_cost_per_token: 8.9e-7,
603
+ provider: 'groq',
604
+ mode: 'chat',
605
+ supports_function_calling: true,
606
+ supports_response_schema: true,
607
+ supports_tool_choice: true,
608
+ },
609
+ {
610
+ model: 'llama3-groq-8b-8192-tool-use-preview',
611
+ max_tokens: 8192,
612
+ max_input_tokens: 8192,
613
+ max_output_tokens: 8192,
614
+ input_cost_per_token: 1.9e-7,
615
+ output_cost_per_token: 1.9e-7,
616
+ provider: 'groq',
617
+ mode: 'chat',
618
+ supports_function_calling: true,
619
+ supports_response_schema: true,
620
+ supports_tool_choice: true,
621
+ },
622
+ ],
623
+ anthropic: [
624
+ {
625
+ model: 'claude-3-5-haiku-latest',
626
+ max_tokens: 8192,
627
+ max_input_tokens: 200000,
628
+ max_output_tokens: 8192,
629
+ input_cost_per_token: 0.0000008,
630
+ output_cost_per_token: 0.000004,
631
+ cache_creation_input_token_cost: 0.00000125,
632
+ cache_read_input_token_cost: 1e-7,
633
+ provider: 'anthropic',
634
+ mode: 'chat',
635
+ supports_function_calling: true,
636
+ supports_vision: true,
637
+ tool_use_system_prompt_tokens: 264,
638
+ supports_assistant_prefill: true,
639
+ supports_prompt_caching: true,
640
+ supports_response_schema: true,
641
+ deprecation_date: '2025-10-01',
642
+ supports_tool_choice: true,
643
+ },
644
+ {
645
+ model: 'claude-3-opus-latest',
646
+ max_tokens: 4096,
647
+ max_input_tokens: 200000,
648
+ max_output_tokens: 4096,
649
+ input_cost_per_token: 0.000015,
650
+ output_cost_per_token: 0.000075,
651
+ cache_creation_input_token_cost: 0.00001875,
652
+ cache_read_input_token_cost: 0.0000015,
653
+ provider: 'anthropic',
654
+ mode: 'chat',
655
+ supports_function_calling: true,
656
+ supports_vision: true,
657
+ tool_use_system_prompt_tokens: 395,
658
+ supports_assistant_prefill: true,
659
+ supports_prompt_caching: true,
660
+ supports_response_schema: true,
661
+ deprecation_date: '2025-03-01',
662
+ supports_tool_choice: true,
663
+ },
664
+ {
665
+ model: 'claude-3-7-sonnet-latest',
666
+ max_tokens: 8192,
667
+ max_input_tokens: 200000,
668
+ max_output_tokens: 8192,
669
+ input_cost_per_token: 0.000003,
670
+ output_cost_per_token: 0.000015,
671
+ cache_creation_input_token_cost: 0.00000375,
672
+ cache_read_input_token_cost: 3e-7,
673
+ provider: 'anthropic',
674
+ mode: 'chat',
675
+ supports_function_calling: true,
676
+ supports_vision: true,
677
+ tool_use_system_prompt_tokens: 159,
678
+ supports_assistant_prefill: true,
679
+ supports_prompt_caching: true,
680
+ supports_response_schema: true,
681
+ deprecation_date: '2025-06-01',
682
+ supports_tool_choice: true,
683
+ },
684
+ ],
685
+ gemini: [
686
+ {
687
+ model: 'gemini-2.0-flash',
688
+ max_tokens: 8192,
689
+ max_input_tokens: 1048576,
690
+ max_output_tokens: 8192,
691
+ max_images_per_prompt: 3000,
692
+ max_videos_per_prompt: 10,
693
+ max_video_length: 1,
694
+ max_audio_length_hours: 8.4,
695
+ max_audio_per_prompt: 1,
696
+ max_pdf_size_mb: 30,
697
+ input_cost_per_audio_token: 7e-7,
698
+ input_cost_per_token: 0.0000001,
699
+ output_cost_per_token: 0.0000004,
700
+ provider: 'gemini',
701
+ mode: 'chat',
702
+ rpm: 10000,
703
+ tpm: 10000000,
704
+ supports_system_messages: true,
705
+ supports_function_calling: true,
706
+ supports_vision: true,
707
+ supports_response_schema: true,
708
+ supports_audio_output: true,
709
+ supports_tool_choice: true,
710
+ source: 'https://ai.google.dev/pricing#2_0flash',
711
+ },
712
+ {
713
+ model: 'gemini-2.0-flash-lite',
714
+ max_tokens: 8192,
715
+ max_input_tokens: 1048576,
716
+ max_output_tokens: 8192,
717
+ max_images_per_prompt: 3000,
718
+ max_videos_per_prompt: 10,
719
+ max_video_length: 1,
720
+ max_audio_length_hours: 8.4,
721
+ max_audio_per_prompt: 1,
722
+ max_pdf_size_mb: 30,
723
+ input_cost_per_audio_token: 7.5e-8,
724
+ input_cost_per_token: 0.000000075,
725
+ output_cost_per_token: 0.0000003,
726
+ provider: 'gemini',
727
+ mode: 'chat',
728
+ rpm: 60000,
729
+ tpm: 10000000,
730
+ supports_system_messages: true,
731
+ supports_function_calling: true,
732
+ supports_vision: true,
733
+ supports_response_schema: true,
734
+ supports_audio_output: false,
735
+ supports_tool_choice: true,
736
+ source:
737
+ 'https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#gemini-2.0-flash-lite',
738
+ },
739
+ {
740
+ model: 'gemini-2.0-flash-thinking-exp',
741
+ max_tokens: 8192,
742
+ max_input_tokens: 1048576,
743
+ max_output_tokens: 8192,
744
+ max_images_per_prompt: 3000,
745
+ max_videos_per_prompt: 10,
746
+ max_video_length: 1,
747
+ max_audio_length_hours: 8.4,
748
+ max_audio_per_prompt: 1,
749
+ max_pdf_size_mb: 30,
750
+ input_cost_per_image: 0,
751
+ input_cost_per_video_per_second: 0,
752
+ input_cost_per_audio_per_second: 0,
753
+ input_cost_per_token: 0,
754
+ input_cost_per_character: 0,
755
+ input_cost_per_token_above_128k_tokens: 0,
756
+ input_cost_per_character_above_128k_tokens: 0,
757
+ input_cost_per_image_above_128k_tokens: 0,
758
+ input_cost_per_video_per_second_above_128k_tokens: 0,
759
+ input_cost_per_audio_per_second_above_128k_tokens: 0,
760
+ output_cost_per_token: 0,
761
+ output_cost_per_character: 0,
762
+ output_cost_per_token_above_128k_tokens: 0,
763
+ output_cost_per_character_above_128k_tokens: 0,
764
+ provider: 'gemini',
765
+ mode: 'chat',
766
+ supports_system_messages: true,
767
+ supports_function_calling: true,
768
+ supports_vision: true,
769
+ supports_response_schema: true,
770
+ supports_audio_output: true,
771
+ tpm: 4000000,
772
+ rpm: 10,
773
+ source:
774
+ 'https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#gemini-2.0-flash',
775
+ supports_tool_choice: true,
776
+ },
777
+ ],
778
+ kimi: [
779
+ {
780
+ model: 'kimi-k2-0711-preview',
781
+ max_tokens: 16384,
782
+ max_input_tokens: 128000,
783
+ max_output_tokens: 16384,
784
+ input_cost_per_token: 0.000003,
785
+ output_cost_per_token: 0.000015,
786
+ provider: 'kimi',
787
+ mode: 'chat',
788
+ supports_function_calling: true,
789
+ supports_system_messages: true,
790
+ supports_tool_choice: true,
791
+ },
792
+ ],
793
+ bigdream: [
794
+ {
795
+ model: 'claude-sonnet-4-20250514',
796
+ max_tokens: 8192,
797
+ max_input_tokens: 200000,
798
+ max_output_tokens: 8192,
799
+ input_cost_per_token: 0.000003,
800
+ output_cost_per_token: 0.000015,
801
+ provider: 'bigdream',
802
+ mode: 'chat',
803
+ supports_function_calling: true,
804
+ supports_vision: true,
805
+ supports_system_messages: true,
806
+ supports_tool_choice: true,
807
+ supports_prompt_caching: true,
808
+ },
809
+ ],
810
+ qwen: [],
811
+ glm: [],
812
+ minimax: [
813
+ {
814
+ model: 'abab6.5s-chat',
815
+ max_tokens: 8192,
816
+ max_input_tokens: 245760,
817
+ max_output_tokens: 8192,
818
+ input_cost_per_token: 0.000001,
819
+ output_cost_per_token: 0.000003,
820
+ provider: 'minimax',
821
+ mode: 'chat',
822
+ supports_function_calling: true,
823
+ supports_system_messages: true,
824
+ supports_tool_choice: true,
825
+ },
826
+ {
827
+ model: 'abab6.5g-chat',
828
+ max_tokens: 8192,
829
+ max_input_tokens: 245760,
830
+ max_output_tokens: 8192,
831
+ input_cost_per_token: 0.000002,
832
+ output_cost_per_token: 0.000006,
833
+ provider: 'minimax',
834
+ mode: 'chat',
835
+ supports_function_calling: true,
836
+ supports_system_messages: true,
837
+ supports_tool_choice: true,
838
+ },
839
+ {
840
+ model: 'abab5.5s-chat',
841
+ max_tokens: 8192,
842
+ max_input_tokens: 16384,
843
+ max_output_tokens: 8192,
844
+ input_cost_per_token: 0.0000005,
845
+ output_cost_per_token: 0.000002,
846
+ provider: 'minimax',
847
+ mode: 'chat',
848
+ supports_function_calling: true,
849
+ supports_system_messages: true,
850
+ supports_tool_choice: true,
851
+ },
852
+ ],
853
+ 'baidu-qianfan': [],
854
+ siliconflow: [],
855
+ ollama: [],
856
+ }
857
+
858
+ export const providers = {
859
+ kimi: {
860
+ name: 'Kimi (Moonshot)',
861
+ baseURL: 'https://api.moonshot.cn/v1',
862
+ },
863
+ anthropic: {
864
+ name: 'Claude',
865
+ baseURL: 'https://api.anthropic.com',
866
+ },
867
+ deepseek: {
868
+ name: 'DeepSeek',
869
+ baseURL: 'https://api.deepseek.com',
870
+ },
871
+ qwen: {
872
+ name: 'Qwen (Alibaba)',
873
+ baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
874
+ },
875
+ openai: {
876
+ name: 'OpenAI',
877
+ baseURL: 'https://api.openai.com/v1',
878
+ },
879
+ ollama: {
880
+ name: 'Ollama',
881
+ baseURL: 'http://localhost:11434/v1',
882
+ },
883
+ gemini: {
884
+ name: 'Gemini',
885
+ baseURL: 'https://generativelanguage.googleapis.com/v1beta/openai',
886
+ },
887
+ bigdream: {
888
+ name: 'BigDream',
889
+ baseURL: 'https://api-key.info',
890
+ },
891
+ opendev: {
892
+ name: 'OpenDev',
893
+ baseURL: 'https://api.openai-next.com',
894
+ },
895
+ 'custom-openai': {
896
+ name: 'Custom OpenAI-Compatible API',
897
+ baseURL: '', // Will be configured by user
898
+ },
899
+ openrouter: {
900
+ name: 'OpenRouter',
901
+ baseURL: 'https://openrouter.ai/api/v1',
902
+ },
903
+ minimax: {
904
+ name: 'MiniMax',
905
+ baseURL: 'https://api.minimaxi.com/v1',
906
+ },
907
+ siliconflow: {
908
+ name: 'SiliconFlow',
909
+ baseURL: 'https://api.siliconflow.cn/v1',
910
+ },
911
+ glm: {
912
+ name: 'GLM (Zhipu AI)',
913
+ baseURL: 'https://open.bigmodel.cn/api/paas/v4',
914
+ },
915
+ 'baidu-qianfan': {
916
+ name: 'Baidu Qianfan',
917
+ baseURL: 'https://qianfan.baidubce.com/v2',
918
+ },
919
+ mistral: {
920
+ name: 'Mistral',
921
+ baseURL: 'https://api.mistral.ai/v1',
922
+ },
923
+ xai: {
924
+ name: 'xAI',
925
+ baseURL: 'https://api.x.ai/v1',
926
+ },
927
+ groq: {
928
+ name: 'Groq',
929
+ baseURL: 'https://api.groq.com/openai/v1',
930
+ },
931
+ azure: {
932
+ name: 'Azure OpenAI',
933
+ baseURL: '', // Will be dynamically constructed based on resource name
934
+ },
935
+ }