@mastra/core 0.24.5 → 0.24.6

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 (277) hide show
  1. package/CHANGELOG.md +612 -0
  2. package/dist/agent/agent.d.ts +8 -6
  3. package/dist/agent/agent.d.ts.map +1 -1
  4. package/dist/agent/agent.types.d.ts +2 -0
  5. package/dist/agent/agent.types.d.ts.map +1 -1
  6. package/dist/agent/index.cjs +13 -13
  7. package/dist/agent/index.js +2 -2
  8. package/dist/agent/input-processor/index.cjs +6 -6
  9. package/dist/agent/input-processor/index.js +1 -1
  10. package/dist/agent/message-list/index.d.ts.map +1 -1
  11. package/dist/agent/message-list/prompt/attachments-to-parts.d.ts.map +1 -1
  12. package/dist/agent/test-utils.d.ts +4 -3
  13. package/dist/agent/test-utils.d.ts.map +1 -1
  14. package/dist/agent/utils.d.ts.map +1 -1
  15. package/dist/agent/workflows/prepare-stream/index.d.ts +4 -4
  16. package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
  17. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
  18. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +4 -4
  19. package/dist/agent/workflows/prepare-stream/schema.d.ts +4 -4
  20. package/dist/agent/workflows/prepare-stream/stream-step.d.ts +8 -1
  21. package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
  22. package/dist/ai-tracing/index.cjs +36 -36
  23. package/dist/ai-tracing/index.js +1 -1
  24. package/dist/chunk-3PSWNGBF.js +3 -0
  25. package/dist/{chunk-ZV5CC35D.js.map → chunk-3PSWNGBF.js.map} +1 -1
  26. package/dist/{chunk-XHKMGOON.cjs → chunk-42RUESSD.cjs} +204 -150
  27. package/dist/chunk-42RUESSD.cjs.map +1 -0
  28. package/dist/{chunk-UD7DS7OY.cjs → chunk-46XGIEXM.cjs} +4 -4
  29. package/dist/{chunk-UD7DS7OY.cjs.map → chunk-46XGIEXM.cjs.map} +1 -1
  30. package/dist/{chunk-HGNRQ3OG.js → chunk-5O52O25J.js} +15 -8
  31. package/dist/chunk-5O52O25J.js.map +1 -0
  32. package/dist/{chunk-OLERJ2OU.js → chunk-6D2K2CAA.js} +7 -5
  33. package/dist/chunk-6D2K2CAA.js.map +1 -0
  34. package/dist/chunk-6XCINXZ7.cjs +194 -0
  35. package/dist/chunk-6XCINXZ7.cjs.map +1 -0
  36. package/dist/chunk-BJ6XIEC6.js +13 -0
  37. package/dist/chunk-BJ6XIEC6.js.map +1 -0
  38. package/dist/chunk-BWYU7D33.js +192 -0
  39. package/dist/chunk-BWYU7D33.js.map +1 -0
  40. package/dist/{chunk-R7UDZZA5.cjs → chunk-CT2DMHGC.cjs} +8 -8
  41. package/dist/{chunk-R7UDZZA5.cjs.map → chunk-CT2DMHGC.cjs.map} +1 -1
  42. package/dist/{chunk-YSQE5IHK.cjs → chunk-CYEQK4PM.cjs} +10 -8
  43. package/dist/chunk-CYEQK4PM.cjs.map +1 -0
  44. package/dist/{chunk-FCJ5INK7.js → chunk-DHLW4AP7.js} +3 -3
  45. package/dist/{chunk-FCJ5INK7.js.map → chunk-DHLW4AP7.js.map} +1 -1
  46. package/dist/{chunk-4UOIJRD6.cjs → chunk-GZDIHQDK.cjs} +4 -4
  47. package/dist/{chunk-4UOIJRD6.cjs.map → chunk-GZDIHQDK.cjs.map} +1 -1
  48. package/dist/{chunk-WCHE6FJ7.js → chunk-HCCXJ5YJ.js} +111 -6
  49. package/dist/chunk-HCCXJ5YJ.js.map +1 -0
  50. package/dist/{chunk-34ZCWSUA.js → chunk-HSX2K7HB.js} +15 -14
  51. package/dist/chunk-HSX2K7HB.js.map +1 -0
  52. package/dist/{chunk-LZFCR2SE.cjs → chunk-IAJHRFO4.cjs} +4 -4
  53. package/dist/{chunk-LZFCR2SE.cjs.map → chunk-IAJHRFO4.cjs.map} +1 -1
  54. package/dist/{chunk-4HQPVSGA.cjs → chunk-ICF3MCIN.cjs} +64 -12
  55. package/dist/chunk-ICF3MCIN.cjs.map +1 -0
  56. package/dist/{chunk-N2DOZAFH.js → chunk-INOOZ2A2.js} +760 -508
  57. package/dist/chunk-INOOZ2A2.js.map +1 -0
  58. package/dist/{chunk-3JX2Y3WH.cjs → chunk-IWU4YSYT.cjs} +16 -15
  59. package/dist/chunk-IWU4YSYT.cjs.map +1 -0
  60. package/dist/{chunk-3KVI2HLS.cjs → chunk-KWF3J2Q4.cjs} +11 -11
  61. package/dist/{chunk-3KVI2HLS.cjs.map → chunk-KWF3J2Q4.cjs.map} +1 -1
  62. package/dist/{chunk-TEW3ODXX.js → chunk-LAQQETGP.js} +36 -34
  63. package/dist/chunk-LAQQETGP.js.map +1 -0
  64. package/dist/{chunk-EUNOQ7HN.js → chunk-MRSBLBQ5.js} +4 -4
  65. package/dist/{chunk-EUNOQ7HN.js.map → chunk-MRSBLBQ5.js.map} +1 -1
  66. package/dist/{chunk-LLSLFDO6.js → chunk-NRQC7DQW.js} +57 -5
  67. package/dist/chunk-NRQC7DQW.js.map +1 -0
  68. package/dist/{chunk-WBAXXG34.cjs → chunk-PAOBGBU7.cjs} +112 -5
  69. package/dist/chunk-PAOBGBU7.cjs.map +1 -0
  70. package/dist/chunk-PE3V7GUL.cjs +4 -0
  71. package/dist/{chunk-LJFJTTZQ.cjs.map → chunk-PE3V7GUL.cjs.map} +1 -1
  72. package/dist/{chunk-DOLSYVNJ.cjs → chunk-PIH5FBNQ.cjs} +12 -12
  73. package/dist/{chunk-DOLSYVNJ.cjs.map → chunk-PIH5FBNQ.cjs.map} +1 -1
  74. package/dist/{chunk-4SXWN3RR.js → chunk-Q6LWNLAJ.js} +203 -149
  75. package/dist/chunk-Q6LWNLAJ.js.map +1 -0
  76. package/dist/{chunk-SL7VKAQ3.js → chunk-R6XC4DV5.js} +7 -7
  77. package/dist/chunk-R6XC4DV5.js.map +1 -0
  78. package/dist/{chunk-WNFLWMEP.cjs → chunk-RJOVFHWN.cjs} +765 -511
  79. package/dist/chunk-RJOVFHWN.cjs.map +1 -0
  80. package/dist/chunk-UCPGYU55.cjs +15 -0
  81. package/dist/chunk-UCPGYU55.cjs.map +1 -0
  82. package/dist/{chunk-K7MEUZ3O.js → chunk-UWTYVVVZ.js} +3 -3
  83. package/dist/{chunk-K7MEUZ3O.js.map → chunk-UWTYVVVZ.js.map} +1 -1
  84. package/dist/{chunk-ZISECZZO.js → chunk-VHEA3YXS.js} +2 -2
  85. package/dist/chunk-VHEA3YXS.js.map +1 -0
  86. package/dist/chunk-VXHOOZSK.js +446 -0
  87. package/dist/chunk-VXHOOZSK.js.map +1 -0
  88. package/dist/{chunk-NUAURT4I.cjs → chunk-W4UVO3HL.cjs} +2 -2
  89. package/dist/chunk-W4UVO3HL.cjs.map +1 -0
  90. package/dist/{chunk-ZIHEKHUB.js → chunk-WIMFJ2BA.js} +3 -3
  91. package/dist/{chunk-ZIHEKHUB.js.map → chunk-WIMFJ2BA.js.map} +1 -1
  92. package/dist/{chunk-LRSB62Z6.cjs → chunk-X7F4CSGR.cjs} +15 -8
  93. package/dist/chunk-X7F4CSGR.cjs.map +1 -0
  94. package/dist/{chunk-WUFFST2N.cjs → chunk-XDMQQZNX.cjs} +70 -68
  95. package/dist/chunk-XDMQQZNX.cjs.map +1 -0
  96. package/dist/chunk-XWGHD4C7.cjs +450 -0
  97. package/dist/chunk-XWGHD4C7.cjs.map +1 -0
  98. package/dist/{chunk-FZXAPBVV.js → chunk-Z6QCWTTO.js} +3 -3
  99. package/dist/{chunk-FZXAPBVV.js.map → chunk-Z6QCWTTO.js.map} +1 -1
  100. package/dist/{chunk-GWACPQ56.js → chunk-ZIWN73GQ.js} +5 -5
  101. package/dist/{chunk-GWACPQ56.js.map → chunk-ZIWN73GQ.js.map} +1 -1
  102. package/dist/{chunk-IJRERAWQ.cjs → chunk-ZOYE65RA.cjs} +8 -8
  103. package/dist/chunk-ZOYE65RA.cjs.map +1 -0
  104. package/dist/index.cjs +75 -54
  105. package/dist/index.cjs.map +1 -1
  106. package/dist/index.js +15 -10
  107. package/dist/index.js.map +1 -1
  108. package/dist/llm/index.cjs +24 -8
  109. package/dist/llm/index.d.ts +1 -0
  110. package/dist/llm/index.d.ts.map +1 -1
  111. package/dist/llm/index.js +5 -1
  112. package/dist/llm/model/gateways/base.d.ts +9 -4
  113. package/dist/llm/model/gateways/base.d.ts.map +1 -1
  114. package/dist/llm/model/gateways/index.d.ts +3 -1
  115. package/dist/llm/model/gateways/index.d.ts.map +1 -1
  116. package/dist/llm/model/gateways/models-dev.d.ts +3 -2
  117. package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
  118. package/dist/llm/model/gateways/netlify.d.ts +4 -3
  119. package/dist/llm/model/gateways/netlify.d.ts.map +1 -1
  120. package/dist/llm/model/model.d.ts.map +1 -1
  121. package/dist/llm/model/model.loop.d.ts +1 -1
  122. package/dist/llm/model/model.loop.d.ts.map +1 -1
  123. package/dist/llm/model/provider-registry.d.ts +11 -1
  124. package/dist/llm/model/provider-registry.d.ts.map +1 -1
  125. package/dist/llm/model/provider-types.generated.d.ts +324 -29
  126. package/dist/llm/model/registry-generator.d.ts +12 -0
  127. package/dist/llm/model/registry-generator.d.ts.map +1 -1
  128. package/dist/llm/model/resolve-model.d.ts.map +1 -1
  129. package/dist/llm/model/router.d.ts +6 -1
  130. package/dist/llm/model/router.d.ts.map +1 -1
  131. package/dist/loop/index.cjs +2 -2
  132. package/dist/loop/index.js +1 -1
  133. package/dist/loop/loop.d.ts.map +1 -1
  134. package/dist/loop/network/index.d.ts +6 -6
  135. package/dist/loop/network/index.d.ts.map +1 -1
  136. package/dist/loop/test-utils/generateText.d.ts.map +1 -1
  137. package/dist/loop/test-utils/resultObject.d.ts.map +1 -1
  138. package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
  139. package/dist/loop/types.d.ts +8 -0
  140. package/dist/loop/types.d.ts.map +1 -1
  141. package/dist/loop/workflows/agentic-execution/index.d.ts +36 -36
  142. package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
  143. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +24 -24
  144. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
  145. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +12 -12
  146. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
  147. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
  148. package/dist/loop/workflows/agentic-loop/index.d.ts +36 -36
  149. package/dist/loop/workflows/schema.d.ts +16 -16
  150. package/dist/mastra/index.cjs +2 -2
  151. package/dist/mastra/index.d.ts +23 -0
  152. package/dist/mastra/index.d.ts.map +1 -1
  153. package/dist/mastra/index.js +1 -1
  154. package/dist/memory/index.cjs +4 -4
  155. package/dist/memory/index.js +1 -1
  156. package/dist/memory/types.d.ts +3 -2
  157. package/dist/memory/types.d.ts.map +1 -1
  158. package/dist/models-dev-LJ4O6FNF.js +3 -0
  159. package/dist/{models-dev-BL5TAKE6.js.map → models-dev-LJ4O6FNF.js.map} +1 -1
  160. package/dist/models-dev-T2CXOEDH.cjs +12 -0
  161. package/dist/{models-dev-HZ3LZHPX.cjs.map → models-dev-T2CXOEDH.cjs.map} +1 -1
  162. package/dist/netlify-BAEMIQNH.cjs +12 -0
  163. package/dist/{netlify-TX6V7SJJ.cjs.map → netlify-BAEMIQNH.cjs.map} +1 -1
  164. package/dist/netlify-L7AZ74PV.js +3 -0
  165. package/dist/{netlify-VJXBII33.js.map → netlify-L7AZ74PV.js.map} +1 -1
  166. package/dist/processors/index.cjs +11 -11
  167. package/dist/processors/index.js +1 -1
  168. package/dist/provider-registry-RUDYHG7J.cjs +40 -0
  169. package/dist/provider-registry-RUDYHG7J.cjs.map +1 -0
  170. package/dist/provider-registry-THITZUJ7.js +3 -0
  171. package/dist/provider-registry-THITZUJ7.js.map +1 -0
  172. package/dist/provider-registry.json +705 -68
  173. package/dist/{registry-generator-6WVOHM2L.cjs → registry-generator-DL42NMBM.cjs} +23 -6
  174. package/dist/registry-generator-DL42NMBM.cjs.map +1 -0
  175. package/dist/{registry-generator-DXRSYYYT.js → registry-generator-I6S4ARS6.js} +23 -7
  176. package/dist/registry-generator-I6S4ARS6.js.map +1 -0
  177. package/dist/relevance/index.cjs +4 -4
  178. package/dist/relevance/index.js +1 -1
  179. package/dist/scores/index.cjs +9 -9
  180. package/dist/scores/index.js +2 -2
  181. package/dist/scores/scoreTraces/index.cjs +8 -8
  182. package/dist/scores/scoreTraces/index.js +3 -3
  183. package/dist/server/composite-auth.d.ts +9 -0
  184. package/dist/server/composite-auth.d.ts.map +1 -0
  185. package/dist/server/index.cjs +83 -1
  186. package/dist/server/index.cjs.map +1 -1
  187. package/dist/server/index.d.ts +3 -0
  188. package/dist/server/index.d.ts.map +1 -1
  189. package/dist/server/index.js +82 -2
  190. package/dist/server/index.js.map +1 -1
  191. package/dist/server/simple-auth.d.ts +32 -0
  192. package/dist/server/simple-auth.d.ts.map +1 -0
  193. package/dist/storage/index.cjs +3 -3
  194. package/dist/storage/index.js +1 -1
  195. package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
  196. package/dist/stream/base/output.d.ts.map +1 -1
  197. package/dist/stream/index.cjs +11 -11
  198. package/dist/stream/index.js +2 -2
  199. package/dist/stream/types.d.ts +7 -2
  200. package/dist/stream/types.d.ts.map +1 -1
  201. package/dist/test-utils/llm-mock.cjs +2 -2
  202. package/dist/test-utils/llm-mock.js +1 -1
  203. package/dist/tools/index.cjs +2 -2
  204. package/dist/tools/index.js +1 -1
  205. package/dist/tools/stream.d.ts +1 -0
  206. package/dist/tools/stream.d.ts.map +1 -1
  207. package/dist/utils.cjs +17 -17
  208. package/dist/utils.js +1 -1
  209. package/dist/vector/filter/index.cjs +7 -189
  210. package/dist/vector/filter/index.cjs.map +1 -1
  211. package/dist/vector/filter/index.js +1 -190
  212. package/dist/vector/filter/index.js.map +1 -1
  213. package/dist/vector/index.cjs +9 -4
  214. package/dist/vector/index.d.ts +1 -0
  215. package/dist/vector/index.d.ts.map +1 -1
  216. package/dist/vector/index.js +2 -1
  217. package/dist/vector/types.d.ts +86 -3
  218. package/dist/vector/types.d.ts.map +1 -1
  219. package/dist/vector/vector.d.ts +39 -2
  220. package/dist/vector/vector.d.ts.map +1 -1
  221. package/dist/voice/aisdk/index.d.ts +3 -0
  222. package/dist/voice/aisdk/index.d.ts.map +1 -0
  223. package/dist/voice/aisdk/speech.d.ts +23 -0
  224. package/dist/voice/aisdk/speech.d.ts.map +1 -0
  225. package/dist/voice/aisdk/transcription.d.ts +22 -0
  226. package/dist/voice/aisdk/transcription.d.ts.map +1 -0
  227. package/dist/voice/composite-voice.d.ts +3 -2
  228. package/dist/voice/composite-voice.d.ts.map +1 -1
  229. package/dist/voice/index.cjs +12 -4
  230. package/dist/voice/index.d.ts +1 -0
  231. package/dist/voice/index.d.ts.map +1 -1
  232. package/dist/voice/index.js +1 -1
  233. package/dist/workflows/evented/index.cjs +10 -10
  234. package/dist/workflows/evented/index.js +1 -1
  235. package/dist/workflows/index.cjs +14 -14
  236. package/dist/workflows/index.js +1 -1
  237. package/dist/workflows/legacy/index.cjs +22 -22
  238. package/dist/workflows/legacy/index.js +1 -1
  239. package/dist/workflows/legacy/machine.d.ts +1 -1
  240. package/dist/workflows/legacy/workflow-instance.d.ts +2 -2
  241. package/dist/workflows/utils.d.ts.map +1 -1
  242. package/dist/workflows/workflow.d.ts +2 -0
  243. package/dist/workflows/workflow.d.ts.map +1 -1
  244. package/package.json +7 -7
  245. package/src/llm/model/provider-types.generated.d.ts +324 -29
  246. package/dist/chunk-34ZCWSUA.js.map +0 -1
  247. package/dist/chunk-3JX2Y3WH.cjs.map +0 -1
  248. package/dist/chunk-4HQPVSGA.cjs.map +0 -1
  249. package/dist/chunk-4SXWN3RR.js.map +0 -1
  250. package/dist/chunk-HF3GZRFP.cjs +0 -9
  251. package/dist/chunk-HF3GZRFP.cjs.map +0 -1
  252. package/dist/chunk-HGNRQ3OG.js.map +0 -1
  253. package/dist/chunk-IJRERAWQ.cjs.map +0 -1
  254. package/dist/chunk-LJFJTTZQ.cjs +0 -4
  255. package/dist/chunk-LLSLFDO6.js.map +0 -1
  256. package/dist/chunk-LRSB62Z6.cjs.map +0 -1
  257. package/dist/chunk-N2DOZAFH.js.map +0 -1
  258. package/dist/chunk-NUAURT4I.cjs.map +0 -1
  259. package/dist/chunk-OLERJ2OU.js.map +0 -1
  260. package/dist/chunk-RKXWLG33.js +0 -7
  261. package/dist/chunk-RKXWLG33.js.map +0 -1
  262. package/dist/chunk-SL7VKAQ3.js.map +0 -1
  263. package/dist/chunk-TEW3ODXX.js.map +0 -1
  264. package/dist/chunk-WBAXXG34.cjs.map +0 -1
  265. package/dist/chunk-WCHE6FJ7.js.map +0 -1
  266. package/dist/chunk-WNFLWMEP.cjs.map +0 -1
  267. package/dist/chunk-WUFFST2N.cjs.map +0 -1
  268. package/dist/chunk-XHKMGOON.cjs.map +0 -1
  269. package/dist/chunk-YSQE5IHK.cjs.map +0 -1
  270. package/dist/chunk-ZISECZZO.js.map +0 -1
  271. package/dist/chunk-ZV5CC35D.js +0 -3
  272. package/dist/models-dev-BL5TAKE6.js +0 -3
  273. package/dist/models-dev-HZ3LZHPX.cjs +0 -12
  274. package/dist/netlify-TX6V7SJJ.cjs +0 -12
  275. package/dist/netlify-VJXBII33.js +0 -3
  276. package/dist/registry-generator-6WVOHM2L.cjs.map +0 -1
  277. package/dist/registry-generator-DXRSYYYT.js.map +0 -1
@@ -1,15 +1,9 @@
1
- import { ModelsDevGateway, parseModelRouterId } from './chunk-SL7VKAQ3.js';
2
- import { NetlifyGateway } from './chunk-34ZCWSUA.js';
3
- import { RuntimeContext } from './chunk-HLRWYUFN.js';
4
- import { MastraError } from './chunk-PZUZNPFM.js';
5
1
  import fs from 'fs';
6
2
  import { createRequire } from 'module';
7
3
  import os from 'os';
8
4
  import path from 'path';
9
- import { createHash, randomUUID } from 'crypto';
10
- import { createOpenAICompatible } from '@ai-sdk/openai-compatible-v5';
11
- import { createGoogleGenerativeAI } from '@ai-sdk/google-v5';
12
- import { createOpenAI } from '@ai-sdk/openai-v5';
5
+
6
+ // src/llm/model/provider-registry.ts
13
7
 
14
8
  // src/llm/model/provider-registry.json
15
9
  var provider_registry_default = {
@@ -19,7 +13,13 @@ var provider_registry_default = {
19
13
  apiKeyEnvVar: "MOONSHOT_API_KEY",
20
14
  apiKeyHeader: "Authorization",
21
15
  name: "Moonshot AI (China)",
22
- models: ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
16
+ models: [
17
+ "kimi-k2-0711-preview",
18
+ "kimi-k2-0905-preview",
19
+ "kimi-k2-thinking",
20
+ "kimi-k2-thinking-turbo",
21
+ "kimi-k2-turbo-preview"
22
+ ],
23
23
  docUrl: "https://platform.moonshot.cn/docs/api/chat",
24
24
  gateway: "models.dev"
25
25
  },
@@ -37,7 +37,13 @@ var provider_registry_default = {
37
37
  apiKeyEnvVar: "MOONSHOT_API_KEY",
38
38
  apiKeyHeader: "Authorization",
39
39
  name: "Moonshot AI",
40
- models: ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
40
+ models: [
41
+ "kimi-k2-0711-preview",
42
+ "kimi-k2-0905-preview",
43
+ "kimi-k2-thinking",
44
+ "kimi-k2-thinking-turbo",
45
+ "kimi-k2-turbo-preview"
46
+ ],
41
47
  docUrl: "https://platform.moonshot.ai/docs/api/chat",
42
48
  gateway: "models.dev"
43
49
  },
@@ -118,6 +124,8 @@ var provider_registry_default = {
118
124
  "grok-3-mini-fast-latest",
119
125
  "grok-3-mini-latest",
120
126
  "grok-4",
127
+ "grok-4-1-fast",
128
+ "grok-4-1-fast-non-reasoning",
121
129
  "grok-4-fast",
122
130
  "grok-4-fast-non-reasoning",
123
131
  "grok-beta",
@@ -153,17 +161,21 @@ var provider_registry_default = {
153
161
  "deepseek-ai/deepseek-v3.1-terminus",
154
162
  "google/gemma-3-27b-it",
155
163
  "microsoft/phi-4-mini-instruct",
164
+ "minimaxai/minimax-m2",
156
165
  "moonshotai/kimi-k2-instruct",
157
166
  "moonshotai/kimi-k2-instruct-0905",
158
167
  "nvidia/cosmos-nemotron-34b",
159
168
  "nvidia/llama-3.1-nemotron-ultra-253b-v1",
160
169
  "nvidia/llama-embed-nemotron-8b",
161
170
  "nvidia/nemoretriever-ocr-v1",
171
+ "nvidia/nvidia-nemotron-nano-9b-v2",
162
172
  "nvidia/parakeet-tdt-0.6b-v2",
163
173
  "openai/gpt-oss-120b",
164
174
  "openai/whisper-large-v3",
165
175
  "qwen/qwen3-235b-a22b",
166
- "qwen/qwen3-coder-480b-a35b-instruct"
176
+ "qwen/qwen3-coder-480b-a35b-instruct",
177
+ "qwen/qwen3-next-80b-a3b-instruct",
178
+ "qwen/qwen3-next-80b-a3b-thinking"
167
179
  ],
168
180
  docUrl: "https://docs.api.nvidia.com/nim/",
169
181
  gateway: "models.dev"
@@ -207,7 +219,6 @@ var provider_registry_default = {
207
219
  mistral: {
208
220
  url: "https://api.mistral.ai/v1",
209
221
  apiKeyEnvVar: "MISTRAL_API_KEY",
210
- apiKeyHeader: "Authorization",
211
222
  name: "Mistral",
212
223
  models: [
213
224
  "codestral-latest",
@@ -258,7 +269,7 @@ var provider_registry_default = {
258
269
  "anthropic/claude-4-sonnet",
259
270
  "anthropic/claude-4.5-sonnet",
260
271
  "anthropic/claude-haiku-4.5",
261
- "cerebras/qwen3-coder",
272
+ "anthropic/claude-opus-4.5",
262
273
  "deepseek/deepseek-r1",
263
274
  "deepseek/deepseek-r1-distill-llama-70b",
264
275
  "deepseek/deepseek-v3.1-terminus",
@@ -271,9 +282,11 @@ var provider_registry_default = {
271
282
  "google/gemini-2.5-flash-lite-preview-09-2025",
272
283
  "google/gemini-2.5-flash-preview-09-2025",
273
284
  "google/gemini-2.5-pro",
285
+ "google/gemini-3-pro-preview",
274
286
  "meta/llama-3.3-70b",
275
287
  "meta/llama-4-maverick",
276
288
  "meta/llama-4-scout",
289
+ "minimax/minimax-m2",
277
290
  "mistral/codestral",
278
291
  "mistral/magistral-medium",
279
292
  "mistral/magistral-small",
@@ -328,10 +341,10 @@ var provider_registry_default = {
328
341
  gateway: "models.dev"
329
342
  },
330
343
  nebius: {
331
- url: "https://api.studio.nebius.com/v1/",
344
+ url: "https://api.tokenfactory.nebius.com/v1",
332
345
  apiKeyEnvVar: "NEBIUS_API_KEY",
333
346
  apiKeyHeader: "Authorization",
334
- name: "Nebius AI Studio",
347
+ name: "Nebius Token Factory",
335
348
  models: [
336
349
  "NousResearch/hermes-4-405b",
337
350
  "NousResearch/hermes-4-70b",
@@ -349,7 +362,7 @@ var provider_registry_default = {
349
362
  "zai-org/glm-4.5",
350
363
  "zai-org/glm-4.5-air"
351
364
  ],
352
- docUrl: "https://docs.studio.nebius.com/quickstart",
365
+ docUrl: "https://docs.tokenfactory.nebius.com/",
353
366
  gateway: "models.dev"
354
367
  },
355
368
  deepseek: {
@@ -450,7 +463,8 @@ var provider_registry_default = {
450
463
  "qwen-2.5-vl",
451
464
  "qwen3-235b",
452
465
  "qwen3-4b",
453
- "venice-uncensored"
466
+ "venice-uncensored",
467
+ "zai-org-glm-4.6"
454
468
  ],
455
469
  docUrl: "https://docs.venice.ai",
456
470
  gateway: "models.dev"
@@ -461,39 +475,58 @@ var provider_registry_default = {
461
475
  apiKeyHeader: "Authorization",
462
476
  name: "Chutes",
463
477
  models: [
478
+ "Alibaba-NLP/Tongyi-DeepResearch-30B-A3B",
479
+ "ArliAI/QwQ-32B-ArliAI-RpR-v1",
480
+ "MiniMaxAI/MiniMax-M2",
481
+ "NousResearch/DeepHermes-3-Mistral-24B-Preview",
482
+ "NousResearch/Hermes-4-14B",
483
+ "NousResearch/Hermes-4-405B-FP8",
484
+ "NousResearch/Hermes-4-70B",
485
+ "OpenGVLab/InternVL3-78B",
486
+ "Qwen/Qwen2.5-72B-Instruct",
487
+ "Qwen/Qwen2.5-Coder-32B-Instruct",
488
+ "Qwen/Qwen2.5-VL-32B-Instruct",
489
+ "Qwen/Qwen2.5-VL-72B-Instruct",
490
+ "Qwen/Qwen3-14B",
491
+ "Qwen/Qwen3-235B-A22B",
464
492
  "Qwen/Qwen3-235B-A22B-Instruct-2507",
465
493
  "Qwen/Qwen3-235B-A22B-Thinking-2507",
466
494
  "Qwen/Qwen3-30B-A3B",
467
495
  "Qwen/Qwen3-30B-A3B-Instruct-2507",
468
- "Qwen/Qwen3-30B-A3B-Thinking-2507",
496
+ "Qwen/Qwen3-32B",
469
497
  "Qwen/Qwen3-Coder-30B-A3B-Instruct",
470
498
  "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
471
499
  "Qwen/Qwen3-Next-80B-A3B-Instruct",
472
- "Qwen/Qwen3-Next-80B-A3B-Thinking",
473
- "chutesai/Devstral-Small-2505",
500
+ "Qwen/Qwen3-VL-235B-A22B-Instruct",
501
+ "Qwen/Qwen3-VL-235B-A22B-Thinking",
502
+ "chutesai/Mistral-Small-3.1-24B-Instruct-2503",
474
503
  "chutesai/Mistral-Small-3.2-24B-Instruct-2506",
504
+ "deepseek-ai/DeepSeek-R1",
475
505
  "deepseek-ai/DeepSeek-R1-0528",
476
506
  "deepseek-ai/DeepSeek-R1-0528-Qwen3-8B",
477
507
  "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
508
+ "deepseek-ai/DeepSeek-V3",
478
509
  "deepseek-ai/DeepSeek-V3-0324",
479
510
  "deepseek-ai/DeepSeek-V3.1",
480
511
  "deepseek-ai/DeepSeek-V3.1-Terminus",
481
- "deepseek-ai/DeepSeek-V3.1-turbo",
482
- "deepseek-ai/DeepSeek-V3.1:THINKING",
483
512
  "deepseek-ai/DeepSeek-V3.2-Exp",
484
513
  "meituan-longcat/LongCat-Flash-Chat-FP8",
485
- "moonshotai/Kimi-Dev-72B",
514
+ "microsoft/MAI-DS-R1-FP8",
486
515
  "moonshotai/Kimi-K2-Instruct-0905",
487
- "moonshotai/Kimi-K2-Instruct-75k",
488
- "moonshotai/Kimi-VL-A3B-Thinking",
516
+ "moonshotai/Kimi-K2-Thinking",
489
517
  "openai/gpt-oss-120b",
518
+ "openai/gpt-oss-20b",
519
+ "rednote-hilab/dots.ocr",
490
520
  "tngtech/DeepSeek-R1T-Chimera",
491
521
  "tngtech/DeepSeek-TNG-R1T2-Chimera",
522
+ "unsloth/Mistral-Nemo-Instruct-2407",
523
+ "unsloth/Mistral-Small-24B-Instruct-2501",
524
+ "unsloth/gemma-3-12b-it",
525
+ "unsloth/gemma-3-27b-it",
526
+ "unsloth/gemma-3-4b-it",
527
+ "zai-org/GLM-4.5",
492
528
  "zai-org/GLM-4.5-Air",
493
- "zai-org/GLM-4.5-FP8",
494
- "zai-org/GLM-4.5-turbo",
495
- "zai-org/GLM-4.6-FP8",
496
- "zai-org/GLM-4.6-turbo"
529
+ "zai-org/GLM-4.6"
497
530
  ],
498
531
  docUrl: "https://llm.chutes.ai/v1/models",
499
532
  gateway: "models.dev"
@@ -605,10 +638,97 @@ var provider_registry_default = {
605
638
  apiKeyEnvVar: "BASETEN_API_KEY",
606
639
  apiKeyHeader: "Authorization",
607
640
  name: "Baseten",
608
- models: ["Qwen3/Qwen3-Coder-480B-A35B-Instruct", "moonshotai/Kimi-K2-Instruct-0905", "zai-org/GLM-4.6"],
641
+ models: [
642
+ "Qwen/Qwen3-Coder-480B-A35B-Instruct",
643
+ "moonshotai/Kimi-K2-Instruct-0905",
644
+ "moonshotai/Kimi-K2-Thinking",
645
+ "zai-org/GLM-4.6"
646
+ ],
609
647
  docUrl: "https://docs.baseten.co/development/model-apis/overview",
610
648
  gateway: "models.dev"
611
649
  },
650
+ siliconflow: {
651
+ url: "https://api.siliconflow.com/v1",
652
+ apiKeyEnvVar: "SILICONFLOW_API_KEY",
653
+ apiKeyHeader: "Authorization",
654
+ name: "SiliconFlow",
655
+ models: [
656
+ "baidu-ernie-4.5-300b-a47b",
657
+ "bytedance-seed-seed-oss-36b-instruct",
658
+ "deepseek-ai-deepseek-r1",
659
+ "deepseek-ai-deepseek-r1-distill-qwen-14b",
660
+ "deepseek-ai-deepseek-r1-distill-qwen-32b",
661
+ "deepseek-ai-deepseek-r1-distill-qwen-7b",
662
+ "deepseek-ai-deepseek-v3",
663
+ "deepseek-ai-deepseek-v3.1",
664
+ "deepseek-ai-deepseek-v3.1-terminus",
665
+ "deepseek-ai-deepseek-v3.2-exp",
666
+ "deepseek-ai-deepseek-vl2",
667
+ "inclusionai-ling-flash-2.0",
668
+ "inclusionai-ling-mini-2.0",
669
+ "inclusionai-ring-flash-2.0",
670
+ "meta-llama-meta-llama-3.1-8b-instruct",
671
+ "minimaxai-minimax-m1-80k",
672
+ "minimaxai-minimax-m2",
673
+ "moonshotai-kimi-dev-72b",
674
+ "moonshotai-kimi-k2-instruct",
675
+ "moonshotai-kimi-k2-instruct-0905",
676
+ "moonshotai-kimi-k2-thinking",
677
+ "nex-agi-deepseek-v3.1-nex-n1",
678
+ "openai-gpt-oss-120b",
679
+ "openai-gpt-oss-20b",
680
+ "qwen-qwen2.5-14b-instruct",
681
+ "qwen-qwen2.5-32b-instruct",
682
+ "qwen-qwen2.5-72b-instruct",
683
+ "qwen-qwen2.5-72b-instruct-128k",
684
+ "qwen-qwen2.5-7b-instruct",
685
+ "qwen-qwen2.5-coder-32b-instruct",
686
+ "qwen-qwen2.5-vl-32b-instruct",
687
+ "qwen-qwen2.5-vl-72b-instruct",
688
+ "qwen-qwen2.5-vl-7b-instruct",
689
+ "qwen-qwen3-14b",
690
+ "qwen-qwen3-235b-a22b",
691
+ "qwen-qwen3-235b-a22b-instruct-2507",
692
+ "qwen-qwen3-235b-a22b-thinking-2507",
693
+ "qwen-qwen3-30b-a3b",
694
+ "qwen-qwen3-30b-a3b-instruct-2507",
695
+ "qwen-qwen3-30b-a3b-thinking-2507",
696
+ "qwen-qwen3-32b",
697
+ "qwen-qwen3-8b",
698
+ "qwen-qwen3-coder-30b-a3b-instruct",
699
+ "qwen-qwen3-coder-480b-a35b-instruct",
700
+ "qwen-qwen3-next-80b-a3b-instruct",
701
+ "qwen-qwen3-next-80b-a3b-thinking",
702
+ "qwen-qwen3-omni-30b-a3b-captioner",
703
+ "qwen-qwen3-omni-30b-a3b-instruct",
704
+ "qwen-qwen3-omni-30b-a3b-thinking",
705
+ "qwen-qwen3-vl-235b-a22b-instruct",
706
+ "qwen-qwen3-vl-235b-a22b-thinking",
707
+ "qwen-qwen3-vl-30b-a3b-instruct",
708
+ "qwen-qwen3-vl-30b-a3b-thinking",
709
+ "qwen-qwen3-vl-32b-instruct",
710
+ "qwen-qwen3-vl-32b-thinking",
711
+ "qwen-qwen3-vl-8b-instruct",
712
+ "qwen-qwen3-vl-8b-thinking",
713
+ "qwen-qwq-32b",
714
+ "stepfun-ai-step3",
715
+ "tencent-hunyuan-a13b-instruct",
716
+ "tencent-hunyuan-mt-7b",
717
+ "thudm-glm-4-32b-0414",
718
+ "thudm-glm-4-9b-0414",
719
+ "thudm-glm-4.1v-9b-thinking",
720
+ "thudm-glm-z1-32b-0414",
721
+ "thudm-glm-z1-9b-0414",
722
+ "z-ai-glm-4.5",
723
+ "z-ai-glm-4.5-air",
724
+ "zai-org-glm-4.5",
725
+ "zai-org-glm-4.5-air",
726
+ "zai-org-glm-4.5v",
727
+ "zai-org-glm-4.6"
728
+ ],
729
+ docUrl: "https://cloud.siliconflow.com/models",
730
+ gateway: "models.dev"
731
+ },
612
732
  huggingface: {
613
733
  url: "https://router.huggingface.co/v1",
614
734
  apiKeyEnvVar: "HF_TOKEN",
@@ -639,19 +759,26 @@ var provider_registry_default = {
639
759
  apiKeyHeader: "Authorization",
640
760
  name: "OpenCode Zen",
641
761
  models: [
642
- "an-gbt",
762
+ "alpha-doubao-seed-code",
763
+ "alpha-gd4",
764
+ "alpha-minimax-m2",
643
765
  "big-pickle",
644
766
  "claude-3-5-haiku",
645
767
  "claude-haiku-4-5",
646
768
  "claude-opus-4-1",
769
+ "claude-opus-4-5",
647
770
  "claude-sonnet-4",
648
771
  "claude-sonnet-4-5",
772
+ "gemini-3-pro",
649
773
  "glm-4.6",
650
774
  "gpt-5",
651
775
  "gpt-5-codex",
776
+ "gpt-5-nano",
777
+ "gpt-5.1",
778
+ "gpt-5.1-codex",
652
779
  "grok-code",
653
780
  "kimi-k2",
654
- "minimax-m2",
781
+ "kimi-k2-thinking",
655
782
  "qwen3-coder"
656
783
  ],
657
784
  docUrl: "https://opencode.ai/docs/zen",
@@ -681,6 +808,15 @@ var provider_registry_default = {
681
808
  docUrl: "https://fastrouter.ai/models",
682
809
  gateway: "models.dev"
683
810
  },
811
+ minimax: {
812
+ url: "https://api.minimax.io/anthropic/v1",
813
+ apiKeyEnvVar: "MINIMAX_API_KEY",
814
+ apiKeyHeader: "Authorization",
815
+ name: "Minimax",
816
+ models: ["MiniMax-M2"],
817
+ docUrl: "https://platform.minimax.io/docs/guides/quickstart",
818
+ gateway: "models.dev"
819
+ },
684
820
  google: {
685
821
  apiKeyEnvVar: "GOOGLE_GENERATIVE_AI_API_KEY",
686
822
  name: "Google",
@@ -704,6 +840,7 @@ var provider_registry_default = {
704
840
  "gemini-2.5-pro-preview-05-06",
705
841
  "gemini-2.5-pro-preview-06-05",
706
842
  "gemini-2.5-pro-preview-tts",
843
+ "gemini-3-pro-preview",
707
844
  "gemini-embedding-001",
708
845
  "gemini-flash-latest",
709
846
  "gemini-flash-lite-latest",
@@ -764,6 +901,10 @@ var provider_registry_default = {
764
901
  "gpt-5-mini",
765
902
  "gpt-5-nano",
766
903
  "gpt-5-pro",
904
+ "gpt-5.1",
905
+ "gpt-5.1-chat-latest",
906
+ "gpt-5.1-codex",
907
+ "gpt-5.1-codex-mini",
767
908
  "o1",
768
909
  "o1-mini",
769
910
  "o1-preview",
@@ -809,6 +950,7 @@ var provider_registry_default = {
809
950
  "anthropic/claude-haiku-4.5",
810
951
  "anthropic/claude-opus-4",
811
952
  "anthropic/claude-opus-4.1",
953
+ "anthropic/claude-opus-4.5",
812
954
  "anthropic/claude-sonnet-4",
813
955
  "anthropic/claude-sonnet-4.5",
814
956
  "cognitivecomputations/dolphin3.0-mistral-24b",
@@ -833,18 +975,20 @@ var provider_registry_default = {
833
975
  "google/gemini-2.5-pro",
834
976
  "google/gemini-2.5-pro-preview-05-06",
835
977
  "google/gemini-2.5-pro-preview-06-05",
978
+ "google/gemini-3-pro-preview",
836
979
  "google/gemma-2-9b-it:free",
837
980
  "google/gemma-3-12b-it",
838
981
  "google/gemma-3-27b-it",
839
982
  "google/gemma-3n-e4b-it",
840
983
  "google/gemma-3n-e4b-it:free",
984
+ "kwaipilot/kat-coder-pro:free",
841
985
  "meta-llama/llama-3.2-11b-vision-instruct",
842
986
  "meta-llama/llama-3.3-70b-instruct:free",
843
987
  "meta-llama/llama-4-scout:free",
844
988
  "microsoft/mai-ds-r1:free",
845
989
  "minimax/minimax-01",
846
990
  "minimax/minimax-m1",
847
- "minimax/minimax-m2:free",
991
+ "minimax/minimax-m2",
848
992
  "mistralai/codestral-2508",
849
993
  "mistralai/devstral-medium-2507",
850
994
  "mistralai/devstral-small-2505",
@@ -861,10 +1005,12 @@ var provider_registry_default = {
861
1005
  "moonshotai/kimi-k2",
862
1006
  "moonshotai/kimi-k2-0905",
863
1007
  "moonshotai/kimi-k2-0905:exacto",
1008
+ "moonshotai/kimi-k2-thinking",
864
1009
  "moonshotai/kimi-k2:free",
865
1010
  "nousresearch/deephermes-3-llama-3-8b-preview",
866
1011
  "nousresearch/hermes-4-405b",
867
1012
  "nousresearch/hermes-4-70b",
1013
+ "nvidia/nemotron-nano-9b-v2",
868
1014
  "openai/gpt-4.1",
869
1015
  "openai/gpt-4.1-mini",
870
1016
  "openai/gpt-4o-mini",
@@ -875,15 +1021,15 @@ var provider_registry_default = {
875
1021
  "openai/gpt-5-mini",
876
1022
  "openai/gpt-5-nano",
877
1023
  "openai/gpt-5-pro",
1024
+ "openai/gpt-5.1",
1025
+ "openai/gpt-5.1-chat",
1026
+ "openai/gpt-5.1-codex",
1027
+ "openai/gpt-5.1-codex-mini",
878
1028
  "openai/gpt-oss-120b",
879
1029
  "openai/gpt-oss-120b:exacto",
880
1030
  "openai/gpt-oss-20b",
1031
+ "openai/gpt-oss-safeguard-20b",
881
1032
  "openai/o4-mini",
882
- "openrouter/cypher-alpha:free",
883
- "openrouter/horizon-alpha",
884
- "openrouter/horizon-beta",
885
- "openrouter/sonoma-dusk-alpha",
886
- "openrouter/sonoma-sky-alpha",
887
1033
  "qwen/qwen-2.5-coder-32b-instruct",
888
1034
  "qwen/qwen2.5-vl-32b-instruct:free",
889
1035
  "qwen/qwen2.5-vl-72b-instruct",
@@ -899,6 +1045,7 @@ var provider_registry_default = {
899
1045
  "qwen/qwen3-32b:free",
900
1046
  "qwen/qwen3-8b:free",
901
1047
  "qwen/qwen3-coder",
1048
+ "qwen/qwen3-coder-flash",
902
1049
  "qwen/qwen3-coder:exacto",
903
1050
  "qwen/qwen3-coder:free",
904
1051
  "qwen/qwen3-max",
@@ -915,6 +1062,7 @@ var provider_registry_default = {
915
1062
  "x-ai/grok-3-mini-beta",
916
1063
  "x-ai/grok-4",
917
1064
  "x-ai/grok-4-fast",
1065
+ "x-ai/grok-4.1-fast",
918
1066
  "x-ai/grok-code-fast-1",
919
1067
  "z-ai/glm-4.5",
920
1068
  "z-ai/glm-4.5-air",
@@ -940,7 +1088,10 @@ var provider_registry_default = {
940
1088
  "inclusionai/lint-1t",
941
1089
  "inclusionai/ring-1t",
942
1090
  "kuaishou/kat-coder-pro-v1",
1091
+ "minimax/minimax-m2",
943
1092
  "moonshotai/kimi-k2-0905",
1093
+ "moonshotai/kimi-k2-thinking",
1094
+ "moonshotai/kimi-k2-thinking-turbo",
944
1095
  "openai/gpt-5",
945
1096
  "openai/gpt-5-codex",
946
1097
  "qwen/qwen3-coder-plus",
@@ -954,6 +1105,59 @@ var provider_registry_default = {
954
1105
  docUrl: "https://docs.zenmux.ai",
955
1106
  gateway: "models.dev"
956
1107
  },
1108
+ ovhcloud: {
1109
+ url: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",
1110
+ apiKeyEnvVar: "OVHCLOUD_API_KEY",
1111
+ apiKeyHeader: "Authorization",
1112
+ name: "OVHcloud AI Endpoints",
1113
+ models: [
1114
+ "deepseek-r1-distill-llama-70b",
1115
+ "gpt-oss-120b",
1116
+ "gpt-oss-20b",
1117
+ "llama-3.1-8b-instruct",
1118
+ "llava-next-mistral-7b",
1119
+ "meta-llama-3_1-70b-instruct",
1120
+ "meta-llama-3_3-70b-instruct",
1121
+ "mistral-7b-instruct-v0.3",
1122
+ "mistral-nemo-instruct-2407",
1123
+ "mistral-small-3.2-24b-instruct-2506",
1124
+ "mixtral-8x7b-instruct-v0.1",
1125
+ "qwen2.5-coder-32b-instruct",
1126
+ "qwen2.5-vl-72b-instruct",
1127
+ "qwen3-32b",
1128
+ "qwen3-coder-30b-a3b-instruct"
1129
+ ],
1130
+ docUrl: "https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog//",
1131
+ gateway: "models.dev"
1132
+ },
1133
+ iflowcn: {
1134
+ url: "https://apis.iflow.cn/v1",
1135
+ apiKeyEnvVar: "IFLOW_API_KEY",
1136
+ apiKeyHeader: "Authorization",
1137
+ name: "iFlow",
1138
+ models: [
1139
+ "deepseek-r1",
1140
+ "deepseek-v3",
1141
+ "deepseek-v3.1",
1142
+ "deepseek-v3.2",
1143
+ "glm-4.6",
1144
+ "kimi-k2",
1145
+ "kimi-k2-0905",
1146
+ "minimax-m2",
1147
+ "qwen3-235b",
1148
+ "qwen3-235b-a22b-instruct",
1149
+ "qwen3-235b-a22b-thinking-2507",
1150
+ "qwen3-32b",
1151
+ "qwen3-coder",
1152
+ "qwen3-coder-plus",
1153
+ "qwen3-max",
1154
+ "qwen3-max-preview",
1155
+ "qwen3-vl-plus",
1156
+ "tstars2.0"
1157
+ ],
1158
+ docUrl: "https://platform.iflow.cn/en/docs",
1159
+ gateway: "models.dev"
1160
+ },
957
1161
  synthetic: {
958
1162
  url: "https://api.synthetic.new/v1",
959
1163
  apiKeyEnvVar: "SYNTHETIC_API_KEY",
@@ -979,6 +1183,7 @@ var provider_registry_default = {
979
1183
  "hf:meta-llama/Llama-4-Scout-17B-16E-Instruct",
980
1184
  "hf:moonshotai/Kimi-K2-Instruct",
981
1185
  "hf:moonshotai/Kimi-K2-Instruct-0905",
1186
+ "hf:moonshotai/Kimi-K2-Thinking",
982
1187
  "hf:openai/gpt-oss-120b",
983
1188
  "hf:zai-org/GLM-4.5",
984
1189
  "hf:zai-org/GLM-4.6"
@@ -995,6 +1200,8 @@ var provider_registry_default = {
995
1200
  "Qwen/Qwen3-Coder-480B-A35B-Instruct",
996
1201
  "Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo",
997
1202
  "moonshotai/Kimi-K2-Instruct",
1203
+ "openai/gpt-oss-120b",
1204
+ "openai/gpt-oss-20b",
998
1205
  "zai-org/GLM-4.5"
999
1206
  ],
1000
1207
  docUrl: "https://deepinfra.com/models",
@@ -1063,9 +1270,11 @@ var provider_registry_default = {
1063
1270
  name: "Requesty",
1064
1271
  models: [
1065
1272
  "anthropic/claude-3-7-sonnet",
1066
- "anthropic/claude-4-sonnet-20250522",
1273
+ "anthropic/claude-haiku-4-5",
1067
1274
  "anthropic/claude-opus-4",
1068
- "anthropic/claude-opus-4-1-20250805",
1275
+ "anthropic/claude-opus-4-1",
1276
+ "anthropic/claude-sonnet-4",
1277
+ "anthropic/claude-sonnet-4-5",
1069
1278
  "google/gemini-2.5-flash",
1070
1279
  "google/gemini-2.5-pro",
1071
1280
  "openai/gpt-4.1",
@@ -1074,7 +1283,9 @@ var provider_registry_default = {
1074
1283
  "openai/gpt-5",
1075
1284
  "openai/gpt-5-mini",
1076
1285
  "openai/gpt-5-nano",
1077
- "openai/o4-mini"
1286
+ "openai/o4-mini",
1287
+ "xai/grok-4",
1288
+ "xai/grok-4-fast"
1078
1289
  ],
1079
1290
  docUrl: "https://requesty.ai/solution/llm-routing/models",
1080
1291
  gateway: "models.dev"
@@ -1116,6 +1327,7 @@ var provider_registry_default = {
1116
1327
  "claude-opus-4-1",
1117
1328
  "claude-opus-4-1-20250805",
1118
1329
  "claude-opus-4-20250514",
1330
+ "claude-opus-4-5",
1119
1331
  "claude-sonnet-4-0",
1120
1332
  "claude-sonnet-4-20250514",
1121
1333
  "claude-sonnet-4-5",
@@ -1138,6 +1350,8 @@ var provider_registry_default = {
1138
1350
  "accounts/fireworks/models/gpt-oss-120b",
1139
1351
  "accounts/fireworks/models/gpt-oss-20b",
1140
1352
  "accounts/fireworks/models/kimi-k2-instruct",
1353
+ "accounts/fireworks/models/kimi-k2-thinking",
1354
+ "accounts/fireworks/models/minimax-m2",
1141
1355
  "accounts/fireworks/models/qwen3-235b-a22b",
1142
1356
  "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct"
1143
1357
  ],
@@ -1201,12 +1415,122 @@ var provider_registry_default = {
1201
1415
  docUrl: "https://www.scaleway.com/en/docs/generative-apis/",
1202
1416
  gateway: "models.dev"
1203
1417
  },
1418
+ poe: {
1419
+ url: "https://api.poe.com/v1",
1420
+ apiKeyEnvVar: "POE_API_KEY",
1421
+ apiKeyHeader: "Authorization",
1422
+ name: "Poe",
1423
+ models: [
1424
+ "anthropic/claude-haiku-3",
1425
+ "anthropic/claude-haiku-3.5",
1426
+ "anthropic/claude-haiku-3.5-search",
1427
+ "anthropic/claude-haiku-4.5",
1428
+ "anthropic/claude-opus-3",
1429
+ "anthropic/claude-opus-4",
1430
+ "anthropic/claude-opus-4-reasoning",
1431
+ "anthropic/claude-opus-4-search",
1432
+ "anthropic/claude-opus-4.1",
1433
+ "anthropic/claude-sonnet-3.5",
1434
+ "anthropic/claude-sonnet-3.5-june",
1435
+ "anthropic/claude-sonnet-3.7",
1436
+ "anthropic/claude-sonnet-3.7-reasoning",
1437
+ "anthropic/claude-sonnet-3.7-search",
1438
+ "anthropic/claude-sonnet-4",
1439
+ "anthropic/claude-sonnet-4-reasoning",
1440
+ "anthropic/claude-sonnet-4-search",
1441
+ "anthropic/claude-sonnet-4.5",
1442
+ "elevenlabs/elevenlabs-music",
1443
+ "elevenlabs/elevenlabs-v2.5-turbo",
1444
+ "elevenlabs/elevenlabs-v3",
1445
+ "facebook/llama-3.1-405b",
1446
+ "facebook/llama-3.1-70b",
1447
+ "facebook/llama-3.1-8b",
1448
+ "google/gemini-2.0-flash",
1449
+ "google/gemini-2.0-flash-lite",
1450
+ "google/gemini-2.5-flash",
1451
+ "google/gemini-2.5-flash-lite",
1452
+ "google/gemini-2.5-pro",
1453
+ "google/gemini-3.0-pro",
1454
+ "google/imagen-3",
1455
+ "google/imagen-3-fast",
1456
+ "google/imagen-4",
1457
+ "google/imagen-4-fast",
1458
+ "google/imagen-4-ultra",
1459
+ "google/lyria",
1460
+ "google/nano-banana",
1461
+ "google/veo-2",
1462
+ "google/veo-3",
1463
+ "google/veo-3-fast",
1464
+ "google/veo-3.1",
1465
+ "google/veo-3.1-fast",
1466
+ "ideogramai/ideogram",
1467
+ "ideogramai/ideogram-v2",
1468
+ "ideogramai/ideogram-v2a",
1469
+ "ideogramai/ideogram-v2a-turbo",
1470
+ "lumalabs/dream-machine",
1471
+ "lumalabs/ray2",
1472
+ "novita/glm-4.6",
1473
+ "openAi/chatgpt-4o-latest",
1474
+ "openAi/dall-e-3",
1475
+ "openAi/gpt-3.5-turbo",
1476
+ "openAi/gpt-3.5-turbo-instruct",
1477
+ "openAi/gpt-3.5-turbo-raw",
1478
+ "openAi/gpt-4-classic",
1479
+ "openAi/gpt-4-classic-0314",
1480
+ "openAi/gpt-4-turbo",
1481
+ "openAi/gpt-4.1",
1482
+ "openAi/gpt-4.1-mini",
1483
+ "openAi/gpt-4.1-nano",
1484
+ "openAi/gpt-4o",
1485
+ "openAi/gpt-4o-aug",
1486
+ "openAi/gpt-4o-mini",
1487
+ "openAi/gpt-4o-mini-search",
1488
+ "openAi/gpt-4o-search",
1489
+ "openAi/gpt-5",
1490
+ "openAi/gpt-5-chat",
1491
+ "openAi/gpt-5-codex",
1492
+ "openAi/gpt-5-mini",
1493
+ "openAi/gpt-5-nano",
1494
+ "openAi/gpt-5-pro",
1495
+ "openAi/gpt-image-1",
1496
+ "openAi/gpt-image-1-mini",
1497
+ "openAi/o1",
1498
+ "openAi/o1-pro",
1499
+ "openAi/o3",
1500
+ "openAi/o3-deep-research",
1501
+ "openAi/o3-mini",
1502
+ "openAi/o3-mini-high",
1503
+ "openAi/o3-pro",
1504
+ "openAi/o4-mini",
1505
+ "openAi/o4-mini-deep-research",
1506
+ "openAi/sora-2",
1507
+ "openAi/sora-2-pro",
1508
+ "openai/gpt-5.1",
1509
+ "openai/gpt-5.1-codex",
1510
+ "openai/gpt-5.1-codex-mini",
1511
+ "openai/gpt-5.1-instant",
1512
+ "runwayml/runway",
1513
+ "runwayml/runway-gen-4-turbo",
1514
+ "stabilityai/stablediffusionxl",
1515
+ "topazlabs-co/topazlabs",
1516
+ "trytako/tako",
1517
+ "xai/grok-2",
1518
+ "xai/grok-3",
1519
+ "xai/grok-3-mini",
1520
+ "xai/grok-4",
1521
+ "xai/grok-4-fast-non-reasoning",
1522
+ "xai/grok-4-fast-reasoning",
1523
+ "xai/grok-code-fast-1"
1524
+ ],
1525
+ docUrl: "https://creator.poe.com/docs/external-applications/openai-compatible-api",
1526
+ gateway: "models.dev"
1527
+ },
1204
1528
  cerebras: {
1205
1529
  url: "https://api.cerebras.ai/v1",
1206
1530
  apiKeyEnvVar: "CEREBRAS_API_KEY",
1207
1531
  apiKeyHeader: "Authorization",
1208
1532
  name: "Cerebras",
1209
- models: ["gpt-oss-120b", "qwen-3-235b-a22b-instruct-2507", "qwen-3-coder-480b"],
1533
+ models: ["gpt-oss-120b", "qwen-3-235b-a22b-instruct-2507", "zai-glm-4.6"],
1210
1534
  docUrl: "https://inference-docs.cerebras.ai/models/overview",
1211
1535
  gateway: "models.dev"
1212
1536
  },
@@ -1217,23 +1541,25 @@ var provider_registry_default = {
1217
1541
  gateway: "netlify",
1218
1542
  models: [
1219
1543
  "anthropic/claude-3-5-haiku-20241022",
1220
- "anthropic/claude-3-5-haiku-latest",
1221
1544
  "anthropic/claude-3-7-sonnet-20250219",
1222
- "anthropic/claude-3-7-sonnet-latest",
1223
1545
  "anthropic/claude-3-haiku-20240307",
1224
1546
  "anthropic/claude-haiku-4-5-20251001",
1225
1547
  "anthropic/claude-opus-4-1-20250805",
1226
1548
  "anthropic/claude-opus-4-20250514",
1549
+ "anthropic/claude-opus-4-5-20251101",
1227
1550
  "anthropic/claude-sonnet-4-20250514",
1228
1551
  "anthropic/claude-sonnet-4-5-20250929",
1229
1552
  "gemini/gemini-2.0-flash",
1230
1553
  "gemini/gemini-2.0-flash-lite",
1231
1554
  "gemini/gemini-2.5-flash",
1555
+ "gemini/gemini-2.5-flash-image",
1232
1556
  "gemini/gemini-2.5-flash-image-preview",
1233
1557
  "gemini/gemini-2.5-flash-lite",
1234
1558
  "gemini/gemini-2.5-flash-lite-preview-09-2025",
1235
1559
  "gemini/gemini-2.5-flash-preview-09-2025",
1236
1560
  "gemini/gemini-2.5-pro",
1561
+ "gemini/gemini-3-pro-image-preview",
1562
+ "gemini/gemini-3-pro-preview",
1237
1563
  "gemini/gemini-flash-latest",
1238
1564
  "gemini/gemini-flash-lite-latest",
1239
1565
  "openai/codex-mini-latest",
@@ -1243,10 +1569,16 @@ var provider_registry_default = {
1243
1569
  "openai/gpt-4o",
1244
1570
  "openai/gpt-4o-mini",
1245
1571
  "openai/gpt-5",
1572
+ "openai/gpt-5-2025-08-07",
1246
1573
  "openai/gpt-5-codex",
1247
1574
  "openai/gpt-5-mini",
1575
+ "openai/gpt-5-mini-2025-08-07",
1248
1576
  "openai/gpt-5-nano",
1249
1577
  "openai/gpt-5-pro",
1578
+ "openai/gpt-5.1",
1579
+ "openai/gpt-5.1-2025-11-13",
1580
+ "openai/gpt-5.1-codex",
1581
+ "openai/gpt-5.1-codex-mini",
1250
1582
  "openai/o3",
1251
1583
  "openai/o3-mini",
1252
1584
  "openai/o4-mini"
@@ -1255,9 +1587,21 @@ var provider_registry_default = {
1255
1587
  }
1256
1588
  },
1257
1589
  models: {
1258
- "moonshotai-cn": ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
1590
+ "moonshotai-cn": [
1591
+ "kimi-k2-0711-preview",
1592
+ "kimi-k2-0905-preview",
1593
+ "kimi-k2-thinking",
1594
+ "kimi-k2-thinking-turbo",
1595
+ "kimi-k2-turbo-preview"
1596
+ ],
1259
1597
  lucidquery: ["lucidnova-rf1-100b", "lucidquery-nexus-coder"],
1260
- moonshotai: ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
1598
+ moonshotai: [
1599
+ "kimi-k2-0711-preview",
1600
+ "kimi-k2-0905-preview",
1601
+ "kimi-k2-thinking",
1602
+ "kimi-k2-thinking-turbo",
1603
+ "kimi-k2-turbo-preview"
1604
+ ],
1261
1605
  "zai-coding-plan": ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
1262
1606
  alibaba: [
1263
1607
  "qvq-max",
@@ -1316,6 +1660,8 @@ var provider_registry_default = {
1316
1660
  "grok-3-mini-fast-latest",
1317
1661
  "grok-3-mini-latest",
1318
1662
  "grok-4",
1663
+ "grok-4-1-fast",
1664
+ "grok-4-1-fast-non-reasoning",
1319
1665
  "grok-4-fast",
1320
1666
  "grok-4-fast-non-reasoning",
1321
1667
  "grok-beta",
@@ -1335,17 +1681,21 @@ var provider_registry_default = {
1335
1681
  "deepseek-ai/deepseek-v3.1-terminus",
1336
1682
  "google/gemma-3-27b-it",
1337
1683
  "microsoft/phi-4-mini-instruct",
1684
+ "minimaxai/minimax-m2",
1338
1685
  "moonshotai/kimi-k2-instruct",
1339
1686
  "moonshotai/kimi-k2-instruct-0905",
1340
1687
  "nvidia/cosmos-nemotron-34b",
1341
1688
  "nvidia/llama-3.1-nemotron-ultra-253b-v1",
1342
1689
  "nvidia/llama-embed-nemotron-8b",
1343
1690
  "nvidia/nemoretriever-ocr-v1",
1691
+ "nvidia/nvidia-nemotron-nano-9b-v2",
1344
1692
  "nvidia/parakeet-tdt-0.6b-v2",
1345
1693
  "openai/gpt-oss-120b",
1346
1694
  "openai/whisper-large-v3",
1347
1695
  "qwen/qwen3-235b-a22b",
1348
- "qwen/qwen3-coder-480b-a35b-instruct"
1696
+ "qwen/qwen3-coder-480b-a35b-instruct",
1697
+ "qwen/qwen3-next-80b-a3b-instruct",
1698
+ "qwen/qwen3-next-80b-a3b-thinking"
1349
1699
  ],
1350
1700
  upstage: ["solar-mini", "solar-pro2"],
1351
1701
  groq: [
@@ -1408,7 +1758,7 @@ var provider_registry_default = {
1408
1758
  "anthropic/claude-4-sonnet",
1409
1759
  "anthropic/claude-4.5-sonnet",
1410
1760
  "anthropic/claude-haiku-4.5",
1411
- "cerebras/qwen3-coder",
1761
+ "anthropic/claude-opus-4.5",
1412
1762
  "deepseek/deepseek-r1",
1413
1763
  "deepseek/deepseek-r1-distill-llama-70b",
1414
1764
  "deepseek/deepseek-v3.1-terminus",
@@ -1421,9 +1771,11 @@ var provider_registry_default = {
1421
1771
  "google/gemini-2.5-flash-lite-preview-09-2025",
1422
1772
  "google/gemini-2.5-flash-preview-09-2025",
1423
1773
  "google/gemini-2.5-pro",
1774
+ "google/gemini-3-pro-preview",
1424
1775
  "meta/llama-3.3-70b",
1425
1776
  "meta/llama-4-maverick",
1426
1777
  "meta/llama-4-scout",
1778
+ "minimax/minimax-m2",
1427
1779
  "mistral/codestral",
1428
1780
  "mistral/magistral-medium",
1429
1781
  "mistral/magistral-small",
@@ -1568,42 +1920,62 @@ var provider_registry_default = {
1568
1920
  "qwen-2.5-vl",
1569
1921
  "qwen3-235b",
1570
1922
  "qwen3-4b",
1571
- "venice-uncensored"
1923
+ "venice-uncensored",
1924
+ "zai-org-glm-4.6"
1572
1925
  ],
1573
1926
  chutes: [
1927
+ "Alibaba-NLP/Tongyi-DeepResearch-30B-A3B",
1928
+ "ArliAI/QwQ-32B-ArliAI-RpR-v1",
1929
+ "MiniMaxAI/MiniMax-M2",
1930
+ "NousResearch/DeepHermes-3-Mistral-24B-Preview",
1931
+ "NousResearch/Hermes-4-14B",
1932
+ "NousResearch/Hermes-4-405B-FP8",
1933
+ "NousResearch/Hermes-4-70B",
1934
+ "OpenGVLab/InternVL3-78B",
1935
+ "Qwen/Qwen2.5-72B-Instruct",
1936
+ "Qwen/Qwen2.5-Coder-32B-Instruct",
1937
+ "Qwen/Qwen2.5-VL-32B-Instruct",
1938
+ "Qwen/Qwen2.5-VL-72B-Instruct",
1939
+ "Qwen/Qwen3-14B",
1940
+ "Qwen/Qwen3-235B-A22B",
1574
1941
  "Qwen/Qwen3-235B-A22B-Instruct-2507",
1575
1942
  "Qwen/Qwen3-235B-A22B-Thinking-2507",
1576
1943
  "Qwen/Qwen3-30B-A3B",
1577
1944
  "Qwen/Qwen3-30B-A3B-Instruct-2507",
1578
- "Qwen/Qwen3-30B-A3B-Thinking-2507",
1945
+ "Qwen/Qwen3-32B",
1579
1946
  "Qwen/Qwen3-Coder-30B-A3B-Instruct",
1580
1947
  "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
1581
1948
  "Qwen/Qwen3-Next-80B-A3B-Instruct",
1582
- "Qwen/Qwen3-Next-80B-A3B-Thinking",
1583
- "chutesai/Devstral-Small-2505",
1949
+ "Qwen/Qwen3-VL-235B-A22B-Instruct",
1950
+ "Qwen/Qwen3-VL-235B-A22B-Thinking",
1951
+ "chutesai/Mistral-Small-3.1-24B-Instruct-2503",
1584
1952
  "chutesai/Mistral-Small-3.2-24B-Instruct-2506",
1953
+ "deepseek-ai/DeepSeek-R1",
1585
1954
  "deepseek-ai/DeepSeek-R1-0528",
1586
1955
  "deepseek-ai/DeepSeek-R1-0528-Qwen3-8B",
1587
1956
  "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
1957
+ "deepseek-ai/DeepSeek-V3",
1588
1958
  "deepseek-ai/DeepSeek-V3-0324",
1589
1959
  "deepseek-ai/DeepSeek-V3.1",
1590
1960
  "deepseek-ai/DeepSeek-V3.1-Terminus",
1591
- "deepseek-ai/DeepSeek-V3.1-turbo",
1592
- "deepseek-ai/DeepSeek-V3.1:THINKING",
1593
1961
  "deepseek-ai/DeepSeek-V3.2-Exp",
1594
1962
  "meituan-longcat/LongCat-Flash-Chat-FP8",
1595
- "moonshotai/Kimi-Dev-72B",
1963
+ "microsoft/MAI-DS-R1-FP8",
1596
1964
  "moonshotai/Kimi-K2-Instruct-0905",
1597
- "moonshotai/Kimi-K2-Instruct-75k",
1598
- "moonshotai/Kimi-VL-A3B-Thinking",
1965
+ "moonshotai/Kimi-K2-Thinking",
1599
1966
  "openai/gpt-oss-120b",
1967
+ "openai/gpt-oss-20b",
1968
+ "rednote-hilab/dots.ocr",
1600
1969
  "tngtech/DeepSeek-R1T-Chimera",
1601
1970
  "tngtech/DeepSeek-TNG-R1T2-Chimera",
1971
+ "unsloth/Mistral-Nemo-Instruct-2407",
1972
+ "unsloth/Mistral-Small-24B-Instruct-2501",
1973
+ "unsloth/gemma-3-12b-it",
1974
+ "unsloth/gemma-3-27b-it",
1975
+ "unsloth/gemma-3-4b-it",
1976
+ "zai-org/GLM-4.5",
1602
1977
  "zai-org/GLM-4.5-Air",
1603
- "zai-org/GLM-4.5-FP8",
1604
- "zai-org/GLM-4.5-turbo",
1605
- "zai-org/GLM-4.6-FP8",
1606
- "zai-org/GLM-4.6-turbo"
1978
+ "zai-org/GLM-4.6"
1607
1979
  ],
1608
1980
  cortecs: [
1609
1981
  "claude-4-5-sonnet",
@@ -1683,7 +2055,86 @@ var provider_registry_default = {
1683
2055
  "moonshotai/Kimi-K2-Instruct",
1684
2056
  "openai/gpt-oss-120b"
1685
2057
  ],
1686
- baseten: ["Qwen3/Qwen3-Coder-480B-A35B-Instruct", "moonshotai/Kimi-K2-Instruct-0905", "zai-org/GLM-4.6"],
2058
+ baseten: [
2059
+ "Qwen/Qwen3-Coder-480B-A35B-Instruct",
2060
+ "moonshotai/Kimi-K2-Instruct-0905",
2061
+ "moonshotai/Kimi-K2-Thinking",
2062
+ "zai-org/GLM-4.6"
2063
+ ],
2064
+ siliconflow: [
2065
+ "baidu-ernie-4.5-300b-a47b",
2066
+ "bytedance-seed-seed-oss-36b-instruct",
2067
+ "deepseek-ai-deepseek-r1",
2068
+ "deepseek-ai-deepseek-r1-distill-qwen-14b",
2069
+ "deepseek-ai-deepseek-r1-distill-qwen-32b",
2070
+ "deepseek-ai-deepseek-r1-distill-qwen-7b",
2071
+ "deepseek-ai-deepseek-v3",
2072
+ "deepseek-ai-deepseek-v3.1",
2073
+ "deepseek-ai-deepseek-v3.1-terminus",
2074
+ "deepseek-ai-deepseek-v3.2-exp",
2075
+ "deepseek-ai-deepseek-vl2",
2076
+ "inclusionai-ling-flash-2.0",
2077
+ "inclusionai-ling-mini-2.0",
2078
+ "inclusionai-ring-flash-2.0",
2079
+ "meta-llama-meta-llama-3.1-8b-instruct",
2080
+ "minimaxai-minimax-m1-80k",
2081
+ "minimaxai-minimax-m2",
2082
+ "moonshotai-kimi-dev-72b",
2083
+ "moonshotai-kimi-k2-instruct",
2084
+ "moonshotai-kimi-k2-instruct-0905",
2085
+ "moonshotai-kimi-k2-thinking",
2086
+ "nex-agi-deepseek-v3.1-nex-n1",
2087
+ "openai-gpt-oss-120b",
2088
+ "openai-gpt-oss-20b",
2089
+ "qwen-qwen2.5-14b-instruct",
2090
+ "qwen-qwen2.5-32b-instruct",
2091
+ "qwen-qwen2.5-72b-instruct",
2092
+ "qwen-qwen2.5-72b-instruct-128k",
2093
+ "qwen-qwen2.5-7b-instruct",
2094
+ "qwen-qwen2.5-coder-32b-instruct",
2095
+ "qwen-qwen2.5-vl-32b-instruct",
2096
+ "qwen-qwen2.5-vl-72b-instruct",
2097
+ "qwen-qwen2.5-vl-7b-instruct",
2098
+ "qwen-qwen3-14b",
2099
+ "qwen-qwen3-235b-a22b",
2100
+ "qwen-qwen3-235b-a22b-instruct-2507",
2101
+ "qwen-qwen3-235b-a22b-thinking-2507",
2102
+ "qwen-qwen3-30b-a3b",
2103
+ "qwen-qwen3-30b-a3b-instruct-2507",
2104
+ "qwen-qwen3-30b-a3b-thinking-2507",
2105
+ "qwen-qwen3-32b",
2106
+ "qwen-qwen3-8b",
2107
+ "qwen-qwen3-coder-30b-a3b-instruct",
2108
+ "qwen-qwen3-coder-480b-a35b-instruct",
2109
+ "qwen-qwen3-next-80b-a3b-instruct",
2110
+ "qwen-qwen3-next-80b-a3b-thinking",
2111
+ "qwen-qwen3-omni-30b-a3b-captioner",
2112
+ "qwen-qwen3-omni-30b-a3b-instruct",
2113
+ "qwen-qwen3-omni-30b-a3b-thinking",
2114
+ "qwen-qwen3-vl-235b-a22b-instruct",
2115
+ "qwen-qwen3-vl-235b-a22b-thinking",
2116
+ "qwen-qwen3-vl-30b-a3b-instruct",
2117
+ "qwen-qwen3-vl-30b-a3b-thinking",
2118
+ "qwen-qwen3-vl-32b-instruct",
2119
+ "qwen-qwen3-vl-32b-thinking",
2120
+ "qwen-qwen3-vl-8b-instruct",
2121
+ "qwen-qwen3-vl-8b-thinking",
2122
+ "qwen-qwq-32b",
2123
+ "stepfun-ai-step3",
2124
+ "tencent-hunyuan-a13b-instruct",
2125
+ "tencent-hunyuan-mt-7b",
2126
+ "thudm-glm-4-32b-0414",
2127
+ "thudm-glm-4-9b-0414",
2128
+ "thudm-glm-4.1v-9b-thinking",
2129
+ "thudm-glm-z1-32b-0414",
2130
+ "thudm-glm-z1-9b-0414",
2131
+ "z-ai-glm-4.5",
2132
+ "z-ai-glm-4.5-air",
2133
+ "zai-org-glm-4.5",
2134
+ "zai-org-glm-4.5-air",
2135
+ "zai-org-glm-4.5v",
2136
+ "zai-org-glm-4.6"
2137
+ ],
1687
2138
  huggingface: [
1688
2139
  "MiniMaxAI/MiniMax-M2",
1689
2140
  "Qwen/Qwen3-235B-A22B-Thinking-2507",
@@ -1701,19 +2152,26 @@ var provider_registry_default = {
1701
2152
  "zai-org/GLM-4.6"
1702
2153
  ],
1703
2154
  opencode: [
1704
- "an-gbt",
2155
+ "alpha-doubao-seed-code",
2156
+ "alpha-gd4",
2157
+ "alpha-minimax-m2",
1705
2158
  "big-pickle",
1706
2159
  "claude-3-5-haiku",
1707
2160
  "claude-haiku-4-5",
1708
2161
  "claude-opus-4-1",
2162
+ "claude-opus-4-5",
1709
2163
  "claude-sonnet-4",
1710
2164
  "claude-sonnet-4-5",
2165
+ "gemini-3-pro",
1711
2166
  "glm-4.6",
1712
2167
  "gpt-5",
1713
2168
  "gpt-5-codex",
2169
+ "gpt-5-nano",
2170
+ "gpt-5.1",
2171
+ "gpt-5.1-codex",
1714
2172
  "grok-code",
1715
2173
  "kimi-k2",
1716
- "minimax-m2",
2174
+ "kimi-k2-thinking",
1717
2175
  "qwen3-coder"
1718
2176
  ],
1719
2177
  fastrouter: [
@@ -1732,6 +2190,7 @@ var provider_registry_default = {
1732
2190
  "qwen/qwen3-coder",
1733
2191
  "x-ai/grok-4"
1734
2192
  ],
2193
+ minimax: ["MiniMax-M2"],
1735
2194
  google: [
1736
2195
  "gemini-1.5-flash",
1737
2196
  "gemini-1.5-flash-8b",
@@ -1752,6 +2211,7 @@ var provider_registry_default = {
1752
2211
  "gemini-2.5-pro-preview-05-06",
1753
2212
  "gemini-2.5-pro-preview-06-05",
1754
2213
  "gemini-2.5-pro-preview-tts",
2214
+ "gemini-3-pro-preview",
1755
2215
  "gemini-embedding-001",
1756
2216
  "gemini-flash-latest",
1757
2217
  "gemini-flash-lite-latest",
@@ -1790,6 +2250,10 @@ var provider_registry_default = {
1790
2250
  "gpt-5-mini",
1791
2251
  "gpt-5-nano",
1792
2252
  "gpt-5-pro",
2253
+ "gpt-5.1",
2254
+ "gpt-5.1-chat-latest",
2255
+ "gpt-5.1-codex",
2256
+ "gpt-5.1-codex-mini",
1793
2257
  "o1",
1794
2258
  "o1-mini",
1795
2259
  "o1-preview",
@@ -1812,6 +2276,7 @@ var provider_registry_default = {
1812
2276
  "anthropic/claude-haiku-4.5",
1813
2277
  "anthropic/claude-opus-4",
1814
2278
  "anthropic/claude-opus-4.1",
2279
+ "anthropic/claude-opus-4.5",
1815
2280
  "anthropic/claude-sonnet-4",
1816
2281
  "anthropic/claude-sonnet-4.5",
1817
2282
  "cognitivecomputations/dolphin3.0-mistral-24b",
@@ -1836,18 +2301,20 @@ var provider_registry_default = {
1836
2301
  "google/gemini-2.5-pro",
1837
2302
  "google/gemini-2.5-pro-preview-05-06",
1838
2303
  "google/gemini-2.5-pro-preview-06-05",
2304
+ "google/gemini-3-pro-preview",
1839
2305
  "google/gemma-2-9b-it:free",
1840
2306
  "google/gemma-3-12b-it",
1841
2307
  "google/gemma-3-27b-it",
1842
2308
  "google/gemma-3n-e4b-it",
1843
2309
  "google/gemma-3n-e4b-it:free",
2310
+ "kwaipilot/kat-coder-pro:free",
1844
2311
  "meta-llama/llama-3.2-11b-vision-instruct",
1845
2312
  "meta-llama/llama-3.3-70b-instruct:free",
1846
2313
  "meta-llama/llama-4-scout:free",
1847
2314
  "microsoft/mai-ds-r1:free",
1848
2315
  "minimax/minimax-01",
1849
2316
  "minimax/minimax-m1",
1850
- "minimax/minimax-m2:free",
2317
+ "minimax/minimax-m2",
1851
2318
  "mistralai/codestral-2508",
1852
2319
  "mistralai/devstral-medium-2507",
1853
2320
  "mistralai/devstral-small-2505",
@@ -1864,10 +2331,12 @@ var provider_registry_default = {
1864
2331
  "moonshotai/kimi-k2",
1865
2332
  "moonshotai/kimi-k2-0905",
1866
2333
  "moonshotai/kimi-k2-0905:exacto",
2334
+ "moonshotai/kimi-k2-thinking",
1867
2335
  "moonshotai/kimi-k2:free",
1868
2336
  "nousresearch/deephermes-3-llama-3-8b-preview",
1869
2337
  "nousresearch/hermes-4-405b",
1870
2338
  "nousresearch/hermes-4-70b",
2339
+ "nvidia/nemotron-nano-9b-v2",
1871
2340
  "openai/gpt-4.1",
1872
2341
  "openai/gpt-4.1-mini",
1873
2342
  "openai/gpt-4o-mini",
@@ -1878,15 +2347,15 @@ var provider_registry_default = {
1878
2347
  "openai/gpt-5-mini",
1879
2348
  "openai/gpt-5-nano",
1880
2349
  "openai/gpt-5-pro",
2350
+ "openai/gpt-5.1",
2351
+ "openai/gpt-5.1-chat",
2352
+ "openai/gpt-5.1-codex",
2353
+ "openai/gpt-5.1-codex-mini",
1881
2354
  "openai/gpt-oss-120b",
1882
2355
  "openai/gpt-oss-120b:exacto",
1883
2356
  "openai/gpt-oss-20b",
2357
+ "openai/gpt-oss-safeguard-20b",
1884
2358
  "openai/o4-mini",
1885
- "openrouter/cypher-alpha:free",
1886
- "openrouter/horizon-alpha",
1887
- "openrouter/horizon-beta",
1888
- "openrouter/sonoma-dusk-alpha",
1889
- "openrouter/sonoma-sky-alpha",
1890
2359
  "qwen/qwen-2.5-coder-32b-instruct",
1891
2360
  "qwen/qwen2.5-vl-32b-instruct:free",
1892
2361
  "qwen/qwen2.5-vl-72b-instruct",
@@ -1902,6 +2371,7 @@ var provider_registry_default = {
1902
2371
  "qwen/qwen3-32b:free",
1903
2372
  "qwen/qwen3-8b:free",
1904
2373
  "qwen/qwen3-coder",
2374
+ "qwen/qwen3-coder-flash",
1905
2375
  "qwen/qwen3-coder:exacto",
1906
2376
  "qwen/qwen3-coder:free",
1907
2377
  "qwen/qwen3-max",
@@ -1918,6 +2388,7 @@ var provider_registry_default = {
1918
2388
  "x-ai/grok-3-mini-beta",
1919
2389
  "x-ai/grok-4",
1920
2390
  "x-ai/grok-4-fast",
2391
+ "x-ai/grok-4.1-fast",
1921
2392
  "x-ai/grok-code-fast-1",
1922
2393
  "z-ai/glm-4.5",
1923
2394
  "z-ai/glm-4.5-air",
@@ -1935,7 +2406,10 @@ var provider_registry_default = {
1935
2406
  "inclusionai/lint-1t",
1936
2407
  "inclusionai/ring-1t",
1937
2408
  "kuaishou/kat-coder-pro-v1",
2409
+ "minimax/minimax-m2",
1938
2410
  "moonshotai/kimi-k2-0905",
2411
+ "moonshotai/kimi-k2-thinking",
2412
+ "moonshotai/kimi-k2-thinking-turbo",
1939
2413
  "openai/gpt-5",
1940
2414
  "openai/gpt-5-codex",
1941
2415
  "qwen/qwen3-coder-plus",
@@ -1946,6 +2420,43 @@ var provider_registry_default = {
1946
2420
  "z-ai/glm-4.5-air",
1947
2421
  "z-ai/glm-4.6"
1948
2422
  ],
2423
+ ovhcloud: [
2424
+ "deepseek-r1-distill-llama-70b",
2425
+ "gpt-oss-120b",
2426
+ "gpt-oss-20b",
2427
+ "llama-3.1-8b-instruct",
2428
+ "llava-next-mistral-7b",
2429
+ "meta-llama-3_1-70b-instruct",
2430
+ "meta-llama-3_3-70b-instruct",
2431
+ "mistral-7b-instruct-v0.3",
2432
+ "mistral-nemo-instruct-2407",
2433
+ "mistral-small-3.2-24b-instruct-2506",
2434
+ "mixtral-8x7b-instruct-v0.1",
2435
+ "qwen2.5-coder-32b-instruct",
2436
+ "qwen2.5-vl-72b-instruct",
2437
+ "qwen3-32b",
2438
+ "qwen3-coder-30b-a3b-instruct"
2439
+ ],
2440
+ iflowcn: [
2441
+ "deepseek-r1",
2442
+ "deepseek-v3",
2443
+ "deepseek-v3.1",
2444
+ "deepseek-v3.2",
2445
+ "glm-4.6",
2446
+ "kimi-k2",
2447
+ "kimi-k2-0905",
2448
+ "minimax-m2",
2449
+ "qwen3-235b",
2450
+ "qwen3-235b-a22b-instruct",
2451
+ "qwen3-235b-a22b-thinking-2507",
2452
+ "qwen3-32b",
2453
+ "qwen3-coder",
2454
+ "qwen3-coder-plus",
2455
+ "qwen3-max",
2456
+ "qwen3-max-preview",
2457
+ "qwen3-vl-plus",
2458
+ "tstars2.0"
2459
+ ],
1949
2460
  synthetic: [
1950
2461
  "hf:MiniMaxAI/MiniMax-M2",
1951
2462
  "hf:Qwen/Qwen2.5-Coder-32B-Instruct",
@@ -1966,6 +2477,7 @@ var provider_registry_default = {
1966
2477
  "hf:meta-llama/Llama-4-Scout-17B-16E-Instruct",
1967
2478
  "hf:moonshotai/Kimi-K2-Instruct",
1968
2479
  "hf:moonshotai/Kimi-K2-Instruct-0905",
2480
+ "hf:moonshotai/Kimi-K2-Thinking",
1969
2481
  "hf:openai/gpt-oss-120b",
1970
2482
  "hf:zai-org/GLM-4.5",
1971
2483
  "hf:zai-org/GLM-4.6"
@@ -1974,6 +2486,8 @@ var provider_registry_default = {
1974
2486
  "Qwen/Qwen3-Coder-480B-A35B-Instruct",
1975
2487
  "Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo",
1976
2488
  "moonshotai/Kimi-K2-Instruct",
2489
+ "openai/gpt-oss-120b",
2490
+ "openai/gpt-oss-20b",
1977
2491
  "zai-org/GLM-4.5"
1978
2492
  ],
1979
2493
  zhipuai: ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
@@ -2002,9 +2516,11 @@ var provider_registry_default = {
2002
2516
  ],
2003
2517
  requesty: [
2004
2518
  "anthropic/claude-3-7-sonnet",
2005
- "anthropic/claude-4-sonnet-20250522",
2519
+ "anthropic/claude-haiku-4-5",
2006
2520
  "anthropic/claude-opus-4",
2007
- "anthropic/claude-opus-4-1-20250805",
2521
+ "anthropic/claude-opus-4-1",
2522
+ "anthropic/claude-sonnet-4",
2523
+ "anthropic/claude-sonnet-4-5",
2008
2524
  "google/gemini-2.5-flash",
2009
2525
  "google/gemini-2.5-pro",
2010
2526
  "openai/gpt-4.1",
@@ -2013,7 +2529,9 @@ var provider_registry_default = {
2013
2529
  "openai/gpt-5",
2014
2530
  "openai/gpt-5-mini",
2015
2531
  "openai/gpt-5-nano",
2016
- "openai/o4-mini"
2532
+ "openai/o4-mini",
2533
+ "xai/grok-4",
2534
+ "xai/grok-4-fast"
2017
2535
  ],
2018
2536
  morph: ["auto", "morph-v3-fast", "morph-v3-large"],
2019
2537
  lmstudio: ["openai/gpt-oss-20b", "qwen/qwen3-30b-a3b-2507", "qwen/qwen3-coder-30b"],
@@ -2033,6 +2551,7 @@ var provider_registry_default = {
2033
2551
  "claude-opus-4-1",
2034
2552
  "claude-opus-4-1-20250805",
2035
2553
  "claude-opus-4-20250514",
2554
+ "claude-opus-4-5",
2036
2555
  "claude-sonnet-4-0",
2037
2556
  "claude-sonnet-4-20250514",
2038
2557
  "claude-sonnet-4-5",
@@ -2047,6 +2566,8 @@ var provider_registry_default = {
2047
2566
  "accounts/fireworks/models/gpt-oss-120b",
2048
2567
  "accounts/fireworks/models/gpt-oss-20b",
2049
2568
  "accounts/fireworks/models/kimi-k2-instruct",
2569
+ "accounts/fireworks/models/kimi-k2-thinking",
2570
+ "accounts/fireworks/models/minimax-m2",
2050
2571
  "accounts/fireworks/models/qwen3-235b-a22b",
2051
2572
  "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct"
2052
2573
  ],
@@ -2083,26 +2604,130 @@ var provider_registry_default = {
2083
2604
  "voxtral-small-24b-2507",
2084
2605
  "whisper-large-v3"
2085
2606
  ],
2086
- cerebras: ["gpt-oss-120b", "qwen-3-235b-a22b-instruct-2507", "qwen-3-coder-480b"],
2607
+ poe: [
2608
+ "anthropic/claude-haiku-3",
2609
+ "anthropic/claude-haiku-3.5",
2610
+ "anthropic/claude-haiku-3.5-search",
2611
+ "anthropic/claude-haiku-4.5",
2612
+ "anthropic/claude-opus-3",
2613
+ "anthropic/claude-opus-4",
2614
+ "anthropic/claude-opus-4-reasoning",
2615
+ "anthropic/claude-opus-4-search",
2616
+ "anthropic/claude-opus-4.1",
2617
+ "anthropic/claude-sonnet-3.5",
2618
+ "anthropic/claude-sonnet-3.5-june",
2619
+ "anthropic/claude-sonnet-3.7",
2620
+ "anthropic/claude-sonnet-3.7-reasoning",
2621
+ "anthropic/claude-sonnet-3.7-search",
2622
+ "anthropic/claude-sonnet-4",
2623
+ "anthropic/claude-sonnet-4-reasoning",
2624
+ "anthropic/claude-sonnet-4-search",
2625
+ "anthropic/claude-sonnet-4.5",
2626
+ "elevenlabs/elevenlabs-music",
2627
+ "elevenlabs/elevenlabs-v2.5-turbo",
2628
+ "elevenlabs/elevenlabs-v3",
2629
+ "facebook/llama-3.1-405b",
2630
+ "facebook/llama-3.1-70b",
2631
+ "facebook/llama-3.1-8b",
2632
+ "google/gemini-2.0-flash",
2633
+ "google/gemini-2.0-flash-lite",
2634
+ "google/gemini-2.5-flash",
2635
+ "google/gemini-2.5-flash-lite",
2636
+ "google/gemini-2.5-pro",
2637
+ "google/gemini-3.0-pro",
2638
+ "google/imagen-3",
2639
+ "google/imagen-3-fast",
2640
+ "google/imagen-4",
2641
+ "google/imagen-4-fast",
2642
+ "google/imagen-4-ultra",
2643
+ "google/lyria",
2644
+ "google/nano-banana",
2645
+ "google/veo-2",
2646
+ "google/veo-3",
2647
+ "google/veo-3-fast",
2648
+ "google/veo-3.1",
2649
+ "google/veo-3.1-fast",
2650
+ "ideogramai/ideogram",
2651
+ "ideogramai/ideogram-v2",
2652
+ "ideogramai/ideogram-v2a",
2653
+ "ideogramai/ideogram-v2a-turbo",
2654
+ "lumalabs/dream-machine",
2655
+ "lumalabs/ray2",
2656
+ "novita/glm-4.6",
2657
+ "openAi/chatgpt-4o-latest",
2658
+ "openAi/dall-e-3",
2659
+ "openAi/gpt-3.5-turbo",
2660
+ "openAi/gpt-3.5-turbo-instruct",
2661
+ "openAi/gpt-3.5-turbo-raw",
2662
+ "openAi/gpt-4-classic",
2663
+ "openAi/gpt-4-classic-0314",
2664
+ "openAi/gpt-4-turbo",
2665
+ "openAi/gpt-4.1",
2666
+ "openAi/gpt-4.1-mini",
2667
+ "openAi/gpt-4.1-nano",
2668
+ "openAi/gpt-4o",
2669
+ "openAi/gpt-4o-aug",
2670
+ "openAi/gpt-4o-mini",
2671
+ "openAi/gpt-4o-mini-search",
2672
+ "openAi/gpt-4o-search",
2673
+ "openAi/gpt-5",
2674
+ "openAi/gpt-5-chat",
2675
+ "openAi/gpt-5-codex",
2676
+ "openAi/gpt-5-mini",
2677
+ "openAi/gpt-5-nano",
2678
+ "openAi/gpt-5-pro",
2679
+ "openAi/gpt-image-1",
2680
+ "openAi/gpt-image-1-mini",
2681
+ "openAi/o1",
2682
+ "openAi/o1-pro",
2683
+ "openAi/o3",
2684
+ "openAi/o3-deep-research",
2685
+ "openAi/o3-mini",
2686
+ "openAi/o3-mini-high",
2687
+ "openAi/o3-pro",
2688
+ "openAi/o4-mini",
2689
+ "openAi/o4-mini-deep-research",
2690
+ "openAi/sora-2",
2691
+ "openAi/sora-2-pro",
2692
+ "openai/gpt-5.1",
2693
+ "openai/gpt-5.1-codex",
2694
+ "openai/gpt-5.1-codex-mini",
2695
+ "openai/gpt-5.1-instant",
2696
+ "runwayml/runway",
2697
+ "runwayml/runway-gen-4-turbo",
2698
+ "stabilityai/stablediffusionxl",
2699
+ "topazlabs-co/topazlabs",
2700
+ "trytako/tako",
2701
+ "xai/grok-2",
2702
+ "xai/grok-3",
2703
+ "xai/grok-3-mini",
2704
+ "xai/grok-4",
2705
+ "xai/grok-4-fast-non-reasoning",
2706
+ "xai/grok-4-fast-reasoning",
2707
+ "xai/grok-code-fast-1"
2708
+ ],
2709
+ cerebras: ["gpt-oss-120b", "qwen-3-235b-a22b-instruct-2507", "zai-glm-4.6"],
2087
2710
  netlify: [
2088
2711
  "anthropic/claude-3-5-haiku-20241022",
2089
- "anthropic/claude-3-5-haiku-latest",
2090
2712
  "anthropic/claude-3-7-sonnet-20250219",
2091
- "anthropic/claude-3-7-sonnet-latest",
2092
2713
  "anthropic/claude-3-haiku-20240307",
2093
2714
  "anthropic/claude-haiku-4-5-20251001",
2094
2715
  "anthropic/claude-opus-4-1-20250805",
2095
2716
  "anthropic/claude-opus-4-20250514",
2717
+ "anthropic/claude-opus-4-5-20251101",
2096
2718
  "anthropic/claude-sonnet-4-20250514",
2097
2719
  "anthropic/claude-sonnet-4-5-20250929",
2098
2720
  "gemini/gemini-2.0-flash",
2099
2721
  "gemini/gemini-2.0-flash-lite",
2100
2722
  "gemini/gemini-2.5-flash",
2723
+ "gemini/gemini-2.5-flash-image",
2101
2724
  "gemini/gemini-2.5-flash-image-preview",
2102
2725
  "gemini/gemini-2.5-flash-lite",
2103
2726
  "gemini/gemini-2.5-flash-lite-preview-09-2025",
2104
2727
  "gemini/gemini-2.5-flash-preview-09-2025",
2105
2728
  "gemini/gemini-2.5-pro",
2729
+ "gemini/gemini-3-pro-image-preview",
2730
+ "gemini/gemini-3-pro-preview",
2106
2731
  "gemini/gemini-flash-latest",
2107
2732
  "gemini/gemini-flash-lite-latest",
2108
2733
  "openai/codex-mini-latest",
@@ -2112,10 +2737,16 @@ var provider_registry_default = {
2112
2737
  "openai/gpt-4o",
2113
2738
  "openai/gpt-4o-mini",
2114
2739
  "openai/gpt-5",
2740
+ "openai/gpt-5-2025-08-07",
2115
2741
  "openai/gpt-5-codex",
2116
2742
  "openai/gpt-5-mini",
2743
+ "openai/gpt-5-mini-2025-08-07",
2117
2744
  "openai/gpt-5-nano",
2118
2745
  "openai/gpt-5-pro",
2746
+ "openai/gpt-5.1",
2747
+ "openai/gpt-5.1-2025-11-13",
2748
+ "openai/gpt-5.1-codex",
2749
+ "openai/gpt-5.1-codex-mini",
2119
2750
  "openai/o3",
2120
2751
  "openai/o3-mini",
2121
2752
  "openai/o4-mini"
@@ -2131,6 +2762,20 @@ var CACHE_FILE = () => path.join(CACHE_DIR(), "gateway-refresh-time");
2131
2762
  var GLOBAL_PROVIDER_REGISTRY_JSON = () => path.join(CACHE_DIR(), "provider-registry.json");
2132
2763
  var GLOBAL_PROVIDER_TYPES_DTS = () => path.join(CACHE_DIR(), "provider-types.generated.d.ts");
2133
2764
  var modelRouterCacheFailed = false;
2765
+ function atomicWriteFileSync(filePath, content, encoding = "utf-8") {
2766
+ const randomSuffix = Math.random().toString(36).substring(2, 15);
2767
+ const tempPath = `${filePath}.${process.pid}.${Date.now()}.${randomSuffix}.tmp`;
2768
+ try {
2769
+ fs.writeFileSync(tempPath, content, encoding);
2770
+ fs.renameSync(tempPath, filePath);
2771
+ } catch (error) {
2772
+ try {
2773
+ fs.unlinkSync(tempPath);
2774
+ } catch {
2775
+ }
2776
+ throw error;
2777
+ }
2778
+ }
2134
2779
  function syncGlobalCacheToLocal() {
2135
2780
  try {
2136
2781
  const globalJsonExists = fs.existsSync(GLOBAL_PROVIDER_REGISTRY_JSON());
@@ -2151,7 +2796,7 @@ function syncGlobalCacheToLocal() {
2151
2796
  shouldCopyJson = globalJsonContent !== localJsonContent;
2152
2797
  }
2153
2798
  if (shouldCopyJson) {
2154
- fs.writeFileSync(localJsonPath, globalJsonContent, "utf-8");
2799
+ atomicWriteFileSync(localJsonPath, globalJsonContent, "utf-8");
2155
2800
  }
2156
2801
  }
2157
2802
  if (globalDtsExists) {
@@ -2162,7 +2807,7 @@ function syncGlobalCacheToLocal() {
2162
2807
  shouldCopyDts = globalDtsContent !== localDtsContent;
2163
2808
  }
2164
2809
  if (shouldCopyDts) {
2165
- fs.writeFileSync(localDtsPath, globalDtsContent, "utf-8");
2810
+ atomicWriteFileSync(localDtsPath, globalDtsContent, "utf-8");
2166
2811
  }
2167
2812
  }
2168
2813
  } catch (error) {
@@ -2266,7 +2911,7 @@ var PROVIDER_REGISTRY = new Proxy({}, {
2266
2911
  return void 0;
2267
2912
  }
2268
2913
  });
2269
- new Proxy({}, {
2914
+ var PROVIDER_MODELS = new Proxy({}, {
2270
2915
  get(_target, prop) {
2271
2916
  const registry = GatewayRegistry.getInstance();
2272
2917
  const models = registry.getModels();
@@ -2315,12 +2960,26 @@ function getProviderConfig(providerId) {
2315
2960
  const registry = GatewayRegistry.getInstance();
2316
2961
  return registry.getProviderConfig(providerId);
2317
2962
  }
2963
+ function isProviderRegistered(providerId) {
2964
+ const registry = GatewayRegistry.getInstance();
2965
+ return registry.isProviderRegistered(providerId);
2966
+ }
2967
+ function getRegisteredProviders() {
2968
+ const registry = GatewayRegistry.getInstance();
2969
+ const providers = registry.getProviders();
2970
+ return Object.keys(providers);
2971
+ }
2972
+ function isValidModelId(modelId) {
2973
+ const { provider } = parseModelString(modelId);
2974
+ return provider !== null && isProviderRegistered(provider);
2975
+ }
2318
2976
  var GatewayRegistry = class _GatewayRegistry {
2319
2977
  static instance = null;
2320
2978
  lastRefreshTime = null;
2321
2979
  refreshInterval = null;
2322
2980
  isRefreshing = false;
2323
2981
  useDynamicLoading;
2982
+ customGateways = [];
2324
2983
  constructor(options = {}) {
2325
2984
  const isDev2 = process.env.MASTRA_DEV === "true" || process.env.MASTRA_DEV === "1";
2326
2985
  this.useDynamicLoading = options.useDynamicLoading ?? isDev2;
@@ -2334,6 +2993,19 @@ var GatewayRegistry = class _GatewayRegistry {
2334
2993
  }
2335
2994
  return _GatewayRegistry.instance;
2336
2995
  }
2996
+ /**
2997
+ * Register custom gateways for type generation
2998
+ * @param gateways - Array of custom gateway instances
2999
+ */
3000
+ registerCustomGateways(gateways) {
3001
+ this.customGateways = gateways;
3002
+ }
3003
+ /**
3004
+ * Get all registered custom gateways
3005
+ */
3006
+ getCustomGateways() {
3007
+ return this.customGateways;
3008
+ }
2337
3009
  /**
2338
3010
  * Sync providers from all gateways
2339
3011
  * Requires dynamic loading to be enabled (useDynamicLoading=true).
@@ -2349,11 +3021,12 @@ var GatewayRegistry = class _GatewayRegistry {
2349
3021
  }
2350
3022
  this.isRefreshing = true;
2351
3023
  try {
2352
- const { ModelsDevGateway: ModelsDevGateway2 } = await import('./models-dev-BL5TAKE6.js');
2353
- const { NetlifyGateway: NetlifyGateway2 } = await import('./netlify-VJXBII33.js');
2354
- const { fetchProvidersFromGateways, writeRegistryFiles } = await import('./registry-generator-DXRSYYYT.js');
2355
- const gateways2 = [new ModelsDevGateway2({}), new NetlifyGateway2()];
2356
- const { providers, models } = await fetchProvidersFromGateways(gateways2);
3024
+ const { ModelsDevGateway } = await import('./models-dev-LJ4O6FNF.js');
3025
+ const { NetlifyGateway } = await import('./netlify-L7AZ74PV.js');
3026
+ const { fetchProvidersFromGateways, writeRegistryFiles } = await import('./registry-generator-I6S4ARS6.js');
3027
+ const defaultGateways = [new ModelsDevGateway({}), new NetlifyGateway()];
3028
+ const gateways = [...defaultGateways, ...this.customGateways];
3029
+ const { providers, models } = await fetchProvidersFromGateways(gateways);
2357
3030
  const packageRoot = getPackageRoot();
2358
3031
  try {
2359
3032
  fs.mkdirSync(CACHE_DIR(), { recursive: true });
@@ -2465,428 +3138,7 @@ var autoRefreshEnabled = process.env.MASTRA_AUTO_REFRESH_PROVIDERS === "true" ||
2465
3138
  if (autoRefreshEnabled) {
2466
3139
  GatewayRegistry.getInstance({ useDynamicLoading: isDev }).startAutoRefresh();
2467
3140
  }
2468
- var AISDKV5LanguageModel = class {
2469
- /**
2470
- * The language model must specify which language model interface version it implements.
2471
- */
2472
- specificationVersion = "v2";
2473
- /**
2474
- * Name of the provider for logging purposes.
2475
- */
2476
- provider;
2477
- /**
2478
- * Provider-specific model ID for logging purposes.
2479
- */
2480
- modelId;
2481
- /**
2482
- * Supported URL patterns by media type for the provider.
2483
- *
2484
- * The keys are media type patterns or full media types (e.g. `*\/*` for everything, `audio/*`, `video/*`, or `application/pdf`).
2485
- * and the values are arrays of regular expressions that match the URL paths.
2486
- * The matching should be against lower-case URLs.
2487
- * Matched URLs are supported natively by the model and are not downloaded.
2488
- * @returns A map of supported URL patterns by media type (as a promise or a plain object).
2489
- */
2490
- supportedUrls;
2491
- #model;
2492
- constructor(config) {
2493
- this.#model = config;
2494
- this.provider = this.#model.provider;
2495
- this.modelId = this.#model.modelId;
2496
- this.supportedUrls = this.#model.supportedUrls;
2497
- }
2498
- async doGenerate(options) {
2499
- const result = await this.#model.doGenerate(options);
2500
- return {
2501
- request: result.request,
2502
- response: result.response,
2503
- stream: new ReadableStream({
2504
- start(controller) {
2505
- controller.enqueue({ type: "stream-start", warnings: result.warnings });
2506
- controller.enqueue({
2507
- type: "response-metadata",
2508
- id: result.response?.id,
2509
- modelId: result.response?.modelId,
2510
- timestamp: result.response?.timestamp
2511
- });
2512
- for (const message of result.content) {
2513
- if (message.type === "tool-call") {
2514
- const toolCall = message;
2515
- controller.enqueue({
2516
- type: "tool-input-start",
2517
- id: toolCall.toolCallId,
2518
- toolName: toolCall.toolName
2519
- });
2520
- controller.enqueue({
2521
- type: "tool-input-delta",
2522
- id: toolCall.toolCallId,
2523
- delta: toolCall.input
2524
- });
2525
- controller.enqueue({
2526
- type: "tool-input-end",
2527
- id: toolCall.toolCallId
2528
- });
2529
- controller.enqueue(toolCall);
2530
- } else if (message.type === "tool-result") {
2531
- const toolResult = message;
2532
- controller.enqueue(toolResult);
2533
- } else if (message.type === "text") {
2534
- const text = message;
2535
- const id = `msg_${randomUUID()}`;
2536
- controller.enqueue({
2537
- type: "text-start",
2538
- id,
2539
- providerMetadata: text.providerMetadata
2540
- });
2541
- controller.enqueue({
2542
- type: "text-delta",
2543
- id,
2544
- delta: text.text
2545
- });
2546
- controller.enqueue({
2547
- type: "text-end",
2548
- id
2549
- });
2550
- } else if (message.type === "reasoning") {
2551
- const id = `reasoning_${randomUUID()}`;
2552
- const reasoning = message;
2553
- controller.enqueue({
2554
- type: "reasoning-start",
2555
- id,
2556
- providerMetadata: reasoning.providerMetadata
2557
- });
2558
- controller.enqueue({
2559
- type: "reasoning-delta",
2560
- id,
2561
- delta: reasoning.text,
2562
- providerMetadata: reasoning.providerMetadata
2563
- });
2564
- controller.enqueue({
2565
- type: "reasoning-end",
2566
- id,
2567
- providerMetadata: reasoning.providerMetadata
2568
- });
2569
- } else if (message.type === "file") {
2570
- const file = message;
2571
- controller.enqueue({
2572
- type: "file",
2573
- mediaType: file.mediaType,
2574
- data: file.data
2575
- });
2576
- } else if (message.type === "source") {
2577
- const source = message;
2578
- if (source.sourceType === "url") {
2579
- controller.enqueue({
2580
- type: "source",
2581
- id: source.id,
2582
- sourceType: "url",
2583
- url: source.url,
2584
- title: source.title,
2585
- providerMetadata: source.providerMetadata
2586
- });
2587
- } else {
2588
- controller.enqueue({
2589
- type: "source",
2590
- id: source.id,
2591
- sourceType: "document",
2592
- mediaType: source.mediaType,
2593
- filename: source.filename,
2594
- title: source.title,
2595
- providerMetadata: source.providerMetadata
2596
- });
2597
- }
2598
- }
2599
- }
2600
- controller.enqueue({
2601
- type: "finish",
2602
- finishReason: result.finishReason,
2603
- usage: result.usage,
2604
- providerMetadata: result.providerMetadata
2605
- });
2606
- controller.close();
2607
- }
2608
- })
2609
- };
2610
- }
2611
- async doStream(options) {
2612
- return await this.#model.doStream(options);
2613
- }
2614
- };
2615
-
2616
- // src/llm/model/gateways/index.ts
2617
- function findGatewayForModel(gatewayId, gateways2) {
2618
- const prefixedGateway = gateways2.find((g) => g.prefix && gatewayId.startsWith(`${g.prefix}/`));
2619
- if (prefixedGateway) {
2620
- return prefixedGateway;
2621
- }
2622
- const unprefixedGateways = gateways2.filter((g) => !g.prefix);
2623
- for (const gateway of unprefixedGateways) {
2624
- return gateway;
2625
- }
2626
- throw new MastraError({
2627
- id: "MODEL_ROUTER_NO_GATEWAY_FOUND",
2628
- category: "USER",
2629
- domain: "MODEL_ROUTER",
2630
- text: `No Mastra model router gateway found for model id ${gatewayId}`
2631
- });
2632
- }
2633
-
2634
- // src/llm/model/router.ts
2635
- function getStaticProvidersByGateway(name) {
2636
- return Object.fromEntries(Object.entries(PROVIDER_REGISTRY).filter(([_provider, config]) => config.gateway === name));
2637
- }
2638
- var gateways = [new NetlifyGateway(), new ModelsDevGateway(getStaticProvidersByGateway(`models.dev`))];
2639
- var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
2640
- specificationVersion = "v2";
2641
- defaultObjectGenerationMode = "json";
2642
- supportsStructuredOutputs = true;
2643
- supportsImageUrls = true;
2644
- supportedUrls = {};
2645
- modelId;
2646
- provider;
2647
- config;
2648
- gateway;
2649
- constructor(config) {
2650
- let normalizedConfig;
2651
- if (typeof config === "string") {
2652
- normalizedConfig = { id: config };
2653
- } else if ("providerId" in config && "modelId" in config) {
2654
- normalizedConfig = {
2655
- id: `${config.providerId}/${config.modelId}`,
2656
- url: config.url,
2657
- apiKey: config.apiKey,
2658
- headers: config.headers
2659
- };
2660
- } else {
2661
- normalizedConfig = {
2662
- id: config.id,
2663
- url: config.url,
2664
- apiKey: config.apiKey,
2665
- headers: config.headers
2666
- };
2667
- }
2668
- const parsedConfig = {
2669
- ...normalizedConfig,
2670
- routerId: normalizedConfig.id
2671
- };
2672
- this.gateway = findGatewayForModel(normalizedConfig.id, gateways);
2673
- const parsed = parseModelRouterId(normalizedConfig.id, this.gateway.prefix);
2674
- this.provider = parsed.providerId || "openai-compatible";
2675
- if (parsed.providerId && parsed.modelId !== normalizedConfig.id) {
2676
- parsedConfig.id = parsed.modelId;
2677
- }
2678
- this.modelId = parsedConfig.id;
2679
- this.config = parsedConfig;
2680
- }
2681
- async doGenerate(options) {
2682
- let apiKey;
2683
- try {
2684
- if (this.config.url) {
2685
- apiKey = this.config.apiKey || "";
2686
- } else {
2687
- apiKey = this.config.apiKey || await this.gateway.getApiKey(this.config.routerId);
2688
- }
2689
- } catch (error) {
2690
- return {
2691
- stream: new ReadableStream({
2692
- start(controller) {
2693
- controller.enqueue({
2694
- type: "error",
2695
- error
2696
- });
2697
- controller.close();
2698
- }
2699
- })
2700
- };
2701
- }
2702
- const model = await this.resolveLanguageModel({
2703
- apiKey,
2704
- ...parseModelRouterId(this.config.routerId, this.gateway.prefix)
2705
- });
2706
- const aiSDKV5Model = new AISDKV5LanguageModel(model);
2707
- return aiSDKV5Model.doGenerate(options);
2708
- }
2709
- async doStream(options) {
2710
- let apiKey;
2711
- try {
2712
- if (this.config.url) {
2713
- apiKey = this.config.apiKey || "";
2714
- } else {
2715
- apiKey = this.config.apiKey || await this.gateway.getApiKey(this.config.routerId);
2716
- }
2717
- } catch (error) {
2718
- return {
2719
- stream: new ReadableStream({
2720
- start(controller) {
2721
- controller.enqueue({
2722
- type: "error",
2723
- error
2724
- });
2725
- controller.close();
2726
- }
2727
- })
2728
- };
2729
- }
2730
- const model = await this.resolveLanguageModel({
2731
- apiKey,
2732
- ...parseModelRouterId(this.config.routerId, this.gateway.prefix)
2733
- });
2734
- const aiSDKV5Model = new AISDKV5LanguageModel(model);
2735
- return aiSDKV5Model.doStream(options);
2736
- }
2737
- async resolveLanguageModel({
2738
- modelId,
2739
- providerId,
2740
- apiKey
2741
- }) {
2742
- const key = createHash("sha256").update(this.gateway.name + modelId + providerId + apiKey + (this.config.url || "")).digest("hex");
2743
- if (_ModelRouterLanguageModel.modelInstances.has(key)) return _ModelRouterLanguageModel.modelInstances.get(key);
2744
- if (this.config.url) {
2745
- const modelInstance2 = createOpenAICompatible({
2746
- name: providerId,
2747
- apiKey,
2748
- baseURL: this.config.url,
2749
- headers: this.config.headers,
2750
- supportsStructuredOutputs: true
2751
- }).chatModel(modelId);
2752
- _ModelRouterLanguageModel.modelInstances.set(key, modelInstance2);
2753
- return modelInstance2;
2754
- }
2755
- const modelInstance = await this.gateway.resolveLanguageModel({ modelId, providerId, apiKey });
2756
- _ModelRouterLanguageModel.modelInstances.set(key, modelInstance);
2757
- return modelInstance;
2758
- }
2759
- static modelInstances = /* @__PURE__ */ new Map();
2760
- };
2761
-
2762
- // src/llm/model/resolve-model.ts
2763
- function isOpenAICompatibleObjectConfig(modelConfig) {
2764
- if (typeof modelConfig === "object" && "specificationVersion" in modelConfig) return false;
2765
- if (typeof modelConfig === "object" && !("model" in modelConfig)) {
2766
- if ("id" in modelConfig) return true;
2767
- if ("providerId" in modelConfig && "modelId" in modelConfig) return true;
2768
- }
2769
- return false;
2770
- }
2771
- async function resolveModelConfig(modelConfig, runtimeContext = new RuntimeContext(), mastra) {
2772
- if (typeof modelConfig === "function") {
2773
- modelConfig = await modelConfig({ runtimeContext, mastra });
2774
- }
2775
- if (modelConfig instanceof ModelRouterLanguageModel || modelConfig instanceof AISDKV5LanguageModel) {
2776
- return modelConfig;
2777
- }
2778
- if (typeof modelConfig === "object" && "specificationVersion" in modelConfig) {
2779
- if (modelConfig.specificationVersion === "v2") {
2780
- return new AISDKV5LanguageModel(modelConfig);
2781
- }
2782
- return modelConfig;
2783
- }
2784
- if (typeof modelConfig === "string" || isOpenAICompatibleObjectConfig(modelConfig)) {
2785
- return new ModelRouterLanguageModel(modelConfig);
2786
- }
2787
- throw new Error("Invalid model configuration provided");
2788
- }
2789
- var ModelRouterEmbeddingModel = class {
2790
- specificationVersion = "v2";
2791
- modelId;
2792
- provider;
2793
- maxEmbeddingsPerCall = 2048;
2794
- supportsParallelCalls = true;
2795
- providerModel;
2796
- constructor(config) {
2797
- let normalizedConfig;
2798
- if (typeof config === "string") {
2799
- const parts = config.split("/");
2800
- if (parts.length !== 2) {
2801
- throw new Error(`Invalid model string format: "${config}". Expected format: "provider/model"`);
2802
- }
2803
- const [providerId, modelId] = parts;
2804
- normalizedConfig = { providerId, modelId };
2805
- } else if ("providerId" in config && "modelId" in config) {
2806
- normalizedConfig = {
2807
- providerId: config.providerId,
2808
- modelId: config.modelId,
2809
- url: config.url,
2810
- apiKey: config.apiKey,
2811
- headers: config.headers
2812
- };
2813
- } else {
2814
- const parts = config.id.split("/");
2815
- if (parts.length !== 2) {
2816
- throw new Error(`Invalid model string format: "${config.id}". Expected format: "provider/model"`);
2817
- }
2818
- const [providerId, modelId] = parts;
2819
- normalizedConfig = {
2820
- providerId,
2821
- modelId,
2822
- url: config.url,
2823
- apiKey: config.apiKey,
2824
- headers: config.headers
2825
- };
2826
- }
2827
- this.provider = normalizedConfig.providerId;
2828
- this.modelId = normalizedConfig.modelId;
2829
- if (normalizedConfig.url) {
2830
- const apiKey = normalizedConfig.apiKey || "";
2831
- this.providerModel = createOpenAICompatible({
2832
- name: normalizedConfig.providerId,
2833
- apiKey,
2834
- baseURL: normalizedConfig.url,
2835
- headers: normalizedConfig.headers
2836
- }).textEmbeddingModel(normalizedConfig.modelId);
2837
- } else {
2838
- const registry = GatewayRegistry.getInstance();
2839
- const providerConfig = registry.getProviderConfig(normalizedConfig.providerId);
2840
- if (!providerConfig) {
2841
- throw new Error(`Unknown provider: ${normalizedConfig.providerId}`);
2842
- }
2843
- let apiKey = normalizedConfig.apiKey;
2844
- if (!apiKey) {
2845
- const apiKeyEnvVar = providerConfig.apiKeyEnvVar;
2846
- if (Array.isArray(apiKeyEnvVar)) {
2847
- for (const envVar of apiKeyEnvVar) {
2848
- apiKey = process.env[envVar];
2849
- if (apiKey) break;
2850
- }
2851
- } else {
2852
- apiKey = process.env[apiKeyEnvVar];
2853
- }
2854
- }
2855
- if (!apiKey) {
2856
- const envVarDisplay = Array.isArray(providerConfig.apiKeyEnvVar) ? providerConfig.apiKeyEnvVar.join(" or ") : providerConfig.apiKeyEnvVar;
2857
- throw new Error(`API key not found for provider ${normalizedConfig.providerId}. Set ${envVarDisplay}`);
2858
- }
2859
- if (normalizedConfig.providerId === "openai") {
2860
- this.providerModel = createOpenAI({ apiKey }).textEmbeddingModel(
2861
- normalizedConfig.modelId
2862
- );
2863
- } else if (normalizedConfig.providerId === "google") {
2864
- this.providerModel = createGoogleGenerativeAI({ apiKey }).textEmbedding(
2865
- normalizedConfig.modelId
2866
- );
2867
- } else {
2868
- if (!providerConfig.url) {
2869
- throw new Error(`Provider ${normalizedConfig.providerId} does not have a URL configured`);
2870
- }
2871
- this.providerModel = createOpenAICompatible({
2872
- name: normalizedConfig.providerId,
2873
- apiKey,
2874
- baseURL: providerConfig.url
2875
- }).textEmbeddingModel(normalizedConfig.modelId);
2876
- }
2877
- }
2878
- if (this.providerModel.maxEmbeddingsPerCall !== void 0) {
2879
- this.maxEmbeddingsPerCall = this.providerModel.maxEmbeddingsPerCall;
2880
- }
2881
- if (this.providerModel.supportsParallelCalls !== void 0) {
2882
- this.supportsParallelCalls = this.providerModel.supportsParallelCalls;
2883
- }
2884
- }
2885
- async doEmbed(args) {
2886
- return this.providerModel.doEmbed(args);
2887
- }
2888
- };
2889
3141
 
2890
- export { ModelRouterEmbeddingModel, ModelRouterLanguageModel, PROVIDER_REGISTRY, getProviderConfig, parseModelString, resolveModelConfig };
2891
- //# sourceMappingURL=chunk-N2DOZAFH.js.map
2892
- //# sourceMappingURL=chunk-N2DOZAFH.js.map
3142
+ export { GatewayRegistry, PROVIDER_MODELS, PROVIDER_REGISTRY, getProviderConfig, getRegisteredProviders, isProviderRegistered, isValidModelId, parseModelString };
3143
+ //# sourceMappingURL=chunk-INOOZ2A2.js.map
3144
+ //# sourceMappingURL=chunk-INOOZ2A2.js.map