@homeflare/distilled-litellm 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (563) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +77 -0
  3. package/dist/credentials.d.ts +27 -0
  4. package/dist/credentials.d.ts.map +1 -0
  5. package/dist/credentials.js +67 -0
  6. package/dist/credentials.js.map +1 -0
  7. package/dist/errors.d.ts +92 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +72 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +30 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +30 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/protocol.d.ts +18 -0
  16. package/dist/protocol.d.ts.map +1 -0
  17. package/dist/protocol.js +135 -0
  18. package/dist/protocol.js.map +1 -0
  19. package/dist/retry.d.ts +50 -0
  20. package/dist/retry.d.ts.map +1 -0
  21. package/dist/retry.js +43 -0
  22. package/dist/retry.js.map +1 -0
  23. package/dist/services/a2a.d.ts +70 -0
  24. package/dist/services/a2a.d.ts.map +1 -0
  25. package/dist/services/a2a.js +128 -0
  26. package/dist/services/a2a.js.map +1 -0
  27. package/dist/services/a2a_registration.d.ts +43 -0
  28. package/dist/services/a2a_registration.d.ts.map +1 -0
  29. package/dist/services/a2a_registration.js +40 -0
  30. package/dist/services/a2a_registration.js.map +1 -0
  31. package/dist/services/access_groups.d.ts +192 -0
  32. package/dist/services/access_groups.d.ts.map +1 -0
  33. package/dist/services/access_groups.js +283 -0
  34. package/dist/services/access_groups.js.map +1 -0
  35. package/dist/services/adaptive_router.d.ts +15 -0
  36. package/dist/services/adaptive_router.d.ts.map +1 -0
  37. package/dist/services/adaptive_router.js +25 -0
  38. package/dist/services/adaptive_router.js.map +1 -0
  39. package/dist/services/agents.d.ts +537 -0
  40. package/dist/services/agents.d.ts.map +1 -0
  41. package/dist/services/agents.js +481 -0
  42. package/dist/services/agents.js.map +1 -0
  43. package/dist/services/alerting.d.ts +15 -0
  44. package/dist/services/alerting.d.ts.map +1 -0
  45. package/dist/services/alerting.js +25 -0
  46. package/dist/services/alerting.js.map +1 -0
  47. package/dist/services/anthropic_pass_through.d.ts +70 -0
  48. package/dist/services/anthropic_pass_through.d.ts.map +1 -0
  49. package/dist/services/anthropic_pass_through.js +114 -0
  50. package/dist/services/anthropic_pass_through.js.map +1 -0
  51. package/dist/services/anthropic_passthrough.d.ts +35 -0
  52. package/dist/services/anthropic_passthrough.d.ts.map +1 -0
  53. package/dist/services/anthropic_passthrough.js +59 -0
  54. package/dist/services/anthropic_passthrough.js.map +1 -0
  55. package/dist/services/anthropic_skills.d.ts +74 -0
  56. package/dist/services/anthropic_skills.d.ts.map +1 -0
  57. package/dist/services/anthropic_skills.js +94 -0
  58. package/dist/services/anthropic_skills.js.map +1 -0
  59. package/dist/services/assembly_ai_eu_pass_through.d.ts +70 -0
  60. package/dist/services/assembly_ai_eu_pass_through.d.ts.map +1 -0
  61. package/dist/services/assembly_ai_eu_pass_through.js +114 -0
  62. package/dist/services/assembly_ai_eu_pass_through.js.map +1 -0
  63. package/dist/services/assembly_ai_pass_through.d.ts +70 -0
  64. package/dist/services/assembly_ai_pass_through.d.ts.map +1 -0
  65. package/dist/services/assembly_ai_pass_through.js +114 -0
  66. package/dist/services/assembly_ai_pass_through.js.map +1 -0
  67. package/dist/services/assistants.d.ts +185 -0
  68. package/dist/services/assistants.d.ts.map +1 -0
  69. package/dist/services/assistants.js +331 -0
  70. package/dist/services/assistants.js.map +1 -0
  71. package/dist/services/audio.d.ts +57 -0
  72. package/dist/services/audio.d.ts.map +1 -0
  73. package/dist/services/audio.js +96 -0
  74. package/dist/services/audio.js.map +1 -0
  75. package/dist/services/audit_logging.d.ts +98 -0
  76. package/dist/services/audit_logging.d.ts.map +1 -0
  77. package/dist/services/audit_logging.js +83 -0
  78. package/dist/services/audit_logging.js.map +1 -0
  79. package/dist/services/auto_router.d.ts +286 -0
  80. package/dist/services/auto_router.d.ts.map +1 -0
  81. package/dist/services/auto_router.js +248 -0
  82. package/dist/services/auto_router.js.map +1 -0
  83. package/dist/services/aws_comprehend_medical_pass_through.d.ts +36 -0
  84. package/dist/services/aws_comprehend_medical_pass_through.d.ts.map +1 -0
  85. package/dist/services/aws_comprehend_medical_pass_through.js +56 -0
  86. package/dist/services/aws_comprehend_medical_pass_through.js.map +1 -0
  87. package/dist/services/azure_ai_pass_through.d.ts +70 -0
  88. package/dist/services/azure_ai_pass_through.d.ts.map +1 -0
  89. package/dist/services/azure_ai_pass_through.js +112 -0
  90. package/dist/services/azure_ai_pass_through.js.map +1 -0
  91. package/dist/services/azure_pass_through.d.ts +70 -0
  92. package/dist/services/azure_pass_through.d.ts.map +1 -0
  93. package/dist/services/azure_pass_through.js +107 -0
  94. package/dist/services/azure_pass_through.js.map +1 -0
  95. package/dist/services/batch.d.ts +165 -0
  96. package/dist/services/batch.d.ts.map +1 -0
  97. package/dist/services/batch.js +265 -0
  98. package/dist/services/batch.js.map +1 -0
  99. package/dist/services/bedrock_pass_through.d.ts +70 -0
  100. package/dist/services/bedrock_pass_through.d.ts.map +1 -0
  101. package/dist/services/bedrock_pass_through.js +114 -0
  102. package/dist/services/bedrock_pass_through.js.map +1 -0
  103. package/dist/services/beta_agents.d.ts +199 -0
  104. package/dist/services/beta_agents.d.ts.map +1 -0
  105. package/dist/services/beta_agents.js +151 -0
  106. package/dist/services/beta_agents.js.map +1 -0
  107. package/dist/services/beta_mcp.d.ts +37 -0
  108. package/dist/services/beta_mcp.d.ts.map +1 -0
  109. package/dist/services/beta_mcp.js +40 -0
  110. package/dist/services/beta_mcp.js.map +1 -0
  111. package/dist/services/budget_management.d.ts +185 -0
  112. package/dist/services/budget_management.d.ts.map +1 -0
  113. package/dist/services/budget_management.js +196 -0
  114. package/dist/services/budget_management.js.map +1 -0
  115. package/dist/services/budget_spend_tracking.d.ts +967 -0
  116. package/dist/services/budget_spend_tracking.d.ts.map +1 -0
  117. package/dist/services/budget_spend_tracking.js +1103 -0
  118. package/dist/services/budget_spend_tracking.js.map +1 -0
  119. package/dist/services/cache_settings.d.ts +96 -0
  120. package/dist/services/cache_settings.d.ts.map +1 -0
  121. package/dist/services/cache_settings.js +95 -0
  122. package/dist/services/cache_settings.js.map +1 -0
  123. package/dist/services/caching.d.ts +54 -0
  124. package/dist/services/caching.d.ts.map +1 -0
  125. package/dist/services/caching.js +78 -0
  126. package/dist/services/caching.js.map +1 -0
  127. package/dist/services/chat_completions.d.ts +656 -0
  128. package/dist/services/chat_completions.d.ts.map +1 -0
  129. package/dist/services/chat_completions.js +590 -0
  130. package/dist/services/chat_completions.js.map +1 -0
  131. package/dist/services/claude_code_marketplace.d.ts +212 -0
  132. package/dist/services/claude_code_marketplace.d.ts.map +1 -0
  133. package/dist/services/claude_code_marketplace.js +248 -0
  134. package/dist/services/claude_code_marketplace.js.map +1 -0
  135. package/dist/services/cloudzero.d.ts +117 -0
  136. package/dist/services/cloudzero.d.ts.map +1 -0
  137. package/dist/services/cloudzero.js +130 -0
  138. package/dist/services/cloudzero.js.map +1 -0
  139. package/dist/services/cohere_pass_through.d.ts +70 -0
  140. package/dist/services/cohere_pass_through.d.ts.map +1 -0
  141. package/dist/services/cohere_pass_through.js +112 -0
  142. package/dist/services/cohere_pass_through.js.map +1 -0
  143. package/dist/services/completions.d.ts +59 -0
  144. package/dist/services/completions.d.ts.map +1 -0
  145. package/dist/services/completions.js +98 -0
  146. package/dist/services/completions.js.map +1 -0
  147. package/dist/services/compliance.d.ts +66 -0
  148. package/dist/services/compliance.d.ts.map +1 -0
  149. package/dist/services/compliance.js +74 -0
  150. package/dist/services/compliance.js.map +1 -0
  151. package/dist/services/config_overrides.d.ts +157 -0
  152. package/dist/services/config_overrides.d.ts.map +1 -0
  153. package/dist/services/config_overrides.js +207 -0
  154. package/dist/services/config_overrides.js.map +1 -0
  155. package/dist/services/config_yaml.d.ts +647 -0
  156. package/dist/services/config_yaml.d.ts.map +1 -0
  157. package/dist/services/config_yaml.js +504 -0
  158. package/dist/services/config_yaml.js.map +1 -0
  159. package/dist/services/containers.d.ts +215 -0
  160. package/dist/services/containers.d.ts.map +1 -0
  161. package/dist/services/containers.js +416 -0
  162. package/dist/services/containers.js.map +1 -0
  163. package/dist/services/coordination_redis_settings.d.ts +93 -0
  164. package/dist/services/coordination_redis_settings.d.ts.map +1 -0
  165. package/dist/services/coordination_redis_settings.js +104 -0
  166. package/dist/services/coordination_redis_settings.js.map +1 -0
  167. package/dist/services/cost_tracking.d.ts +140 -0
  168. package/dist/services/cost_tracking.d.ts.map +1 -0
  169. package/dist/services/cost_tracking.js +181 -0
  170. package/dist/services/cost_tracking.js.map +1 -0
  171. package/dist/services/credential_management.d.ts +133 -0
  172. package/dist/services/credential_management.d.ts.map +1 -0
  173. package/dist/services/credential_management.js +198 -0
  174. package/dist/services/credential_management.js.map +1 -0
  175. package/dist/services/cursor_pass_through.d.ts +70 -0
  176. package/dist/services/cursor_pass_through.d.ts.map +1 -0
  177. package/dist/services/cursor_pass_through.js +112 -0
  178. package/dist/services/cursor_pass_through.js.map +1 -0
  179. package/dist/services/customer_management.d.ts +545 -0
  180. package/dist/services/customer_management.d.ts.map +1 -0
  181. package/dist/services/customer_management.js +567 -0
  182. package/dist/services/customer_management.js.map +1 -0
  183. package/dist/services/email_management.d.ts +57 -0
  184. package/dist/services/email_management.d.ts.map +1 -0
  185. package/dist/services/email_management.js +79 -0
  186. package/dist/services/email_management.js.map +1 -0
  187. package/dist/services/embeddings.d.ts +155 -0
  188. package/dist/services/embeddings.d.ts.map +1 -0
  189. package/dist/services/embeddings.js +168 -0
  190. package/dist/services/embeddings.js.map +1 -0
  191. package/dist/services/evals.d.ts +245 -0
  192. package/dist/services/evals.d.ts.map +1 -0
  193. package/dist/services/evals.js +292 -0
  194. package/dist/services/evals.js.map +1 -0
  195. package/dist/services/experimental.d.ts +166 -0
  196. package/dist/services/experimental.d.ts.map +1 -0
  197. package/dist/services/experimental.js +265 -0
  198. package/dist/services/experimental.js.map +1 -0
  199. package/dist/services/fallback_management.d.ts +91 -0
  200. package/dist/services/fallback_management.d.ts.map +1 -0
  201. package/dist/services/fallback_management.js +86 -0
  202. package/dist/services/fallback_management.js.map +1 -0
  203. package/dist/services/files.d.ts +219 -0
  204. package/dist/services/files.d.ts.map +1 -0
  205. package/dist/services/files.js +358 -0
  206. package/dist/services/files.js.map +1 -0
  207. package/dist/services/fine_tuning.d.ts +155 -0
  208. package/dist/services/fine_tuning.d.ts.map +1 -0
  209. package/dist/services/fine_tuning.js +232 -0
  210. package/dist/services/fine_tuning.js.map +1 -0
  211. package/dist/services/gemini_agents.d.ts +68 -0
  212. package/dist/services/gemini_agents.d.ts.map +1 -0
  213. package/dist/services/gemini_agents.js +110 -0
  214. package/dist/services/gemini_agents.js.map +1 -0
  215. package/dist/services/google_ai_studio_pass_through.d.ts +70 -0
  216. package/dist/services/google_ai_studio_pass_through.d.ts.map +1 -0
  217. package/dist/services/google_ai_studio_pass_through.js +112 -0
  218. package/dist/services/google_ai_studio_pass_through.js.map +1 -0
  219. package/dist/services/google_genai_endpoints.d.ts +174 -0
  220. package/dist/services/google_genai_endpoints.d.ts.map +1 -0
  221. package/dist/services/google_genai_endpoints.js +340 -0
  222. package/dist/services/google_genai_endpoints.js.map +1 -0
  223. package/dist/services/guardrails.d.ts +1221 -0
  224. package/dist/services/guardrails.d.ts.map +1 -0
  225. package/dist/services/guardrails.js +1087 -0
  226. package/dist/services/guardrails.js.map +1 -0
  227. package/dist/services/health.d.ts +212 -0
  228. package/dist/services/health.d.ts.map +1 -0
  229. package/dist/services/health.js +309 -0
  230. package/dist/services/health.js.map +1 -0
  231. package/dist/services/images.d.ts +117 -0
  232. package/dist/services/images.d.ts.map +1 -0
  233. package/dist/services/images.js +184 -0
  234. package/dist/services/images.js.map +1 -0
  235. package/dist/services/index.d.ts +106 -0
  236. package/dist/services/index.d.ts.map +1 -0
  237. package/dist/services/index.js +107 -0
  238. package/dist/services/index.js.map +1 -0
  239. package/dist/services/internal_user_management.d.ts +1062 -0
  240. package/dist/services/internal_user_management.d.ts.map +1 -0
  241. package/dist/services/internal_user_management.js +850 -0
  242. package/dist/services/internal_user_management.js.map +1 -0
  243. package/dist/services/invite_links.d.ts +56 -0
  244. package/dist/services/invite_links.d.ts.map +1 -0
  245. package/dist/services/invite_links.js +82 -0
  246. package/dist/services/invite_links.js.map +1 -0
  247. package/dist/services/jwt_mappings.d.ts +79 -0
  248. package/dist/services/jwt_mappings.d.ts.map +1 -0
  249. package/dist/services/jwt_mappings.js +116 -0
  250. package/dist/services/jwt_mappings.js.map +1 -0
  251. package/dist/services/key_management.d.ts +1640 -0
  252. package/dist/services/key_management.d.ts.map +1 -0
  253. package/dist/services/key_management.js +1344 -0
  254. package/dist/services/key_management.js.map +1 -0
  255. package/dist/services/langfuse_passthrough.d.ts +70 -0
  256. package/dist/services/langfuse_passthrough.d.ts.map +1 -0
  257. package/dist/services/langfuse_passthrough.js +114 -0
  258. package/dist/services/langfuse_passthrough.js.map +1 -0
  259. package/dist/services/llm_utils.d.ts +101 -0
  260. package/dist/services/llm_utils.d.ts.map +1 -0
  261. package/dist/services/llm_utils.js +110 -0
  262. package/dist/services/llm_utils.js.map +1 -0
  263. package/dist/services/logging_callbacks.d.ts +33 -0
  264. package/dist/services/logging_callbacks.d.ts.map +1 -0
  265. package/dist/services/logging_callbacks.js +46 -0
  266. package/dist/services/logging_callbacks.js.map +1 -0
  267. package/dist/services/mcp_byok_oauth.d.ts +112 -0
  268. package/dist/services/mcp_byok_oauth.d.ts.map +1 -0
  269. package/dist/services/mcp_byok_oauth.js +226 -0
  270. package/dist/services/mcp_byok_oauth.js.map +1 -0
  271. package/dist/services/mcp_discoverable.d.ts +197 -0
  272. package/dist/services/mcp_discoverable.d.ts.map +1 -0
  273. package/dist/services/mcp_discoverable.js +304 -0
  274. package/dist/services/mcp_discoverable.js.map +1 -0
  275. package/dist/services/mcp_management.d.ts +956 -0
  276. package/dist/services/mcp_management.d.ts.map +1 -0
  277. package/dist/services/mcp_management.js +1139 -0
  278. package/dist/services/mcp_management.js.map +1 -0
  279. package/dist/services/mcp_rest.d.ts +281 -0
  280. package/dist/services/mcp_rest.d.ts.map +1 -0
  281. package/dist/services/mcp_rest.js +269 -0
  282. package/dist/services/mcp_rest.js.map +1 -0
  283. package/dist/services/memory_management.d.ts +93 -0
  284. package/dist/services/memory_management.d.ts.map +1 -0
  285. package/dist/services/memory_management.js +117 -0
  286. package/dist/services/memory_management.js.map +1 -0
  287. package/dist/services/milvus_pass_through.d.ts +70 -0
  288. package/dist/services/milvus_pass_through.d.ts.map +1 -0
  289. package/dist/services/milvus_pass_through.js +112 -0
  290. package/dist/services/milvus_pass_through.js.map +1 -0
  291. package/dist/services/misc.d.ts +676 -0
  292. package/dist/services/misc.d.ts.map +1 -0
  293. package/dist/services/misc.js +954 -0
  294. package/dist/services/misc.js.map +1 -0
  295. package/dist/services/mistral_pass_through.d.ts +70 -0
  296. package/dist/services/mistral_pass_through.d.ts.map +1 -0
  297. package/dist/services/mistral_pass_through.js +114 -0
  298. package/dist/services/mistral_pass_through.js.map +1 -0
  299. package/dist/services/model_management.d.ts +1649 -0
  300. package/dist/services/model_management.d.ts.map +1 -0
  301. package/dist/services/model_management.js +1805 -0
  302. package/dist/services/model_management.js.map +1 -0
  303. package/dist/services/moderations.d.ts +25 -0
  304. package/dist/services/moderations.d.ts.map +1 -0
  305. package/dist/services/moderations.js +39 -0
  306. package/dist/services/moderations.js.map +1 -0
  307. package/dist/services/ocr.d.ts +25 -0
  308. package/dist/services/ocr.d.ts.map +1 -0
  309. package/dist/services/ocr.js +39 -0
  310. package/dist/services/ocr.js.map +1 -0
  311. package/dist/services/open_ai_pass_through.d.ts +125 -0
  312. package/dist/services/open_ai_pass_through.d.ts.map +1 -0
  313. package/dist/services/open_ai_pass_through.js +232 -0
  314. package/dist/services/open_ai_pass_through.js.map +1 -0
  315. package/dist/services/organization_management.d.ts +664 -0
  316. package/dist/services/organization_management.d.ts.map +1 -0
  317. package/dist/services/organization_management.js +644 -0
  318. package/dist/services/organization_management.js.map +1 -0
  319. package/dist/services/plugins.d.ts +106 -0
  320. package/dist/services/plugins.d.ts.map +1 -0
  321. package/dist/services/plugins.js +180 -0
  322. package/dist/services/plugins.js.map +1 -0
  323. package/dist/services/policies.d.ts +618 -0
  324. package/dist/services/policies.d.ts.map +1 -0
  325. package/dist/services/policies.js +616 -0
  326. package/dist/services/policies.js.map +1 -0
  327. package/dist/services/policy_engine.d.ts +483 -0
  328. package/dist/services/policy_engine.d.ts.map +1 -0
  329. package/dist/services/policy_engine.js +501 -0
  330. package/dist/services/policy_engine.js.map +1 -0
  331. package/dist/services/project_management.d.ts +356 -0
  332. package/dist/services/project_management.d.ts.map +1 -0
  333. package/dist/services/project_management.js +318 -0
  334. package/dist/services/project_management.js.map +1 -0
  335. package/dist/services/prompts.d.ts +193 -0
  336. package/dist/services/prompts.d.ts.map +1 -0
  337. package/dist/services/prompts.js +260 -0
  338. package/dist/services/prompts.js.map +1 -0
  339. package/dist/services/public.d.ts +300 -0
  340. package/dist/services/public.d.ts.map +1 -0
  341. package/dist/services/public.js +362 -0
  342. package/dist/services/public.js.map +1 -0
  343. package/dist/services/rag.d.ts +45 -0
  344. package/dist/services/rag.d.ts.map +1 -0
  345. package/dist/services/rag.js +71 -0
  346. package/dist/services/rag.js.map +1 -0
  347. package/dist/services/realtime.d.ts +91 -0
  348. package/dist/services/realtime.d.ts.map +1 -0
  349. package/dist/services/realtime.js +164 -0
  350. package/dist/services/realtime.js.map +1 -0
  351. package/dist/services/rerank.d.ts +35 -0
  352. package/dist/services/rerank.d.ts.map +1 -0
  353. package/dist/services/rerank.js +55 -0
  354. package/dist/services/rerank.js.map +1 -0
  355. package/dist/services/responses.d.ts +237 -0
  356. package/dist/services/responses.d.ts.map +1 -0
  357. package/dist/services/responses.js +445 -0
  358. package/dist/services/responses.js.map +1 -0
  359. package/dist/services/router_settings.d.ts +67 -0
  360. package/dist/services/router_settings.d.ts.map +1 -0
  361. package/dist/services/router_settings.js +63 -0
  362. package/dist/services/router_settings.js.map +1 -0
  363. package/dist/services/rust_control_plane.d.ts +52 -0
  364. package/dist/services/rust_control_plane.d.ts.map +1 -0
  365. package/dist/services/rust_control_plane.js +54 -0
  366. package/dist/services/rust_control_plane.js.map +1 -0
  367. package/dist/services/scim.d.ts +412 -0
  368. package/dist/services/scim.d.ts.map +1 -0
  369. package/dist/services/scim.js +519 -0
  370. package/dist/services/scim.js.map +1 -0
  371. package/dist/services/search.d.ts +79 -0
  372. package/dist/services/search.d.ts.map +1 -0
  373. package/dist/services/search.js +122 -0
  374. package/dist/services/search.js.map +1 -0
  375. package/dist/services/search_tools.d.ts +140 -0
  376. package/dist/services/search_tools.d.ts.map +1 -0
  377. package/dist/services/search_tools.js +201 -0
  378. package/dist/services/search_tools.js.map +1 -0
  379. package/dist/services/settings.d.ts +53 -0
  380. package/dist/services/settings.d.ts.map +1 -0
  381. package/dist/services/settings.js +67 -0
  382. package/dist/services/settings.js.map +1 -0
  383. package/dist/services/sso_settings.d.ts +239 -0
  384. package/dist/services/sso_settings.d.ts.map +1 -0
  385. package/dist/services/sso_settings.js +214 -0
  386. package/dist/services/sso_settings.js.map +1 -0
  387. package/dist/services/tag_management.d.ts +390 -0
  388. package/dist/services/tag_management.d.ts.map +1 -0
  389. package/dist/services/tag_management.js +407 -0
  390. package/dist/services/tag_management.js.map +1 -0
  391. package/dist/services/team_management.d.ts +1502 -0
  392. package/dist/services/team_management.d.ts.map +1 -0
  393. package/dist/services/team_management.js +1429 -0
  394. package/dist/services/team_management.js.map +1 -0
  395. package/dist/services/tools.d.ts +227 -0
  396. package/dist/services/tools.d.ts.map +1 -0
  397. package/dist/services/tools.js +266 -0
  398. package/dist/services/tools.js.map +1 -0
  399. package/dist/services/ui_settings.d.ts +90 -0
  400. package/dist/services/ui_settings.d.ts.map +1 -0
  401. package/dist/services/ui_settings.js +96 -0
  402. package/dist/services/ui_settings.js.map +1 -0
  403. package/dist/services/ui_theme_settings.d.ts +62 -0
  404. package/dist/services/ui_theme_settings.d.ts.map +1 -0
  405. package/dist/services/ui_theme_settings.js +79 -0
  406. package/dist/services/ui_theme_settings.js.map +1 -0
  407. package/dist/services/usage_ai.d.ts +39 -0
  408. package/dist/services/usage_ai.d.ts.map +1 -0
  409. package/dist/services/usage_ai.js +40 -0
  410. package/dist/services/usage_ai.js.map +1 -0
  411. package/dist/services/vantage.d.ts +108 -0
  412. package/dist/services/vantage.d.ts.map +1 -0
  413. package/dist/services/vantage.js +124 -0
  414. package/dist/services/vantage.js.map +1 -0
  415. package/dist/services/vector_store_management.d.ts +161 -0
  416. package/dist/services/vector_store_management.d.ts.map +1 -0
  417. package/dist/services/vector_store_management.js +191 -0
  418. package/dist/services/vector_store_management.js.map +1 -0
  419. package/dist/services/vector_stores.d.ts +342 -0
  420. package/dist/services/vector_stores.d.ts.map +1 -0
  421. package/dist/services/vector_stores.js +639 -0
  422. package/dist/services/vector_stores.js.map +1 -0
  423. package/dist/services/vertex_ai_pass_through.d.ts +180 -0
  424. package/dist/services/vertex_ai_pass_through.d.ts.map +1 -0
  425. package/dist/services/vertex_ai_pass_through.js +334 -0
  426. package/dist/services/vertex_ai_pass_through.js.map +1 -0
  427. package/dist/services/videos.d.ts +207 -0
  428. package/dist/services/videos.d.ts.map +1 -0
  429. package/dist/services/videos.js +373 -0
  430. package/dist/services/videos.js.map +1 -0
  431. package/dist/services/vllm_pass_through.d.ts +70 -0
  432. package/dist/services/vllm_pass_through.d.ts.map +1 -0
  433. package/dist/services/vllm_pass_through.js +104 -0
  434. package/dist/services/vllm_pass_through.js.map +1 -0
  435. package/dist/services/watsonx_pass_through.d.ts +70 -0
  436. package/dist/services/watsonx_pass_through.d.ts.map +1 -0
  437. package/dist/services/watsonx_pass_through.js +114 -0
  438. package/dist/services/watsonx_pass_through.js.map +1 -0
  439. package/dist/services/web_socket.d.ts +77 -0
  440. package/dist/services/web_socket.d.ts.map +1 -0
  441. package/dist/services/web_socket.js +135 -0
  442. package/dist/services/web_socket.js.map +1 -0
  443. package/dist/services/workflow_management.d.ts +140 -0
  444. package/dist/services/workflow_management.d.ts.map +1 -0
  445. package/dist/services/workflow_management.js +220 -0
  446. package/dist/services/workflow_management.js.map +1 -0
  447. package/dist/traits.d.ts +14 -0
  448. package/dist/traits.d.ts.map +1 -0
  449. package/dist/traits.js +15 -0
  450. package/dist/traits.js.map +1 -0
  451. package/package.json +75 -0
  452. package/src/credentials.ts +97 -0
  453. package/src/errors.ts +108 -0
  454. package/src/index.ts +33 -0
  455. package/src/protocol.ts +160 -0
  456. package/src/retry.ts +74 -0
  457. package/src/services/a2a.ts +250 -0
  458. package/src/services/a2a_registration.ts +94 -0
  459. package/src/services/access_groups.ts +716 -0
  460. package/src/services/adaptive_router.ts +49 -0
  461. package/src/services/agents.ts +1314 -0
  462. package/src/services/alerting.ts +49 -0
  463. package/src/services/anthropic_pass_through.ts +233 -0
  464. package/src/services/anthropic_passthrough.ts +123 -0
  465. package/src/services/anthropic_skills.ts +200 -0
  466. package/src/services/assembly_ai_eu_pass_through.ts +237 -0
  467. package/src/services/assembly_ai_pass_through.ts +237 -0
  468. package/src/services/assistants.ts +685 -0
  469. package/src/services/audio.ts +189 -0
  470. package/src/services/audit_logging.ts +194 -0
  471. package/src/services/auto_router.ts +625 -0
  472. package/src/services/aws_comprehend_medical_pass_through.ts +109 -0
  473. package/src/services/azure_ai_pass_through.ts +231 -0
  474. package/src/services/azure_pass_through.ts +227 -0
  475. package/src/services/batch.ts +553 -0
  476. package/src/services/bedrock_pass_through.ts +229 -0
  477. package/src/services/beta_agents.ts +444 -0
  478. package/src/services/beta_mcp.ts +105 -0
  479. package/src/services/budget_management.ts +465 -0
  480. package/src/services/budget_spend_tracking.ts +2670 -0
  481. package/src/services/cache_settings.ts +234 -0
  482. package/src/services/caching.ts +175 -0
  483. package/src/services/chat_completions.ts +1788 -0
  484. package/src/services/claude_code_marketplace.ts +569 -0
  485. package/src/services/cloudzero.ts +297 -0
  486. package/src/services/cohere_pass_through.ts +227 -0
  487. package/src/services/completions.ts +194 -0
  488. package/src/services/compliance.ts +175 -0
  489. package/src/services/config_overrides.ts +466 -0
  490. package/src/services/config_yaml.ts +1537 -0
  491. package/src/services/containers.ts +848 -0
  492. package/src/services/coordination_redis_settings.ts +251 -0
  493. package/src/services/cost_tracking.ts +407 -0
  494. package/src/services/credential_management.ts +436 -0
  495. package/src/services/cursor_pass_through.ts +227 -0
  496. package/src/services/customer_management.ts +1475 -0
  497. package/src/services/email_management.ts +171 -0
  498. package/src/services/embeddings.ts +424 -0
  499. package/src/services/evals.ts +672 -0
  500. package/src/services/experimental.ts +572 -0
  501. package/src/services/fallback_management.ts +224 -0
  502. package/src/services/files.ts +732 -0
  503. package/src/services/fine_tuning.ts +547 -0
  504. package/src/services/gemini_agents.ts +227 -0
  505. package/src/services/google_ai_studio_pass_through.ts +227 -0
  506. package/src/services/google_genai_endpoints.ts +688 -0
  507. package/src/services/guardrails.ts +3006 -0
  508. package/src/services/health.ts +713 -0
  509. package/src/services/images.ts +430 -0
  510. package/src/services/index.ts +106 -0
  511. package/src/services/internal_user_management.ts +2574 -0
  512. package/src/services/invite_links.ts +167 -0
  513. package/src/services/jwt_mappings.ts +238 -0
  514. package/src/services/key_management.ts +4162 -0
  515. package/src/services/langfuse_passthrough.ts +231 -0
  516. package/src/services/llm_utils.ts +429 -0
  517. package/src/services/logging_callbacks.ts +104 -0
  518. package/src/services/mcp_byok_oauth.ts +468 -0
  519. package/src/services/mcp_discoverable.ts +626 -0
  520. package/src/services/mcp_management.ts +2915 -0
  521. package/src/services/mcp_rest.ts +779 -0
  522. package/src/services/memory_management.ts +248 -0
  523. package/src/services/milvus_pass_through.ts +227 -0
  524. package/src/services/misc.ts +2128 -0
  525. package/src/services/mistral_pass_through.ts +229 -0
  526. package/src/services/model_management.ts +4501 -0
  527. package/src/services/moderations.ts +80 -0
  528. package/src/services/ocr.ts +78 -0
  529. package/src/services/open_ai_pass_through.ts +462 -0
  530. package/src/services/organization_management.ts +1749 -0
  531. package/src/services/plugins.ts +367 -0
  532. package/src/services/policies.ts +1676 -0
  533. package/src/services/policy_engine.ts +1318 -0
  534. package/src/services/project_management.ts +938 -0
  535. package/src/services/prompts.ts +592 -0
  536. package/src/services/public.ts +880 -0
  537. package/src/services/rag.ts +148 -0
  538. package/src/services/realtime.ts +350 -0
  539. package/src/services/rerank.ts +111 -0
  540. package/src/services/responses.ts +909 -0
  541. package/src/services/router_settings.ts +168 -0
  542. package/src/services/rust_control_plane.ts +123 -0
  543. package/src/services/scim.ts +1243 -0
  544. package/src/services/search.ts +260 -0
  545. package/src/services/search_tools.ts +439 -0
  546. package/src/services/settings.ts +146 -0
  547. package/src/services/sso_settings.ts +626 -0
  548. package/src/services/tag_management.ts +1004 -0
  549. package/src/services/team_management.ts +3990 -0
  550. package/src/services/tools.ts +628 -0
  551. package/src/services/ui_settings.ts +237 -0
  552. package/src/services/ui_theme_settings.ts +173 -0
  553. package/src/services/usage_ai.ts +86 -0
  554. package/src/services/vantage.ts +283 -0
  555. package/src/services/vector_store_management.ts +454 -0
  556. package/src/services/vector_stores.ts +1321 -0
  557. package/src/services/vertex_ai_pass_through.ts +684 -0
  558. package/src/services/videos.ts +762 -0
  559. package/src/services/vllm_pass_through.ts +227 -0
  560. package/src/services/watsonx_pass_through.ts +229 -0
  561. package/src/services/web_socket.ts +254 -0
  562. package/src/services/workflow_management.ts +482 -0
  563. package/src/traits.ts +44 -0
@@ -0,0 +1,4162 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (pinned litellm-openapi @ 1.100.0 — see README). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as Redacted from "effect/Redacted";
4
+ import * as API from "@distilled.cloud/core/api";
5
+ import * as C from "@distilled.cloud/core/category";
6
+ import * as T from "../traits.ts";
7
+ import {
8
+ LitellmProtocol,
9
+ type LitellmOpError,
10
+ type LitellmOpContext,
11
+ } from "../protocol.ts";
12
+ import * as Retry from "../retry.ts";
13
+
14
+ export type { LitellmOpError, LitellmOpContext };
15
+
16
+ export class BadRequest
17
+ extends /*@__PURE__*/ T.applyErrorMatchers(
18
+ /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
19
+ code: S.Number,
20
+ message: S.String,
21
+ }).pipe(C.withBadRequestError),
22
+ [{ status: 400 }],
23
+ ) {}
24
+
25
+ export class Forbidden
26
+ extends /*@__PURE__*/ T.applyErrorMatchers(
27
+ /*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
28
+ code: S.Number,
29
+ message: S.String,
30
+ }).pipe(C.withAuthError),
31
+ [{ status: 403 }],
32
+ ) {}
33
+
34
+ export class NotFound
35
+ extends /*@__PURE__*/ T.applyErrorMatchers(
36
+ /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
37
+ code: S.Number,
38
+ message: S.String,
39
+ }).pipe(C.withBadRequestError),
40
+ [{ status: 404 }],
41
+ ) {}
42
+
43
+ export class UnprocessableEntity
44
+ extends /*@__PURE__*/ T.applyErrorMatchers(
45
+ /*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
46
+ code: S.Number,
47
+ message: S.String,
48
+ }).pipe(C.withBadRequestError),
49
+ [{ status: 422 }],
50
+ ) {}
51
+
52
+ export type BulkUpdateKeyRequestItemTagsList = Array<string>;
53
+ export const BulkUpdateKeyRequestItemTagsList = /*@__PURE__*/ S.Array(
54
+ S.String,
55
+ ) as any as S.Schema<BulkUpdateKeyRequestItemTagsList>;
56
+
57
+ /** Individual key update request item */
58
+ export interface BulkUpdateKeyRequestItem {
59
+ budget_id?: string | null;
60
+ key: string;
61
+ max_budget?: number | null;
62
+ tags?: BulkUpdateKeyRequestItemTagsList | null;
63
+ team_id?: string | null;
64
+ }
65
+ export const BulkUpdateKeyRequestItem = /*@__PURE__*/ S.suspend(() =>
66
+ S.Struct({
67
+ budget_id: S.optional(S.NullOr(S.String)),
68
+ key: S.String,
69
+ max_budget: S.optional(S.NullOr(S.Number)),
70
+ tags: S.optional(S.NullOr(BulkUpdateKeyRequestItemTagsList)),
71
+ team_id: S.optional(S.NullOr(S.String)),
72
+ }),
73
+ ).annotate({
74
+ identifier: "BulkUpdateKeyRequestItem",
75
+ }) as any as S.Schema<BulkUpdateKeyRequestItem>;
76
+
77
+ export type BulkUpdateKeysKeyBulkUpdatePostRequestKeysList =
78
+ Array<BulkUpdateKeyRequestItem>;
79
+ export const BulkUpdateKeysKeyBulkUpdatePostRequestKeysList =
80
+ /*@__PURE__*/ S.Array(
81
+ BulkUpdateKeyRequestItem,
82
+ ) as any as S.Schema<BulkUpdateKeysKeyBulkUpdatePostRequestKeysList>;
83
+
84
+ export interface BulkUpdateKeysKeyBulkUpdatePostRequest {
85
+ keys: BulkUpdateKeysKeyBulkUpdatePostRequestKeysList;
86
+ }
87
+ export const BulkUpdateKeysKeyBulkUpdatePostRequest = /*@__PURE__*/ S.suspend(
88
+ () =>
89
+ S.Struct({
90
+ keys: BulkUpdateKeysKeyBulkUpdatePostRequestKeysList,
91
+ }).pipe(T.Http({ method: "POST", uri: "/key/bulk_update", code: 200 })),
92
+ ).annotate({
93
+ identifier: "BulkUpdateKeysKeyBulkUpdatePostRequest",
94
+ }) as any as S.Schema<BulkUpdateKeysKeyBulkUpdatePostRequest>;
95
+
96
+ export type FailedKeyUpdateKeyInfoMap = { [key: string]: unknown | undefined };
97
+ export const FailedKeyUpdateKeyInfoMap = /*@__PURE__*/ S.Record(
98
+ S.String,
99
+ S.Unknown,
100
+ ) as any as S.Schema<FailedKeyUpdateKeyInfoMap>;
101
+
102
+ /** Failed key update with reason */
103
+ export interface FailedKeyUpdate {
104
+ failed_reason: string;
105
+ key: string;
106
+ key_info?: FailedKeyUpdateKeyInfoMap | null;
107
+ }
108
+ export const FailedKeyUpdate = /*@__PURE__*/ S.suspend(() =>
109
+ S.Struct({
110
+ failed_reason: S.String,
111
+ key: S.String,
112
+ key_info: S.optional(S.NullOr(FailedKeyUpdateKeyInfoMap)),
113
+ }),
114
+ ).annotate({
115
+ identifier: "FailedKeyUpdate",
116
+ }) as any as S.Schema<FailedKeyUpdate>;
117
+
118
+ export type BulkUpdateKeyResponseFailedUpdatesList = Array<FailedKeyUpdate>;
119
+ export const BulkUpdateKeyResponseFailedUpdatesList = /*@__PURE__*/ S.Array(
120
+ FailedKeyUpdate,
121
+ ) as any as S.Schema<BulkUpdateKeyResponseFailedUpdatesList>;
122
+
123
+ export type SuccessfulKeyUpdateKeyInfoMap = {
124
+ [key: string]: unknown | undefined;
125
+ };
126
+ export const SuccessfulKeyUpdateKeyInfoMap = /*@__PURE__*/ S.Record(
127
+ S.String,
128
+ S.Unknown,
129
+ ) as any as S.Schema<SuccessfulKeyUpdateKeyInfoMap>;
130
+
131
+ /** Successfully updated key with its updated information */
132
+ export interface SuccessfulKeyUpdate {
133
+ key: string;
134
+ key_info: SuccessfulKeyUpdateKeyInfoMap;
135
+ }
136
+ export const SuccessfulKeyUpdate = /*@__PURE__*/ S.suspend(() =>
137
+ S.Struct({
138
+ key: S.String,
139
+ key_info: SuccessfulKeyUpdateKeyInfoMap,
140
+ }),
141
+ ).annotate({
142
+ identifier: "SuccessfulKeyUpdate",
143
+ }) as any as S.Schema<SuccessfulKeyUpdate>;
144
+
145
+ export type BulkUpdateKeyResponseSuccessfulUpdatesList =
146
+ Array<SuccessfulKeyUpdate>;
147
+ export const BulkUpdateKeyResponseSuccessfulUpdatesList = /*@__PURE__*/ S.Array(
148
+ SuccessfulKeyUpdate,
149
+ ) as any as S.Schema<BulkUpdateKeyResponseSuccessfulUpdatesList>;
150
+
151
+ /** Response for bulk key update operations */
152
+ export interface BulkUpdateKeyResponse {
153
+ failed_updates: BulkUpdateKeyResponseFailedUpdatesList;
154
+ successful_updates: BulkUpdateKeyResponseSuccessfulUpdatesList;
155
+ total_requested: number;
156
+ }
157
+ export const BulkUpdateKeyResponse = /*@__PURE__*/ S.suspend(() =>
158
+ S.Struct({
159
+ failed_updates: BulkUpdateKeyResponseFailedUpdatesList,
160
+ successful_updates: BulkUpdateKeyResponseSuccessfulUpdatesList,
161
+ total_requested: S.Number,
162
+ }),
163
+ ).annotate({
164
+ identifier: "BulkUpdateKeyResponse",
165
+ }) as any as S.Schema<BulkUpdateKeyResponse>;
166
+
167
+ export type BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequestKeyIdsList =
168
+ Array<string>;
169
+ export const BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequestKeyIdsList =
170
+ /*@__PURE__*/ S.Array(
171
+ S.String,
172
+ ) as any as S.Schema<BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequestKeyIdsList>;
173
+
174
+ export type KeyUpdateFieldsBudgetLimitsList = Array<unknown>;
175
+ export const KeyUpdateFieldsBudgetLimitsList = /*@__PURE__*/ S.Array(
176
+ S.Unknown,
177
+ ) as any as S.Schema<KeyUpdateFieldsBudgetLimitsList>;
178
+
179
+ export type KeyUpdateFieldsMetadataMap = { [key: string]: unknown | undefined };
180
+ export const KeyUpdateFieldsMetadataMap = /*@__PURE__*/ S.Record(
181
+ S.String,
182
+ S.Unknown,
183
+ ) as any as S.Schema<KeyUpdateFieldsMetadataMap>;
184
+
185
+ export type KeyUpdateFieldsModelMaxBudgetMap = {
186
+ [key: string]: unknown | undefined;
187
+ };
188
+ export const KeyUpdateFieldsModelMaxBudgetMap = /*@__PURE__*/ S.Record(
189
+ S.String,
190
+ S.Unknown,
191
+ ) as any as S.Schema<KeyUpdateFieldsModelMaxBudgetMap>;
192
+
193
+ export type KeyUpdateFieldsModelRpmLimitMap = {
194
+ [key: string]: unknown | undefined;
195
+ };
196
+ export const KeyUpdateFieldsModelRpmLimitMap = /*@__PURE__*/ S.Record(
197
+ S.String,
198
+ S.Unknown,
199
+ ) as any as S.Schema<KeyUpdateFieldsModelRpmLimitMap>;
200
+
201
+ export type KeyUpdateFieldsModelTpmLimitMap = {
202
+ [key: string]: unknown | undefined;
203
+ };
204
+ export const KeyUpdateFieldsModelTpmLimitMap = /*@__PURE__*/ S.Record(
205
+ S.String,
206
+ S.Unknown,
207
+ ) as any as S.Schema<KeyUpdateFieldsModelTpmLimitMap>;
208
+
209
+ export type KeyUpdateFieldsRpmLimitType =
210
+ | "guaranteed_throughput"
211
+ | "best_effort_throughput"
212
+ | "dynamic";
213
+ export const KeyUpdateFieldsRpmLimitType = S.String;
214
+
215
+ export type KeyUpdateFieldsTagsList = Array<string>;
216
+ export const KeyUpdateFieldsTagsList = /*@__PURE__*/ S.Array(
217
+ S.String,
218
+ ) as any as S.Schema<KeyUpdateFieldsTagsList>;
219
+
220
+ export type KeyUpdateFieldsTpmLimitType =
221
+ | "guaranteed_throughput"
222
+ | "best_effort_throughput"
223
+ | "dynamic";
224
+ export const KeyUpdateFieldsTpmLimitType = S.String;
225
+
226
+ /** Allowlist of bulk-broadcastable fields for /team/key/bulk_update; `extra="forbid"` blocks RBAC/ownership/scope mutations even by team admins. */
227
+ export interface KeyUpdateFields {
228
+ budget_duration?: string | null;
229
+ budget_id?: string | null;
230
+ budget_limits?: KeyUpdateFieldsBudgetLimitsList | null;
231
+ duration?: string | null;
232
+ max_budget?: number | null;
233
+ max_parallel_requests?: number | null;
234
+ metadata?: KeyUpdateFieldsMetadataMap | null;
235
+ model_max_budget?: KeyUpdateFieldsModelMaxBudgetMap | null;
236
+ model_rpm_limit?: KeyUpdateFieldsModelRpmLimitMap | null;
237
+ model_tpm_limit?: KeyUpdateFieldsModelTpmLimitMap | null;
238
+ rpm_limit?: number | null;
239
+ rpm_limit_type?: KeyUpdateFieldsRpmLimitType | (string & {}) | null;
240
+ tags?: KeyUpdateFieldsTagsList | null;
241
+ temp_budget_expiry?: string | null;
242
+ temp_budget_increase?: number | null;
243
+ tpm_limit?: number | null;
244
+ tpm_limit_type?: KeyUpdateFieldsTpmLimitType | (string & {}) | null;
245
+ }
246
+ export const KeyUpdateFields = /*@__PURE__*/ S.suspend(() =>
247
+ S.Struct({
248
+ budget_duration: S.optional(S.NullOr(S.String)),
249
+ budget_id: S.optional(S.NullOr(S.String)),
250
+ budget_limits: S.optional(S.NullOr(KeyUpdateFieldsBudgetLimitsList)),
251
+ duration: S.optional(S.NullOr(S.String)),
252
+ max_budget: S.optional(S.NullOr(S.Number)),
253
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
254
+ metadata: S.optional(S.NullOr(KeyUpdateFieldsMetadataMap)),
255
+ model_max_budget: S.optional(S.NullOr(KeyUpdateFieldsModelMaxBudgetMap)),
256
+ model_rpm_limit: S.optional(S.NullOr(KeyUpdateFieldsModelRpmLimitMap)),
257
+ model_tpm_limit: S.optional(S.NullOr(KeyUpdateFieldsModelTpmLimitMap)),
258
+ rpm_limit: S.optional(S.NullOr(S.Number)),
259
+ rpm_limit_type: S.optional(S.NullOr(KeyUpdateFieldsRpmLimitType)),
260
+ tags: S.optional(S.NullOr(KeyUpdateFieldsTagsList)),
261
+ temp_budget_expiry: S.optional(S.NullOr(S.String)),
262
+ temp_budget_increase: S.optional(S.NullOr(S.Number)),
263
+ tpm_limit: S.optional(S.NullOr(S.Number)),
264
+ tpm_limit_type: S.optional(S.NullOr(KeyUpdateFieldsTpmLimitType)),
265
+ }),
266
+ ).annotate({
267
+ identifier: "KeyUpdateFields",
268
+ }) as any as S.Schema<KeyUpdateFields>;
269
+
270
+ export interface BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequest {
271
+ all_keys_in_team?: boolean;
272
+ key_ids?: BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequestKeyIdsList | null;
273
+ team_id: string;
274
+ update_fields: KeyUpdateFields;
275
+ }
276
+ export const BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequest =
277
+ /*@__PURE__*/ S.suspend(() =>
278
+ S.Struct({
279
+ all_keys_in_team: S.optional(S.Boolean),
280
+ key_ids: S.optional(
281
+ S.NullOr(BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequestKeyIdsList),
282
+ ),
283
+ team_id: S.String,
284
+ update_fields: KeyUpdateFields,
285
+ }).pipe(
286
+ T.Http({ method: "POST", uri: "/team/key/bulk_update", code: 200 }),
287
+ ),
288
+ ).annotate({
289
+ identifier: "BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequest",
290
+ }) as any as S.Schema<BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequest>;
291
+
292
+ export type DeleteKeyFnKeyDeletePostRequestKeyAliasesList = Array<string>;
293
+ export const DeleteKeyFnKeyDeletePostRequestKeyAliasesList =
294
+ /*@__PURE__*/ S.Array(
295
+ S.String,
296
+ ) as any as S.Schema<DeleteKeyFnKeyDeletePostRequestKeyAliasesList>;
297
+
298
+ export type DeleteKeyFnKeyDeletePostRequestKeysList = Array<string>;
299
+ export const DeleteKeyFnKeyDeletePostRequestKeysList = /*@__PURE__*/ S.Array(
300
+ S.String,
301
+ ) as any as S.Schema<DeleteKeyFnKeyDeletePostRequestKeysList>;
302
+
303
+ export interface DeleteKeyFnKeyDeletePostRequest {
304
+ key_aliases?: DeleteKeyFnKeyDeletePostRequestKeyAliasesList | null;
305
+ keys?: DeleteKeyFnKeyDeletePostRequestKeysList | null;
306
+ }
307
+ export const DeleteKeyFnKeyDeletePostRequest = /*@__PURE__*/ S.suspend(() =>
308
+ S.Struct({
309
+ key_aliases: S.optional(
310
+ S.NullOr(DeleteKeyFnKeyDeletePostRequestKeyAliasesList),
311
+ ),
312
+ keys: S.optional(S.NullOr(DeleteKeyFnKeyDeletePostRequestKeysList)),
313
+ }).pipe(T.Http({ method: "POST", uri: "/key/delete", code: 200 })),
314
+ ).annotate({
315
+ identifier: "DeleteKeyFnKeyDeletePostRequest",
316
+ }) as any as S.Schema<DeleteKeyFnKeyDeletePostRequest>;
317
+
318
+ export interface DeleteKeyFnKeyDeletePostResponse {
319
+ body: unknown;
320
+ }
321
+ export const DeleteKeyFnKeyDeletePostResponse = /*@__PURE__*/ S.suspend(() =>
322
+ S.Struct({
323
+ body: S.Unknown,
324
+ }),
325
+ ).annotate({
326
+ identifier: "DeleteKeyFnKeyDeletePostResponse",
327
+ }) as any as S.Schema<DeleteKeyFnKeyDeletePostResponse>;
328
+
329
+ export type GenerateKeyFnKeyGeneratePostRequestAccessGroupIdsList =
330
+ Array<string>;
331
+ export const GenerateKeyFnKeyGeneratePostRequestAccessGroupIdsList =
332
+ /*@__PURE__*/ S.Array(
333
+ S.String,
334
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestAccessGroupIdsList>;
335
+
336
+ export type GenerateKeyFnKeyGeneratePostRequestAliasesMap = {
337
+ [key: string]: unknown | undefined;
338
+ };
339
+ export const GenerateKeyFnKeyGeneratePostRequestAliasesMap =
340
+ /*@__PURE__*/ S.Record(
341
+ S.String,
342
+ S.Unknown,
343
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestAliasesMap>;
344
+
345
+ export type GenerateKeyFnKeyGeneratePostRequestAllowedCacheControlsList =
346
+ Array<unknown>;
347
+ export const GenerateKeyFnKeyGeneratePostRequestAllowedCacheControlsList =
348
+ /*@__PURE__*/ S.Array(
349
+ S.Unknown,
350
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestAllowedCacheControlsList>;
351
+
352
+ export type GenerateKeyFnKeyGeneratePostRequestAllowedPassthroughRoutesList =
353
+ Array<unknown>;
354
+ export const GenerateKeyFnKeyGeneratePostRequestAllowedPassthroughRoutesList =
355
+ /*@__PURE__*/ S.Array(
356
+ S.Unknown,
357
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestAllowedPassthroughRoutesList>;
358
+
359
+ export type GenerateKeyFnKeyGeneratePostRequestAllowedRoutesList =
360
+ Array<unknown>;
361
+ export const GenerateKeyFnKeyGeneratePostRequestAllowedRoutesList =
362
+ /*@__PURE__*/ S.Array(
363
+ S.Unknown,
364
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestAllowedRoutesList>;
365
+
366
+ export type AllowedVectorStoreIndexItemIndexPermissionsItem = "read" | "write";
367
+ export const AllowedVectorStoreIndexItemIndexPermissionsItem = S.String;
368
+
369
+ export type AllowedVectorStoreIndexItemIndexPermissionsList = Array<
370
+ AllowedVectorStoreIndexItemIndexPermissionsItem | (string & {})
371
+ >;
372
+ export const AllowedVectorStoreIndexItemIndexPermissionsList =
373
+ /*@__PURE__*/ S.Array(
374
+ AllowedVectorStoreIndexItemIndexPermissionsItem,
375
+ ) as any as S.Schema<AllowedVectorStoreIndexItemIndexPermissionsList>;
376
+
377
+ export interface AllowedVectorStoreIndexItem {
378
+ index_name: string;
379
+ index_permissions: AllowedVectorStoreIndexItemIndexPermissionsList;
380
+ }
381
+ export const AllowedVectorStoreIndexItem = /*@__PURE__*/ S.suspend(() =>
382
+ S.Struct({
383
+ index_name: S.String,
384
+ index_permissions: AllowedVectorStoreIndexItemIndexPermissionsList,
385
+ }),
386
+ ).annotate({
387
+ identifier: "AllowedVectorStoreIndexItem",
388
+ }) as any as S.Schema<AllowedVectorStoreIndexItem>;
389
+
390
+ export type GenerateKeyFnKeyGeneratePostRequestAllowedVectorStoreIndexesList =
391
+ Array<AllowedVectorStoreIndexItem>;
392
+ export const GenerateKeyFnKeyGeneratePostRequestAllowedVectorStoreIndexesList =
393
+ /*@__PURE__*/ S.Array(
394
+ AllowedVectorStoreIndexItem,
395
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestAllowedVectorStoreIndexesList>;
396
+
397
+ export type GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksValueList =
398
+ Array<string>;
399
+ export const GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksValueList =
400
+ /*@__PURE__*/ S.Array(
401
+ S.String,
402
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksValueList>;
403
+
404
+ export type GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksMap = {
405
+ [key: string]:
406
+ | GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksValueList
407
+ | undefined;
408
+ };
409
+ export const GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksMap =
410
+ /*@__PURE__*/ S.Record(
411
+ S.String,
412
+ GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksValueList,
413
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksMap>;
414
+
415
+ /** A single budget window with its own limit and independent reset schedule. */
416
+ export interface BudgetLimitEntry {
417
+ budget_duration: string;
418
+ max_budget: number;
419
+ reset_at?: string | null;
420
+ }
421
+ export const BudgetLimitEntry = /*@__PURE__*/ S.suspend(() =>
422
+ S.Struct({
423
+ budget_duration: S.String,
424
+ max_budget: S.Number,
425
+ reset_at: S.optional(S.NullOr(S.String)),
426
+ }),
427
+ ).annotate({
428
+ identifier: "BudgetLimitEntry",
429
+ }) as any as S.Schema<BudgetLimitEntry>;
430
+
431
+ export type GenerateKeyFnKeyGeneratePostRequestBudgetLimitsList =
432
+ Array<BudgetLimitEntry>;
433
+ export const GenerateKeyFnKeyGeneratePostRequestBudgetLimitsList =
434
+ /*@__PURE__*/ S.Array(
435
+ BudgetLimitEntry,
436
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestBudgetLimitsList>;
437
+
438
+ export type GenerateKeyFnKeyGeneratePostRequestConfigMap = {
439
+ [key: string]: unknown | undefined;
440
+ };
441
+ export const GenerateKeyFnKeyGeneratePostRequestConfigMap =
442
+ /*@__PURE__*/ S.Record(
443
+ S.String,
444
+ S.Unknown,
445
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestConfigMap>;
446
+
447
+ export type GenerateKeyFnKeyGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap =
448
+ { [key: string]: number | undefined };
449
+ export const GenerateKeyFnKeyGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap =
450
+ /*@__PURE__*/ S.Record(
451
+ S.String,
452
+ S.Number,
453
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap>;
454
+
455
+ export type GenerateKeyFnKeyGeneratePostRequestEnforcedParamsList =
456
+ Array<string>;
457
+ export const GenerateKeyFnKeyGeneratePostRequestEnforcedParamsList =
458
+ /*@__PURE__*/ S.Array(
459
+ S.String,
460
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestEnforcedParamsList>;
461
+
462
+ export type GenerateKeyFnKeyGeneratePostRequestGuardrailsList = Array<string>;
463
+ export const GenerateKeyFnKeyGeneratePostRequestGuardrailsList =
464
+ /*@__PURE__*/ S.Array(
465
+ S.String,
466
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestGuardrailsList>;
467
+
468
+ /** Enum for key types that determine what routes a key can access */
469
+ export type LiteLLMKeyType = "llm_api" | "management" | "read_only" | "default";
470
+ export const LiteLLMKeyType = S.String;
471
+
472
+ export type GenerateKeyFnKeyGeneratePostRequestMcpRpmLimitMap = {
473
+ [key: string]: number | undefined;
474
+ };
475
+ export const GenerateKeyFnKeyGeneratePostRequestMcpRpmLimitMap =
476
+ /*@__PURE__*/ S.Record(
477
+ S.String,
478
+ S.Number,
479
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestMcpRpmLimitMap>;
480
+
481
+ export type GenerateKeyFnKeyGeneratePostRequestMetadataMap = {
482
+ [key: string]: unknown | undefined;
483
+ };
484
+ export const GenerateKeyFnKeyGeneratePostRequestMetadataMap =
485
+ /*@__PURE__*/ S.Record(
486
+ S.String,
487
+ S.Unknown,
488
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestMetadataMap>;
489
+
490
+ export type GenerateKeyFnKeyGeneratePostRequestModelMaxBudgetMap = {
491
+ [key: string]: unknown | undefined;
492
+ };
493
+ export const GenerateKeyFnKeyGeneratePostRequestModelMaxBudgetMap =
494
+ /*@__PURE__*/ S.Record(
495
+ S.String,
496
+ S.Unknown,
497
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestModelMaxBudgetMap>;
498
+
499
+ export type GenerateKeyFnKeyGeneratePostRequestModelRpmLimitMap = {
500
+ [key: string]: unknown | undefined;
501
+ };
502
+ export const GenerateKeyFnKeyGeneratePostRequestModelRpmLimitMap =
503
+ /*@__PURE__*/ S.Record(
504
+ S.String,
505
+ S.Unknown,
506
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestModelRpmLimitMap>;
507
+
508
+ export type GenerateKeyFnKeyGeneratePostRequestModelTpmLimitMap = {
509
+ [key: string]: unknown | undefined;
510
+ };
511
+ export const GenerateKeyFnKeyGeneratePostRequestModelTpmLimitMap =
512
+ /*@__PURE__*/ S.Record(
513
+ S.String,
514
+ S.Unknown,
515
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestModelTpmLimitMap>;
516
+
517
+ export type GenerateKeyFnKeyGeneratePostRequestModelsList = Array<unknown>;
518
+ export const GenerateKeyFnKeyGeneratePostRequestModelsList =
519
+ /*@__PURE__*/ S.Array(
520
+ S.Unknown,
521
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestModelsList>;
522
+
523
+ export type LiteLLMObjectPermissionBaseAgentAccessGroupsList = Array<string>;
524
+ export const LiteLLMObjectPermissionBaseAgentAccessGroupsList =
525
+ /*@__PURE__*/ S.Array(
526
+ S.String,
527
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseAgentAccessGroupsList>;
528
+
529
+ export type LiteLLMObjectPermissionBaseAgentsList = Array<string>;
530
+ export const LiteLLMObjectPermissionBaseAgentsList = /*@__PURE__*/ S.Array(
531
+ S.String,
532
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseAgentsList>;
533
+
534
+ export type LiteLLMObjectPermissionBaseBlockedToolsList = Array<string>;
535
+ export const LiteLLMObjectPermissionBaseBlockedToolsList =
536
+ /*@__PURE__*/ S.Array(
537
+ S.String,
538
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseBlockedToolsList>;
539
+
540
+ export type LiteLLMObjectPermissionBaseMcpAccessGroupsList = Array<string>;
541
+ export const LiteLLMObjectPermissionBaseMcpAccessGroupsList =
542
+ /*@__PURE__*/ S.Array(
543
+ S.String,
544
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseMcpAccessGroupsList>;
545
+
546
+ export type LiteLLMObjectPermissionBaseMcpServersList = Array<string>;
547
+ export const LiteLLMObjectPermissionBaseMcpServersList = /*@__PURE__*/ S.Array(
548
+ S.String,
549
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseMcpServersList>;
550
+
551
+ export type LiteLLMObjectPermissionBaseMcpToolPermissionsValueList =
552
+ Array<string>;
553
+ export const LiteLLMObjectPermissionBaseMcpToolPermissionsValueList =
554
+ /*@__PURE__*/ S.Array(
555
+ S.String,
556
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolPermissionsValueList>;
557
+
558
+ export type LiteLLMObjectPermissionBaseMcpToolPermissionsMap = {
559
+ [key: string]:
560
+ | LiteLLMObjectPermissionBaseMcpToolPermissionsValueList
561
+ | undefined;
562
+ };
563
+ export const LiteLLMObjectPermissionBaseMcpToolPermissionsMap =
564
+ /*@__PURE__*/ S.Record(
565
+ S.String,
566
+ LiteLLMObjectPermissionBaseMcpToolPermissionsValueList,
567
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolPermissionsMap>;
568
+
569
+ export type LiteLLMObjectPermissionBaseMcpToolsetsList = Array<string>;
570
+ export const LiteLLMObjectPermissionBaseMcpToolsetsList = /*@__PURE__*/ S.Array(
571
+ S.String,
572
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseMcpToolsetsList>;
573
+
574
+ export type LiteLLMObjectPermissionBaseModelsList = Array<string>;
575
+ export const LiteLLMObjectPermissionBaseModelsList = /*@__PURE__*/ S.Array(
576
+ S.String,
577
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseModelsList>;
578
+
579
+ export type LiteLLMObjectPermissionBaseSearchToolsList = Array<string>;
580
+ export const LiteLLMObjectPermissionBaseSearchToolsList = /*@__PURE__*/ S.Array(
581
+ S.String,
582
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseSearchToolsList>;
583
+
584
+ export type LiteLLMObjectPermissionBaseVectorStoresList = Array<string>;
585
+ export const LiteLLMObjectPermissionBaseVectorStoresList =
586
+ /*@__PURE__*/ S.Array(
587
+ S.String,
588
+ ) as any as S.Schema<LiteLLMObjectPermissionBaseVectorStoresList>;
589
+
590
+ export interface LiteLLMObjectPermissionBase {
591
+ agent_access_groups?: LiteLLMObjectPermissionBaseAgentAccessGroupsList | null;
592
+ agents?: LiteLLMObjectPermissionBaseAgentsList | null;
593
+ blocked_tools?: LiteLLMObjectPermissionBaseBlockedToolsList | null;
594
+ mcp_access_groups?: LiteLLMObjectPermissionBaseMcpAccessGroupsList | null;
595
+ mcp_servers?: LiteLLMObjectPermissionBaseMcpServersList | null;
596
+ mcp_tool_permissions?: LiteLLMObjectPermissionBaseMcpToolPermissionsMap | null;
597
+ mcp_tool_search_enabled?: boolean | null;
598
+ mcp_toolsets?: LiteLLMObjectPermissionBaseMcpToolsetsList | null;
599
+ models?: LiteLLMObjectPermissionBaseModelsList | null;
600
+ search_tools?: LiteLLMObjectPermissionBaseSearchToolsList | null;
601
+ vector_stores?: LiteLLMObjectPermissionBaseVectorStoresList | null;
602
+ }
603
+ export const LiteLLMObjectPermissionBase = /*@__PURE__*/ S.suspend(() =>
604
+ S.Struct({
605
+ agent_access_groups: S.optional(
606
+ S.NullOr(LiteLLMObjectPermissionBaseAgentAccessGroupsList),
607
+ ),
608
+ agents: S.optional(S.NullOr(LiteLLMObjectPermissionBaseAgentsList)),
609
+ blocked_tools: S.optional(
610
+ S.NullOr(LiteLLMObjectPermissionBaseBlockedToolsList),
611
+ ),
612
+ mcp_access_groups: S.optional(
613
+ S.NullOr(LiteLLMObjectPermissionBaseMcpAccessGroupsList),
614
+ ),
615
+ mcp_servers: S.optional(
616
+ S.NullOr(LiteLLMObjectPermissionBaseMcpServersList),
617
+ ),
618
+ mcp_tool_permissions: S.optional(
619
+ S.NullOr(LiteLLMObjectPermissionBaseMcpToolPermissionsMap),
620
+ ),
621
+ mcp_tool_search_enabled: S.optional(S.NullOr(S.Boolean)),
622
+ mcp_toolsets: S.optional(
623
+ S.NullOr(LiteLLMObjectPermissionBaseMcpToolsetsList),
624
+ ),
625
+ models: S.optional(S.NullOr(LiteLLMObjectPermissionBaseModelsList)),
626
+ search_tools: S.optional(
627
+ S.NullOr(LiteLLMObjectPermissionBaseSearchToolsList),
628
+ ),
629
+ vector_stores: S.optional(
630
+ S.NullOr(LiteLLMObjectPermissionBaseVectorStoresList),
631
+ ),
632
+ }),
633
+ ).annotate({
634
+ identifier: "LiteLLMObjectPermissionBase",
635
+ }) as any as S.Schema<LiteLLMObjectPermissionBase>;
636
+
637
+ export type GenerateKeyFnKeyGeneratePostRequestPermissionsMap = {
638
+ [key: string]: unknown | undefined;
639
+ };
640
+ export const GenerateKeyFnKeyGeneratePostRequestPermissionsMap =
641
+ /*@__PURE__*/ S.Record(
642
+ S.String,
643
+ S.Unknown,
644
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestPermissionsMap>;
645
+
646
+ export type GenerateKeyFnKeyGeneratePostRequestPoliciesList = Array<string>;
647
+ export const GenerateKeyFnKeyGeneratePostRequestPoliciesList =
648
+ /*@__PURE__*/ S.Array(
649
+ S.String,
650
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestPoliciesList>;
651
+
652
+ export type GenerateKeyFnKeyGeneratePostRequestPromptsList = Array<string>;
653
+ export const GenerateKeyFnKeyGeneratePostRequestPromptsList =
654
+ /*@__PURE__*/ S.Array(
655
+ S.String,
656
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestPromptsList>;
657
+
658
+ export type UpdateRouterConfigContextWindowFallbacksItemMap = {
659
+ [key: string]: unknown | undefined;
660
+ };
661
+ export const UpdateRouterConfigContextWindowFallbacksItemMap =
662
+ /*@__PURE__*/ S.Record(
663
+ S.String,
664
+ S.Unknown,
665
+ ) as any as S.Schema<UpdateRouterConfigContextWindowFallbacksItemMap>;
666
+
667
+ export type UpdateRouterConfigContextWindowFallbacksList =
668
+ Array<UpdateRouterConfigContextWindowFallbacksItemMap>;
669
+ export const UpdateRouterConfigContextWindowFallbacksList =
670
+ /*@__PURE__*/ S.Array(
671
+ UpdateRouterConfigContextWindowFallbacksItemMap,
672
+ ) as any as S.Schema<UpdateRouterConfigContextWindowFallbacksList>;
673
+
674
+ export type UpdateRouterConfigFallbacksItemMap = {
675
+ [key: string]: unknown | undefined;
676
+ };
677
+ export const UpdateRouterConfigFallbacksItemMap = /*@__PURE__*/ S.Record(
678
+ S.String,
679
+ S.Unknown,
680
+ ) as any as S.Schema<UpdateRouterConfigFallbacksItemMap>;
681
+
682
+ export type UpdateRouterConfigFallbacksList =
683
+ Array<UpdateRouterConfigFallbacksItemMap>;
684
+ export const UpdateRouterConfigFallbacksList = /*@__PURE__*/ S.Array(
685
+ UpdateRouterConfigFallbacksItemMap,
686
+ ) as any as S.Schema<UpdateRouterConfigFallbacksList>;
687
+
688
+ export type UpdateRouterConfigModelGroupAffinityConfigValueList = Array<string>;
689
+ export const UpdateRouterConfigModelGroupAffinityConfigValueList =
690
+ /*@__PURE__*/ S.Array(
691
+ S.String,
692
+ ) as any as S.Schema<UpdateRouterConfigModelGroupAffinityConfigValueList>;
693
+
694
+ export type UpdateRouterConfigModelGroupAffinityConfigMap = {
695
+ [key: string]:
696
+ | UpdateRouterConfigModelGroupAffinityConfigValueList
697
+ | undefined;
698
+ };
699
+ export const UpdateRouterConfigModelGroupAffinityConfigMap =
700
+ /*@__PURE__*/ S.Record(
701
+ S.String,
702
+ UpdateRouterConfigModelGroupAffinityConfigValueList,
703
+ ) as any as S.Schema<UpdateRouterConfigModelGroupAffinityConfigMap>;
704
+
705
+ export type UpdateRouterConfigModelGroupAliasValueCase1Map = {
706
+ [key: string]: unknown | undefined;
707
+ };
708
+ export const UpdateRouterConfigModelGroupAliasValueCase1Map =
709
+ /*@__PURE__*/ S.Record(
710
+ S.String,
711
+ S.Unknown,
712
+ ) as any as S.Schema<UpdateRouterConfigModelGroupAliasValueCase1Map>;
713
+
714
+ export type UpdateRouterConfigModelGroupAliasValue =
715
+ | string
716
+ | UpdateRouterConfigModelGroupAliasValueCase1Map;
717
+ export const UpdateRouterConfigModelGroupAliasValue =
718
+ S.Unknown as any as S.Schema<UpdateRouterConfigModelGroupAliasValue>;
719
+
720
+ export type UpdateRouterConfigModelGroupAliasMap = {
721
+ [key: string]: UpdateRouterConfigModelGroupAliasValue | undefined;
722
+ };
723
+ export const UpdateRouterConfigModelGroupAliasMap = /*@__PURE__*/ S.Record(
724
+ S.String,
725
+ UpdateRouterConfigModelGroupAliasValue,
726
+ ) as any as S.Schema<UpdateRouterConfigModelGroupAliasMap>;
727
+
728
+ /** Use this to set a custom number of retries per exception type If RateLimitErrorRetries = 3, then 3 retries will be made for RateLimitError Mapping of Exception type to number of retries https://docs.litellm.ai/docs/exception_mapping */
729
+ export interface RetryPolicy {
730
+ AuthenticationErrorRetries?: number | null;
731
+ BadRequestErrorRetries?: number | null;
732
+ ContentPolicyViolationErrorRetries?: number | null;
733
+ InternalServerErrorRetries?: number | null;
734
+ RateLimitErrorRetries?: number | null;
735
+ TimeoutErrorRetries?: number | null;
736
+ }
737
+ export const RetryPolicy = /*@__PURE__*/ S.suspend(() =>
738
+ S.Struct({
739
+ AuthenticationErrorRetries: S.optional(S.NullOr(S.Number)),
740
+ BadRequestErrorRetries: S.optional(S.NullOr(S.Number)),
741
+ ContentPolicyViolationErrorRetries: S.optional(S.NullOr(S.Number)),
742
+ InternalServerErrorRetries: S.optional(S.NullOr(S.Number)),
743
+ RateLimitErrorRetries: S.optional(S.NullOr(S.Number)),
744
+ TimeoutErrorRetries: S.optional(S.NullOr(S.Number)),
745
+ }),
746
+ ).annotate({ identifier: "RetryPolicy" }) as any as S.Schema<RetryPolicy>;
747
+
748
+ export type UpdateRouterConfigModelGroupRetryPolicyMap = {
749
+ [key: string]: RetryPolicy | undefined;
750
+ };
751
+ export const UpdateRouterConfigModelGroupRetryPolicyMap =
752
+ /*@__PURE__*/ S.Record(
753
+ S.String,
754
+ RetryPolicy,
755
+ ) as any as S.Schema<UpdateRouterConfigModelGroupRetryPolicyMap>;
756
+
757
+ export type RoutingGroupModelsList = Array<string>;
758
+ export const RoutingGroupModelsList = /*@__PURE__*/ S.Array(
759
+ S.String,
760
+ ) as any as S.Schema<RoutingGroupModelsList>;
761
+
762
+ export type RoutingGroupRoutingStrategyArgsMap = {
763
+ [key: string]: unknown | undefined;
764
+ };
765
+ export const RoutingGroupRoutingStrategyArgsMap = /*@__PURE__*/ S.Record(
766
+ S.String,
767
+ S.Unknown,
768
+ ) as any as S.Schema<RoutingGroupRoutingStrategyArgsMap>;
769
+
770
+ /** A group of models that share a routing strategy. */
771
+ export interface RoutingGroup {
772
+ group_name: string;
773
+ models: RoutingGroupModelsList;
774
+ routing_strategy: string;
775
+ routing_strategy_args?: RoutingGroupRoutingStrategyArgsMap | null;
776
+ }
777
+ export const RoutingGroup = /*@__PURE__*/ S.suspend(() =>
778
+ S.Struct({
779
+ group_name: S.String,
780
+ models: RoutingGroupModelsList,
781
+ routing_strategy: S.String,
782
+ routing_strategy_args: S.optional(
783
+ S.NullOr(RoutingGroupRoutingStrategyArgsMap),
784
+ ),
785
+ }),
786
+ ).annotate({ identifier: "RoutingGroup" }) as any as S.Schema<RoutingGroup>;
787
+
788
+ export type UpdateRouterConfigRoutingGroupsList = Array<RoutingGroup>;
789
+ export const UpdateRouterConfigRoutingGroupsList = /*@__PURE__*/ S.Array(
790
+ RoutingGroup,
791
+ ) as any as S.Schema<UpdateRouterConfigRoutingGroupsList>;
792
+
793
+ export type UpdateRouterConfigRoutingStrategyArgsMap = {
794
+ [key: string]: unknown | undefined;
795
+ };
796
+ export const UpdateRouterConfigRoutingStrategyArgsMap = /*@__PURE__*/ S.Record(
797
+ S.String,
798
+ S.Unknown,
799
+ ) as any as S.Schema<UpdateRouterConfigRoutingStrategyArgsMap>;
800
+
801
+ /** Set of params that you can modify via `router.update_settings()`. */
802
+ export interface UpdateRouterConfig {
803
+ allowed_fails?: number | null;
804
+ context_window_fallbacks?: UpdateRouterConfigContextWindowFallbacksList | null;
805
+ cooldown_time?: number | null;
806
+ enable_tag_filtering?: boolean | null;
807
+ fallbacks?: UpdateRouterConfigFallbacksList | null;
808
+ max_retries?: number | null;
809
+ model_group_affinity_config?: UpdateRouterConfigModelGroupAffinityConfigMap | null;
810
+ model_group_alias?: UpdateRouterConfigModelGroupAliasMap | null;
811
+ model_group_retry_policy?: UpdateRouterConfigModelGroupRetryPolicyMap | null;
812
+ num_retries?: number | null;
813
+ retry_after?: number | null;
814
+ retry_policy?: RetryPolicy | null;
815
+ routing_groups?: UpdateRouterConfigRoutingGroupsList | null;
816
+ routing_strategy?: string | null;
817
+ routing_strategy_args?: UpdateRouterConfigRoutingStrategyArgsMap | null;
818
+ tag_routing_prefix?: string | null;
819
+ timeout?: number | null;
820
+ }
821
+ export const UpdateRouterConfig = /*@__PURE__*/ S.suspend(() =>
822
+ S.Struct({
823
+ allowed_fails: S.optional(S.NullOr(S.Number)),
824
+ context_window_fallbacks: S.optional(
825
+ S.NullOr(UpdateRouterConfigContextWindowFallbacksList),
826
+ ),
827
+ cooldown_time: S.optional(S.NullOr(S.Number)),
828
+ enable_tag_filtering: S.optional(S.NullOr(S.Boolean)),
829
+ fallbacks: S.optional(S.NullOr(UpdateRouterConfigFallbacksList)),
830
+ max_retries: S.optional(S.NullOr(S.Number)),
831
+ model_group_affinity_config: S.optional(
832
+ S.NullOr(UpdateRouterConfigModelGroupAffinityConfigMap),
833
+ ),
834
+ model_group_alias: S.optional(
835
+ S.NullOr(UpdateRouterConfigModelGroupAliasMap),
836
+ ),
837
+ model_group_retry_policy: S.optional(
838
+ S.NullOr(UpdateRouterConfigModelGroupRetryPolicyMap),
839
+ ),
840
+ num_retries: S.optional(S.NullOr(S.Number)),
841
+ retry_after: S.optional(S.NullOr(S.Number)),
842
+ retry_policy: S.optional(S.NullOr(RetryPolicy)),
843
+ routing_groups: S.optional(S.NullOr(UpdateRouterConfigRoutingGroupsList)),
844
+ routing_strategy: S.optional(S.NullOr(S.String)),
845
+ routing_strategy_args: S.optional(
846
+ S.NullOr(UpdateRouterConfigRoutingStrategyArgsMap),
847
+ ),
848
+ tag_routing_prefix: S.optional(S.NullOr(S.String)),
849
+ timeout: S.optional(S.NullOr(S.Number)),
850
+ }),
851
+ ).annotate({
852
+ identifier: "UpdateRouterConfig",
853
+ }) as any as S.Schema<UpdateRouterConfig>;
854
+
855
+ export type GenerateKeyFnKeyGeneratePostRequestRpmLimitType =
856
+ | "guaranteed_throughput"
857
+ | "best_effort_throughput"
858
+ | "dynamic";
859
+ export const GenerateKeyFnKeyGeneratePostRequestRpmLimitType = S.String;
860
+
861
+ export type GenerateKeyFnKeyGeneratePostRequestTagRpmLimitMap = {
862
+ [key: string]: number | undefined;
863
+ };
864
+ export const GenerateKeyFnKeyGeneratePostRequestTagRpmLimitMap =
865
+ /*@__PURE__*/ S.Record(
866
+ S.String,
867
+ S.Number,
868
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestTagRpmLimitMap>;
869
+
870
+ export type GenerateKeyFnKeyGeneratePostRequestTagsList = Array<string>;
871
+ export const GenerateKeyFnKeyGeneratePostRequestTagsList =
872
+ /*@__PURE__*/ S.Array(
873
+ S.String,
874
+ ) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequestTagsList>;
875
+
876
+ export type GenerateKeyFnKeyGeneratePostRequestTpmLimitType =
877
+ | "guaranteed_throughput"
878
+ | "best_effort_throughput"
879
+ | "dynamic";
880
+ export const GenerateKeyFnKeyGeneratePostRequestTpmLimitType = S.String;
881
+
882
+ export interface GenerateKeyFnKeyGeneratePostRequest {
883
+ access_group_ids?: GenerateKeyFnKeyGeneratePostRequestAccessGroupIdsList | null;
884
+ agent_id?: string | null;
885
+ aliases?: GenerateKeyFnKeyGeneratePostRequestAliasesMap | null;
886
+ allowed_cache_controls?: GenerateKeyFnKeyGeneratePostRequestAllowedCacheControlsList | null;
887
+ allowed_passthrough_routes?: GenerateKeyFnKeyGeneratePostRequestAllowedPassthroughRoutesList | null;
888
+ allowed_routes?: GenerateKeyFnKeyGeneratePostRequestAllowedRoutesList | null;
889
+ allowed_vector_store_indexes?: GenerateKeyFnKeyGeneratePostRequestAllowedVectorStoreIndexesList | null;
890
+ /** Whether this key should be automatically rotated */
891
+ auto_rotate?: boolean | null;
892
+ blocked?: boolean | null;
893
+ budget_duration?: string | null;
894
+ budget_fallbacks?: GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksMap | null;
895
+ budget_id?: string | null;
896
+ budget_limits?: GenerateKeyFnKeyGeneratePostRequestBudgetLimitsList | null;
897
+ config?: GenerateKeyFnKeyGeneratePostRequestConfigMap | null;
898
+ default_estimated_output_tokens?: number | null;
899
+ default_estimated_output_tokens_per_model?: GenerateKeyFnKeyGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap | null;
900
+ disable_global_guardrails?: boolean | null;
901
+ duration?: string | null;
902
+ enable_prompt_caching?: boolean | null;
903
+ enforced_params?: GenerateKeyFnKeyGeneratePostRequestEnforcedParamsList | null;
904
+ guardrails?: GenerateKeyFnKeyGeneratePostRequestGuardrailsList | null;
905
+ key?: string | null;
906
+ key_alias?: string | null;
907
+ /** Type of key that determines default allowed routes. */
908
+ key_type?: LiteLLMKeyType | (string & {}) | null;
909
+ max_budget?: number | null;
910
+ max_parallel_requests?: number | null;
911
+ mcp_rpm_limit?: GenerateKeyFnKeyGeneratePostRequestMcpRpmLimitMap | null;
912
+ metadata?: GenerateKeyFnKeyGeneratePostRequestMetadataMap | null;
913
+ model_max_budget?: GenerateKeyFnKeyGeneratePostRequestModelMaxBudgetMap | null;
914
+ model_rpm_limit?: GenerateKeyFnKeyGeneratePostRequestModelRpmLimitMap | null;
915
+ model_tpm_limit?: GenerateKeyFnKeyGeneratePostRequestModelTpmLimitMap | null;
916
+ models?: GenerateKeyFnKeyGeneratePostRequestModelsList | null;
917
+ object_permission?: LiteLLMObjectPermissionBase | null;
918
+ organization_id?: string | null;
919
+ permissions?: GenerateKeyFnKeyGeneratePostRequestPermissionsMap | null;
920
+ policies?: GenerateKeyFnKeyGeneratePostRequestPoliciesList | null;
921
+ project_id?: string | null;
922
+ prompts?: GenerateKeyFnKeyGeneratePostRequestPromptsList | null;
923
+ /** How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True */
924
+ rotation_interval?: string | null;
925
+ router_settings?: UpdateRouterConfig | null;
926
+ rpm_limit?: number | null;
927
+ rpm_limit_type?:
928
+ | GenerateKeyFnKeyGeneratePostRequestRpmLimitType
929
+ | (string & {})
930
+ | null;
931
+ send_invite_email?: boolean | null;
932
+ soft_budget?: number | null;
933
+ spend?: number | null;
934
+ tag_rpm_limit?: GenerateKeyFnKeyGeneratePostRequestTagRpmLimitMap | null;
935
+ tags?: GenerateKeyFnKeyGeneratePostRequestTagsList | null;
936
+ team_id?: string | null;
937
+ throttle_on_budget_exceeded?: boolean | null;
938
+ tpm_limit?: number | null;
939
+ tpm_limit_type?:
940
+ | GenerateKeyFnKeyGeneratePostRequestTpmLimitType
941
+ | (string & {})
942
+ | null;
943
+ user_id?: string | null;
944
+ }
945
+ export const GenerateKeyFnKeyGeneratePostRequest = /*@__PURE__*/ S.suspend(() =>
946
+ S.Struct({
947
+ access_group_ids: S.optional(
948
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestAccessGroupIdsList),
949
+ ),
950
+ agent_id: S.optional(S.NullOr(S.String)),
951
+ aliases: S.optional(
952
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestAliasesMap),
953
+ ),
954
+ allowed_cache_controls: S.optional(
955
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestAllowedCacheControlsList),
956
+ ),
957
+ allowed_passthrough_routes: S.optional(
958
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestAllowedPassthroughRoutesList),
959
+ ),
960
+ allowed_routes: S.optional(
961
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestAllowedRoutesList),
962
+ ),
963
+ allowed_vector_store_indexes: S.optional(
964
+ S.NullOr(
965
+ GenerateKeyFnKeyGeneratePostRequestAllowedVectorStoreIndexesList,
966
+ ),
967
+ ),
968
+ auto_rotate: S.optional(S.NullOr(S.Boolean)),
969
+ blocked: S.optional(S.NullOr(S.Boolean)),
970
+ budget_duration: S.optional(S.NullOr(S.String)),
971
+ budget_fallbacks: S.optional(
972
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestBudgetFallbacksMap),
973
+ ),
974
+ budget_id: S.optional(S.NullOr(S.String)),
975
+ budget_limits: S.optional(
976
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestBudgetLimitsList),
977
+ ),
978
+ config: S.optional(S.NullOr(GenerateKeyFnKeyGeneratePostRequestConfigMap)),
979
+ default_estimated_output_tokens: S.optional(S.NullOr(S.Number)),
980
+ default_estimated_output_tokens_per_model: S.optional(
981
+ S.NullOr(
982
+ GenerateKeyFnKeyGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap,
983
+ ),
984
+ ),
985
+ disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
986
+ duration: S.optional(S.NullOr(S.String)),
987
+ enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
988
+ enforced_params: S.optional(
989
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestEnforcedParamsList),
990
+ ),
991
+ guardrails: S.optional(
992
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestGuardrailsList),
993
+ ),
994
+ key: S.optional(S.NullOr(S.String)),
995
+ key_alias: S.optional(S.NullOr(S.String)),
996
+ key_type: S.optional(S.NullOr(LiteLLMKeyType)),
997
+ max_budget: S.optional(S.NullOr(S.Number)),
998
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
999
+ mcp_rpm_limit: S.optional(
1000
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestMcpRpmLimitMap),
1001
+ ),
1002
+ metadata: S.optional(
1003
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestMetadataMap),
1004
+ ),
1005
+ model_max_budget: S.optional(
1006
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestModelMaxBudgetMap),
1007
+ ),
1008
+ model_rpm_limit: S.optional(
1009
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestModelRpmLimitMap),
1010
+ ),
1011
+ model_tpm_limit: S.optional(
1012
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestModelTpmLimitMap),
1013
+ ),
1014
+ models: S.optional(S.NullOr(GenerateKeyFnKeyGeneratePostRequestModelsList)),
1015
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionBase)),
1016
+ organization_id: S.optional(S.NullOr(S.String)),
1017
+ permissions: S.optional(
1018
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestPermissionsMap),
1019
+ ),
1020
+ policies: S.optional(
1021
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestPoliciesList),
1022
+ ),
1023
+ project_id: S.optional(S.NullOr(S.String)),
1024
+ prompts: S.optional(
1025
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestPromptsList),
1026
+ ),
1027
+ rotation_interval: S.optional(S.NullOr(S.String)),
1028
+ router_settings: S.optional(S.NullOr(UpdateRouterConfig)),
1029
+ rpm_limit: S.optional(S.NullOr(S.Number)),
1030
+ rpm_limit_type: S.optional(
1031
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestRpmLimitType),
1032
+ ),
1033
+ send_invite_email: S.optional(S.NullOr(S.Boolean)),
1034
+ soft_budget: S.optional(S.NullOr(S.Number)),
1035
+ spend: S.optional(S.NullOr(S.Number)),
1036
+ tag_rpm_limit: S.optional(
1037
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestTagRpmLimitMap),
1038
+ ),
1039
+ tags: S.optional(S.NullOr(GenerateKeyFnKeyGeneratePostRequestTagsList)),
1040
+ team_id: S.optional(S.NullOr(S.String)),
1041
+ throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
1042
+ tpm_limit: S.optional(S.NullOr(S.Number)),
1043
+ tpm_limit_type: S.optional(
1044
+ S.NullOr(GenerateKeyFnKeyGeneratePostRequestTpmLimitType),
1045
+ ),
1046
+ user_id: S.optional(S.NullOr(S.String)),
1047
+ }).pipe(T.Http({ method: "POST", uri: "/key/generate", code: 200 })),
1048
+ ).annotate({
1049
+ identifier: "GenerateKeyFnKeyGeneratePostRequest",
1050
+ }) as any as S.Schema<GenerateKeyFnKeyGeneratePostRequest>;
1051
+
1052
+ export type GenerateKeyResponseAccessGroupIdsList = Array<string>;
1053
+ export const GenerateKeyResponseAccessGroupIdsList = /*@__PURE__*/ S.Array(
1054
+ S.String,
1055
+ ) as any as S.Schema<GenerateKeyResponseAccessGroupIdsList>;
1056
+
1057
+ export type GenerateKeyResponseAliasesMap = {
1058
+ [key: string]: unknown | undefined;
1059
+ };
1060
+ export const GenerateKeyResponseAliasesMap = /*@__PURE__*/ S.Record(
1061
+ S.String,
1062
+ S.Unknown,
1063
+ ) as any as S.Schema<GenerateKeyResponseAliasesMap>;
1064
+
1065
+ export type GenerateKeyResponseAllowedCacheControlsList = Array<unknown>;
1066
+ export const GenerateKeyResponseAllowedCacheControlsList =
1067
+ /*@__PURE__*/ S.Array(
1068
+ S.Unknown,
1069
+ ) as any as S.Schema<GenerateKeyResponseAllowedCacheControlsList>;
1070
+
1071
+ export type GenerateKeyResponseAllowedPassthroughRoutesList = Array<unknown>;
1072
+ export const GenerateKeyResponseAllowedPassthroughRoutesList =
1073
+ /*@__PURE__*/ S.Array(
1074
+ S.Unknown,
1075
+ ) as any as S.Schema<GenerateKeyResponseAllowedPassthroughRoutesList>;
1076
+
1077
+ export type GenerateKeyResponseAllowedRoutesList = Array<unknown>;
1078
+ export const GenerateKeyResponseAllowedRoutesList = /*@__PURE__*/ S.Array(
1079
+ S.Unknown,
1080
+ ) as any as S.Schema<GenerateKeyResponseAllowedRoutesList>;
1081
+
1082
+ export type GenerateKeyResponseAllowedVectorStoreIndexesList =
1083
+ Array<AllowedVectorStoreIndexItem>;
1084
+ export const GenerateKeyResponseAllowedVectorStoreIndexesList =
1085
+ /*@__PURE__*/ S.Array(
1086
+ AllowedVectorStoreIndexItem,
1087
+ ) as any as S.Schema<GenerateKeyResponseAllowedVectorStoreIndexesList>;
1088
+
1089
+ export type GenerateKeyResponseBudgetFallbacksValueList = Array<string>;
1090
+ export const GenerateKeyResponseBudgetFallbacksValueList =
1091
+ /*@__PURE__*/ S.Array(
1092
+ S.String,
1093
+ ) as any as S.Schema<GenerateKeyResponseBudgetFallbacksValueList>;
1094
+
1095
+ export type GenerateKeyResponseBudgetFallbacksMap = {
1096
+ [key: string]: GenerateKeyResponseBudgetFallbacksValueList | undefined;
1097
+ };
1098
+ export const GenerateKeyResponseBudgetFallbacksMap = /*@__PURE__*/ S.Record(
1099
+ S.String,
1100
+ GenerateKeyResponseBudgetFallbacksValueList,
1101
+ ) as any as S.Schema<GenerateKeyResponseBudgetFallbacksMap>;
1102
+
1103
+ export type GenerateKeyResponseBudgetLimitsList = Array<BudgetLimitEntry>;
1104
+ export const GenerateKeyResponseBudgetLimitsList = /*@__PURE__*/ S.Array(
1105
+ BudgetLimitEntry,
1106
+ ) as any as S.Schema<GenerateKeyResponseBudgetLimitsList>;
1107
+
1108
+ export type GenerateKeyResponseConfigMap = {
1109
+ [key: string]: unknown | undefined;
1110
+ };
1111
+ export const GenerateKeyResponseConfigMap = /*@__PURE__*/ S.Record(
1112
+ S.String,
1113
+ S.Unknown,
1114
+ ) as any as S.Schema<GenerateKeyResponseConfigMap>;
1115
+
1116
+ export type GenerateKeyResponseDefaultEstimatedOutputTokensPerModelMap = {
1117
+ [key: string]: number | undefined;
1118
+ };
1119
+ export const GenerateKeyResponseDefaultEstimatedOutputTokensPerModelMap =
1120
+ /*@__PURE__*/ S.Record(
1121
+ S.String,
1122
+ S.Number,
1123
+ ) as any as S.Schema<GenerateKeyResponseDefaultEstimatedOutputTokensPerModelMap>;
1124
+
1125
+ export type GenerateKeyResponseEnforcedParamsList = Array<string>;
1126
+ export const GenerateKeyResponseEnforcedParamsList = /*@__PURE__*/ S.Array(
1127
+ S.String,
1128
+ ) as any as S.Schema<GenerateKeyResponseEnforcedParamsList>;
1129
+
1130
+ export type GenerateKeyResponseGuardrailsList = Array<string>;
1131
+ export const GenerateKeyResponseGuardrailsList = /*@__PURE__*/ S.Array(
1132
+ S.String,
1133
+ ) as any as S.Schema<GenerateKeyResponseGuardrailsList>;
1134
+
1135
+ export type GenerateKeyResponseMcpRpmLimitMap = {
1136
+ [key: string]: number | undefined;
1137
+ };
1138
+ export const GenerateKeyResponseMcpRpmLimitMap = /*@__PURE__*/ S.Record(
1139
+ S.String,
1140
+ S.Number,
1141
+ ) as any as S.Schema<GenerateKeyResponseMcpRpmLimitMap>;
1142
+
1143
+ export type GenerateKeyResponseMetadataMap = {
1144
+ [key: string]: unknown | undefined;
1145
+ };
1146
+ export const GenerateKeyResponseMetadataMap = /*@__PURE__*/ S.Record(
1147
+ S.String,
1148
+ S.Unknown,
1149
+ ) as any as S.Schema<GenerateKeyResponseMetadataMap>;
1150
+
1151
+ export type GenerateKeyResponseModelMaxBudgetMap = {
1152
+ [key: string]: unknown | undefined;
1153
+ };
1154
+ export const GenerateKeyResponseModelMaxBudgetMap = /*@__PURE__*/ S.Record(
1155
+ S.String,
1156
+ S.Unknown,
1157
+ ) as any as S.Schema<GenerateKeyResponseModelMaxBudgetMap>;
1158
+
1159
+ export type GenerateKeyResponseModelRpmLimitMap = {
1160
+ [key: string]: unknown | undefined;
1161
+ };
1162
+ export const GenerateKeyResponseModelRpmLimitMap = /*@__PURE__*/ S.Record(
1163
+ S.String,
1164
+ S.Unknown,
1165
+ ) as any as S.Schema<GenerateKeyResponseModelRpmLimitMap>;
1166
+
1167
+ export type GenerateKeyResponseModelTpmLimitMap = {
1168
+ [key: string]: unknown | undefined;
1169
+ };
1170
+ export const GenerateKeyResponseModelTpmLimitMap = /*@__PURE__*/ S.Record(
1171
+ S.String,
1172
+ S.Unknown,
1173
+ ) as any as S.Schema<GenerateKeyResponseModelTpmLimitMap>;
1174
+
1175
+ export type GenerateKeyResponseModelsList = Array<unknown>;
1176
+ export const GenerateKeyResponseModelsList = /*@__PURE__*/ S.Array(
1177
+ S.Unknown,
1178
+ ) as any as S.Schema<GenerateKeyResponseModelsList>;
1179
+
1180
+ export type GenerateKeyResponsePermissionsMap = {
1181
+ [key: string]: unknown | undefined;
1182
+ };
1183
+ export const GenerateKeyResponsePermissionsMap = /*@__PURE__*/ S.Record(
1184
+ S.String,
1185
+ S.Unknown,
1186
+ ) as any as S.Schema<GenerateKeyResponsePermissionsMap>;
1187
+
1188
+ export type GenerateKeyResponsePoliciesList = Array<string>;
1189
+ export const GenerateKeyResponsePoliciesList = /*@__PURE__*/ S.Array(
1190
+ S.String,
1191
+ ) as any as S.Schema<GenerateKeyResponsePoliciesList>;
1192
+
1193
+ export type GenerateKeyResponsePromptsList = Array<string>;
1194
+ export const GenerateKeyResponsePromptsList = /*@__PURE__*/ S.Array(
1195
+ S.String,
1196
+ ) as any as S.Schema<GenerateKeyResponsePromptsList>;
1197
+
1198
+ export type GenerateKeyResponseRpmLimitType =
1199
+ | "guaranteed_throughput"
1200
+ | "best_effort_throughput"
1201
+ | "dynamic";
1202
+ export const GenerateKeyResponseRpmLimitType = S.String;
1203
+
1204
+ export type GenerateKeyResponseTagRpmLimitMap = {
1205
+ [key: string]: number | undefined;
1206
+ };
1207
+ export const GenerateKeyResponseTagRpmLimitMap = /*@__PURE__*/ S.Record(
1208
+ S.String,
1209
+ S.Number,
1210
+ ) as any as S.Schema<GenerateKeyResponseTagRpmLimitMap>;
1211
+
1212
+ export type GenerateKeyResponseTagsList = Array<string>;
1213
+ export const GenerateKeyResponseTagsList = /*@__PURE__*/ S.Array(
1214
+ S.String,
1215
+ ) as any as S.Schema<GenerateKeyResponseTagsList>;
1216
+
1217
+ export type GenerateKeyResponseTpmLimitType =
1218
+ | "guaranteed_throughput"
1219
+ | "best_effort_throughput"
1220
+ | "dynamic";
1221
+ export const GenerateKeyResponseTpmLimitType = S.String;
1222
+
1223
+ export interface GenerateKeyResponse {
1224
+ access_group_ids?: GenerateKeyResponseAccessGroupIdsList | null;
1225
+ agent_id?: string | null;
1226
+ aliases?: GenerateKeyResponseAliasesMap | null;
1227
+ allowed_cache_controls?: GenerateKeyResponseAllowedCacheControlsList | null;
1228
+ allowed_passthrough_routes?: GenerateKeyResponseAllowedPassthroughRoutesList | null;
1229
+ allowed_routes?: GenerateKeyResponseAllowedRoutesList | null;
1230
+ allowed_vector_store_indexes?: GenerateKeyResponseAllowedVectorStoreIndexesList | null;
1231
+ blocked?: boolean | null;
1232
+ budget_duration?: string | null;
1233
+ budget_fallbacks?: GenerateKeyResponseBudgetFallbacksMap | null;
1234
+ budget_id?: string | null;
1235
+ budget_limits?: GenerateKeyResponseBudgetLimitsList | null;
1236
+ config?: GenerateKeyResponseConfigMap | null;
1237
+ created_at?: string | null;
1238
+ created_by?: string | null;
1239
+ default_estimated_output_tokens?: number | null;
1240
+ default_estimated_output_tokens_per_model?: GenerateKeyResponseDefaultEstimatedOutputTokensPerModelMap | null;
1241
+ disable_global_guardrails?: boolean | null;
1242
+ duration?: string | null;
1243
+ enable_prompt_caching?: boolean | null;
1244
+ enforced_params?: GenerateKeyResponseEnforcedParamsList | null;
1245
+ expires?: string | null;
1246
+ guardrails?: GenerateKeyResponseGuardrailsList | null;
1247
+ key: string | Redacted.Redacted<string>;
1248
+ key_alias?: string | null;
1249
+ key_name?: string | null;
1250
+ key_type?: string | null;
1251
+ litellm_budget_table?: unknown | null;
1252
+ max_budget?: number | null;
1253
+ max_parallel_requests?: number | null;
1254
+ mcp_rpm_limit?: GenerateKeyResponseMcpRpmLimitMap | null;
1255
+ metadata?: GenerateKeyResponseMetadataMap | null;
1256
+ model_max_budget?: GenerateKeyResponseModelMaxBudgetMap | null;
1257
+ model_rpm_limit?: GenerateKeyResponseModelRpmLimitMap | null;
1258
+ model_tpm_limit?: GenerateKeyResponseModelTpmLimitMap | null;
1259
+ models?: GenerateKeyResponseModelsList | null;
1260
+ object_permission?: LiteLLMObjectPermissionBase | null;
1261
+ organization_id?: string | null;
1262
+ permissions?: GenerateKeyResponsePermissionsMap | null;
1263
+ policies?: GenerateKeyResponsePoliciesList | null;
1264
+ project_id?: string | null;
1265
+ prompts?: GenerateKeyResponsePromptsList | null;
1266
+ router_settings?: UpdateRouterConfig | null;
1267
+ rpm_limit?: number | null;
1268
+ rpm_limit_type?: GenerateKeyResponseRpmLimitType | null;
1269
+ spend?: number | null;
1270
+ tag_rpm_limit?: GenerateKeyResponseTagRpmLimitMap | null;
1271
+ tags?: GenerateKeyResponseTagsList | null;
1272
+ team_id?: string | null;
1273
+ throttle_on_budget_exceeded?: boolean | null;
1274
+ token?: string | null;
1275
+ token_id?: string | null;
1276
+ tpm_limit?: number | null;
1277
+ tpm_limit_type?: GenerateKeyResponseTpmLimitType | null;
1278
+ updated_at?: string | null;
1279
+ updated_by?: string | null;
1280
+ user_id?: string | null;
1281
+ }
1282
+ export const GenerateKeyResponse = /*@__PURE__*/ S.suspend(() =>
1283
+ S.Struct({
1284
+ access_group_ids: S.optional(
1285
+ S.NullOr(GenerateKeyResponseAccessGroupIdsList),
1286
+ ),
1287
+ agent_id: S.optional(S.NullOr(S.String)),
1288
+ aliases: S.optional(S.NullOr(GenerateKeyResponseAliasesMap)),
1289
+ allowed_cache_controls: S.optional(
1290
+ S.NullOr(GenerateKeyResponseAllowedCacheControlsList),
1291
+ ),
1292
+ allowed_passthrough_routes: S.optional(
1293
+ S.NullOr(GenerateKeyResponseAllowedPassthroughRoutesList),
1294
+ ),
1295
+ allowed_routes: S.optional(S.NullOr(GenerateKeyResponseAllowedRoutesList)),
1296
+ allowed_vector_store_indexes: S.optional(
1297
+ S.NullOr(GenerateKeyResponseAllowedVectorStoreIndexesList),
1298
+ ),
1299
+ blocked: S.optional(S.NullOr(S.Boolean)),
1300
+ budget_duration: S.optional(S.NullOr(S.String)),
1301
+ budget_fallbacks: S.optional(
1302
+ S.NullOr(GenerateKeyResponseBudgetFallbacksMap),
1303
+ ),
1304
+ budget_id: S.optional(S.NullOr(S.String)),
1305
+ budget_limits: S.optional(S.NullOr(GenerateKeyResponseBudgetLimitsList)),
1306
+ config: S.optional(S.NullOr(GenerateKeyResponseConfigMap)),
1307
+ created_at: S.optional(S.NullOr(S.String)),
1308
+ created_by: S.optional(S.NullOr(S.String)),
1309
+ default_estimated_output_tokens: S.optional(S.NullOr(S.Number)),
1310
+ default_estimated_output_tokens_per_model: S.optional(
1311
+ S.NullOr(GenerateKeyResponseDefaultEstimatedOutputTokensPerModelMap),
1312
+ ),
1313
+ disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
1314
+ duration: S.optional(S.NullOr(S.String)),
1315
+ enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
1316
+ enforced_params: S.optional(
1317
+ S.NullOr(GenerateKeyResponseEnforcedParamsList),
1318
+ ),
1319
+ expires: S.optional(S.NullOr(S.String)),
1320
+ guardrails: S.optional(S.NullOr(GenerateKeyResponseGuardrailsList)),
1321
+ key: S.String.pipe(T.SensitiveValue({})),
1322
+ key_alias: S.optional(S.NullOr(S.String)),
1323
+ key_name: S.optional(S.NullOr(S.String)),
1324
+ key_type: S.optional(S.NullOr(S.String)),
1325
+ litellm_budget_table: S.optional(S.NullOr(S.Unknown)),
1326
+ max_budget: S.optional(S.NullOr(S.Number)),
1327
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
1328
+ mcp_rpm_limit: S.optional(S.NullOr(GenerateKeyResponseMcpRpmLimitMap)),
1329
+ metadata: S.optional(S.NullOr(GenerateKeyResponseMetadataMap)),
1330
+ model_max_budget: S.optional(
1331
+ S.NullOr(GenerateKeyResponseModelMaxBudgetMap),
1332
+ ),
1333
+ model_rpm_limit: S.optional(S.NullOr(GenerateKeyResponseModelRpmLimitMap)),
1334
+ model_tpm_limit: S.optional(S.NullOr(GenerateKeyResponseModelTpmLimitMap)),
1335
+ models: S.optional(S.NullOr(GenerateKeyResponseModelsList)),
1336
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionBase)),
1337
+ organization_id: S.optional(S.NullOr(S.String)),
1338
+ permissions: S.optional(S.NullOr(GenerateKeyResponsePermissionsMap)),
1339
+ policies: S.optional(S.NullOr(GenerateKeyResponsePoliciesList)),
1340
+ project_id: S.optional(S.NullOr(S.String)),
1341
+ prompts: S.optional(S.NullOr(GenerateKeyResponsePromptsList)),
1342
+ router_settings: S.optional(S.NullOr(UpdateRouterConfig)),
1343
+ rpm_limit: S.optional(S.NullOr(S.Number)),
1344
+ rpm_limit_type: S.optional(S.NullOr(GenerateKeyResponseRpmLimitType)),
1345
+ spend: S.optional(S.NullOr(S.Number)),
1346
+ tag_rpm_limit: S.optional(S.NullOr(GenerateKeyResponseTagRpmLimitMap)),
1347
+ tags: S.optional(S.NullOr(GenerateKeyResponseTagsList)),
1348
+ team_id: S.optional(S.NullOr(S.String)),
1349
+ throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
1350
+ token: S.optional(S.NullOr(S.String)),
1351
+ token_id: S.optional(S.NullOr(S.String)),
1352
+ tpm_limit: S.optional(S.NullOr(S.Number)),
1353
+ tpm_limit_type: S.optional(S.NullOr(GenerateKeyResponseTpmLimitType)),
1354
+ updated_at: S.optional(S.NullOr(S.String)),
1355
+ updated_by: S.optional(S.NullOr(S.String)),
1356
+ user_id: S.optional(S.NullOr(S.String)),
1357
+ }),
1358
+ ).annotate({
1359
+ identifier: "GenerateKeyResponse",
1360
+ }) as any as S.Schema<GenerateKeyResponse>;
1361
+
1362
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAccessGroupIdsList =
1363
+ Array<string>;
1364
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAccessGroupIdsList =
1365
+ /*@__PURE__*/ S.Array(
1366
+ S.String,
1367
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAccessGroupIdsList>;
1368
+
1369
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAliasesMap =
1370
+ { [key: string]: unknown | undefined };
1371
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAliasesMap =
1372
+ /*@__PURE__*/ S.Record(
1373
+ S.String,
1374
+ S.Unknown,
1375
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAliasesMap>;
1376
+
1377
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedCacheControlsList =
1378
+ Array<unknown>;
1379
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedCacheControlsList =
1380
+ /*@__PURE__*/ S.Array(
1381
+ S.Unknown,
1382
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedCacheControlsList>;
1383
+
1384
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedPassthroughRoutesList =
1385
+ Array<unknown>;
1386
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedPassthroughRoutesList =
1387
+ /*@__PURE__*/ S.Array(
1388
+ S.Unknown,
1389
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedPassthroughRoutesList>;
1390
+
1391
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedRoutesList =
1392
+ Array<unknown>;
1393
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedRoutesList =
1394
+ /*@__PURE__*/ S.Array(
1395
+ S.Unknown,
1396
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedRoutesList>;
1397
+
1398
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedVectorStoreIndexesList =
1399
+ Array<AllowedVectorStoreIndexItem>;
1400
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedVectorStoreIndexesList =
1401
+ /*@__PURE__*/ S.Array(
1402
+ AllowedVectorStoreIndexItem,
1403
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedVectorStoreIndexesList>;
1404
+
1405
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksValueList =
1406
+ Array<string>;
1407
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksValueList =
1408
+ /*@__PURE__*/ S.Array(
1409
+ S.String,
1410
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksValueList>;
1411
+
1412
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksMap =
1413
+ {
1414
+ [key: string]:
1415
+ | GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksValueList
1416
+ | undefined;
1417
+ };
1418
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksMap =
1419
+ /*@__PURE__*/ S.Record(
1420
+ S.String,
1421
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksValueList,
1422
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksMap>;
1423
+
1424
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetLimitsList =
1425
+ Array<BudgetLimitEntry>;
1426
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetLimitsList =
1427
+ /*@__PURE__*/ S.Array(
1428
+ BudgetLimitEntry,
1429
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetLimitsList>;
1430
+
1431
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestConfigMap =
1432
+ { [key: string]: unknown | undefined };
1433
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestConfigMap =
1434
+ /*@__PURE__*/ S.Record(
1435
+ S.String,
1436
+ S.Unknown,
1437
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestConfigMap>;
1438
+
1439
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap =
1440
+ { [key: string]: number | undefined };
1441
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap =
1442
+ /*@__PURE__*/ S.Record(
1443
+ S.String,
1444
+ S.Number,
1445
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap>;
1446
+
1447
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestEnforcedParamsList =
1448
+ Array<string>;
1449
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestEnforcedParamsList =
1450
+ /*@__PURE__*/ S.Array(
1451
+ S.String,
1452
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestEnforcedParamsList>;
1453
+
1454
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestGuardrailsList =
1455
+ Array<string>;
1456
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestGuardrailsList =
1457
+ /*@__PURE__*/ S.Array(
1458
+ S.String,
1459
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestGuardrailsList>;
1460
+
1461
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMcpRpmLimitMap =
1462
+ { [key: string]: number | undefined };
1463
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMcpRpmLimitMap =
1464
+ /*@__PURE__*/ S.Record(
1465
+ S.String,
1466
+ S.Number,
1467
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMcpRpmLimitMap>;
1468
+
1469
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMetadataMap =
1470
+ { [key: string]: unknown | undefined };
1471
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMetadataMap =
1472
+ /*@__PURE__*/ S.Record(
1473
+ S.String,
1474
+ S.Unknown,
1475
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMetadataMap>;
1476
+
1477
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelMaxBudgetMap =
1478
+ { [key: string]: unknown | undefined };
1479
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelMaxBudgetMap =
1480
+ /*@__PURE__*/ S.Record(
1481
+ S.String,
1482
+ S.Unknown,
1483
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelMaxBudgetMap>;
1484
+
1485
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelRpmLimitMap =
1486
+ { [key: string]: unknown | undefined };
1487
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelRpmLimitMap =
1488
+ /*@__PURE__*/ S.Record(
1489
+ S.String,
1490
+ S.Unknown,
1491
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelRpmLimitMap>;
1492
+
1493
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelTpmLimitMap =
1494
+ { [key: string]: unknown | undefined };
1495
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelTpmLimitMap =
1496
+ /*@__PURE__*/ S.Record(
1497
+ S.String,
1498
+ S.Unknown,
1499
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelTpmLimitMap>;
1500
+
1501
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelsList =
1502
+ Array<unknown>;
1503
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelsList =
1504
+ /*@__PURE__*/ S.Array(
1505
+ S.Unknown,
1506
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelsList>;
1507
+
1508
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPermissionsMap =
1509
+ { [key: string]: unknown | undefined };
1510
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPermissionsMap =
1511
+ /*@__PURE__*/ S.Record(
1512
+ S.String,
1513
+ S.Unknown,
1514
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPermissionsMap>;
1515
+
1516
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPoliciesList =
1517
+ Array<string>;
1518
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPoliciesList =
1519
+ /*@__PURE__*/ S.Array(
1520
+ S.String,
1521
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPoliciesList>;
1522
+
1523
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPromptsList =
1524
+ Array<string>;
1525
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPromptsList =
1526
+ /*@__PURE__*/ S.Array(
1527
+ S.String,
1528
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPromptsList>;
1529
+
1530
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestRpmLimitType =
1531
+ | "guaranteed_throughput"
1532
+ | "best_effort_throughput"
1533
+ | "dynamic";
1534
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestRpmLimitType =
1535
+ S.String;
1536
+
1537
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagRpmLimitMap =
1538
+ { [key: string]: number | undefined };
1539
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagRpmLimitMap =
1540
+ /*@__PURE__*/ S.Record(
1541
+ S.String,
1542
+ S.Number,
1543
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagRpmLimitMap>;
1544
+
1545
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagsList =
1546
+ Array<string>;
1547
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagsList =
1548
+ /*@__PURE__*/ S.Array(
1549
+ S.String,
1550
+ ) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagsList>;
1551
+
1552
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTpmLimitType =
1553
+ | "guaranteed_throughput"
1554
+ | "best_effort_throughput"
1555
+ | "dynamic";
1556
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTpmLimitType =
1557
+ S.String;
1558
+
1559
+ export interface GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest {
1560
+ access_group_ids?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAccessGroupIdsList | null;
1561
+ agent_id?: string | null;
1562
+ aliases?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAliasesMap | null;
1563
+ allowed_cache_controls?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedCacheControlsList | null;
1564
+ allowed_passthrough_routes?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedPassthroughRoutesList | null;
1565
+ allowed_routes?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedRoutesList | null;
1566
+ allowed_vector_store_indexes?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedVectorStoreIndexesList | null;
1567
+ /** Whether this key should be automatically rotated */
1568
+ auto_rotate?: boolean | null;
1569
+ blocked?: boolean | null;
1570
+ budget_duration?: string | null;
1571
+ budget_fallbacks?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksMap | null;
1572
+ budget_id?: string | null;
1573
+ budget_limits?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetLimitsList | null;
1574
+ config?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestConfigMap | null;
1575
+ default_estimated_output_tokens?: number | null;
1576
+ default_estimated_output_tokens_per_model?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap | null;
1577
+ disable_global_guardrails?: boolean | null;
1578
+ duration?: string | null;
1579
+ enable_prompt_caching?: boolean | null;
1580
+ enforced_params?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestEnforcedParamsList | null;
1581
+ guardrails?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestGuardrailsList | null;
1582
+ key?: string | null;
1583
+ key_alias?: string | null;
1584
+ /** Type of key that determines default allowed routes. */
1585
+ key_type?: LiteLLMKeyType | (string & {}) | null;
1586
+ max_budget?: number | null;
1587
+ max_parallel_requests?: number | null;
1588
+ mcp_rpm_limit?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMcpRpmLimitMap | null;
1589
+ metadata?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMetadataMap | null;
1590
+ model_max_budget?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelMaxBudgetMap | null;
1591
+ model_rpm_limit?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelRpmLimitMap | null;
1592
+ model_tpm_limit?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelTpmLimitMap | null;
1593
+ models?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelsList | null;
1594
+ object_permission?: LiteLLMObjectPermissionBase | null;
1595
+ organization_id?: string | null;
1596
+ permissions?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPermissionsMap | null;
1597
+ policies?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPoliciesList | null;
1598
+ project_id?: string | null;
1599
+ prompts?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPromptsList | null;
1600
+ /** How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True */
1601
+ rotation_interval?: string | null;
1602
+ router_settings?: UpdateRouterConfig | null;
1603
+ rpm_limit?: number | null;
1604
+ rpm_limit_type?:
1605
+ | GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestRpmLimitType
1606
+ | (string & {})
1607
+ | null;
1608
+ send_invite_email?: boolean | null;
1609
+ soft_budget?: number | null;
1610
+ spend?: number | null;
1611
+ tag_rpm_limit?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagRpmLimitMap | null;
1612
+ tags?: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagsList | null;
1613
+ team_id?: string | null;
1614
+ throttle_on_budget_exceeded?: boolean | null;
1615
+ tpm_limit?: number | null;
1616
+ tpm_limit_type?:
1617
+ | GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTpmLimitType
1618
+ | (string & {})
1619
+ | null;
1620
+ user_id?: string | null;
1621
+ }
1622
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest =
1623
+ /*@__PURE__*/ S.suspend(() =>
1624
+ S.Struct({
1625
+ access_group_ids: S.optional(
1626
+ S.NullOr(
1627
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAccessGroupIdsList,
1628
+ ),
1629
+ ),
1630
+ agent_id: S.optional(S.NullOr(S.String)),
1631
+ aliases: S.optional(
1632
+ S.NullOr(
1633
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAliasesMap,
1634
+ ),
1635
+ ),
1636
+ allowed_cache_controls: S.optional(
1637
+ S.NullOr(
1638
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedCacheControlsList,
1639
+ ),
1640
+ ),
1641
+ allowed_passthrough_routes: S.optional(
1642
+ S.NullOr(
1643
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedPassthroughRoutesList,
1644
+ ),
1645
+ ),
1646
+ allowed_routes: S.optional(
1647
+ S.NullOr(
1648
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedRoutesList,
1649
+ ),
1650
+ ),
1651
+ allowed_vector_store_indexes: S.optional(
1652
+ S.NullOr(
1653
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestAllowedVectorStoreIndexesList,
1654
+ ),
1655
+ ),
1656
+ auto_rotate: S.optional(S.NullOr(S.Boolean)),
1657
+ blocked: S.optional(S.NullOr(S.Boolean)),
1658
+ budget_duration: S.optional(S.NullOr(S.String)),
1659
+ budget_fallbacks: S.optional(
1660
+ S.NullOr(
1661
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetFallbacksMap,
1662
+ ),
1663
+ ),
1664
+ budget_id: S.optional(S.NullOr(S.String)),
1665
+ budget_limits: S.optional(
1666
+ S.NullOr(
1667
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestBudgetLimitsList,
1668
+ ),
1669
+ ),
1670
+ config: S.optional(
1671
+ S.NullOr(
1672
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestConfigMap,
1673
+ ),
1674
+ ),
1675
+ default_estimated_output_tokens: S.optional(S.NullOr(S.Number)),
1676
+ default_estimated_output_tokens_per_model: S.optional(
1677
+ S.NullOr(
1678
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestDefaultEstimatedOutputTokensPerModelMap,
1679
+ ),
1680
+ ),
1681
+ disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
1682
+ duration: S.optional(S.NullOr(S.String)),
1683
+ enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
1684
+ enforced_params: S.optional(
1685
+ S.NullOr(
1686
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestEnforcedParamsList,
1687
+ ),
1688
+ ),
1689
+ guardrails: S.optional(
1690
+ S.NullOr(
1691
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestGuardrailsList,
1692
+ ),
1693
+ ),
1694
+ key: S.optional(S.NullOr(S.String)),
1695
+ key_alias: S.optional(S.NullOr(S.String)),
1696
+ key_type: S.optional(S.NullOr(LiteLLMKeyType)),
1697
+ max_budget: S.optional(S.NullOr(S.Number)),
1698
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
1699
+ mcp_rpm_limit: S.optional(
1700
+ S.NullOr(
1701
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMcpRpmLimitMap,
1702
+ ),
1703
+ ),
1704
+ metadata: S.optional(
1705
+ S.NullOr(
1706
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestMetadataMap,
1707
+ ),
1708
+ ),
1709
+ model_max_budget: S.optional(
1710
+ S.NullOr(
1711
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelMaxBudgetMap,
1712
+ ),
1713
+ ),
1714
+ model_rpm_limit: S.optional(
1715
+ S.NullOr(
1716
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelRpmLimitMap,
1717
+ ),
1718
+ ),
1719
+ model_tpm_limit: S.optional(
1720
+ S.NullOr(
1721
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelTpmLimitMap,
1722
+ ),
1723
+ ),
1724
+ models: S.optional(
1725
+ S.NullOr(
1726
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestModelsList,
1727
+ ),
1728
+ ),
1729
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionBase)),
1730
+ organization_id: S.optional(S.NullOr(S.String)),
1731
+ permissions: S.optional(
1732
+ S.NullOr(
1733
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPermissionsMap,
1734
+ ),
1735
+ ),
1736
+ policies: S.optional(
1737
+ S.NullOr(
1738
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPoliciesList,
1739
+ ),
1740
+ ),
1741
+ project_id: S.optional(S.NullOr(S.String)),
1742
+ prompts: S.optional(
1743
+ S.NullOr(
1744
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestPromptsList,
1745
+ ),
1746
+ ),
1747
+ rotation_interval: S.optional(S.NullOr(S.String)),
1748
+ router_settings: S.optional(S.NullOr(UpdateRouterConfig)),
1749
+ rpm_limit: S.optional(S.NullOr(S.Number)),
1750
+ rpm_limit_type: S.optional(
1751
+ S.NullOr(
1752
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestRpmLimitType,
1753
+ ),
1754
+ ),
1755
+ send_invite_email: S.optional(S.NullOr(S.Boolean)),
1756
+ soft_budget: S.optional(S.NullOr(S.Number)),
1757
+ spend: S.optional(S.NullOr(S.Number)),
1758
+ tag_rpm_limit: S.optional(
1759
+ S.NullOr(
1760
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagRpmLimitMap,
1761
+ ),
1762
+ ),
1763
+ tags: S.optional(
1764
+ S.NullOr(
1765
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTagsList,
1766
+ ),
1767
+ ),
1768
+ team_id: S.optional(S.NullOr(S.String)),
1769
+ throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
1770
+ tpm_limit: S.optional(S.NullOr(S.Number)),
1771
+ tpm_limit_type: S.optional(
1772
+ S.NullOr(
1773
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequestTpmLimitType,
1774
+ ),
1775
+ ),
1776
+ user_id: S.optional(S.NullOr(S.String)),
1777
+ }).pipe(
1778
+ T.Http({
1779
+ method: "POST",
1780
+ uri: "/key/service-account/generate",
1781
+ code: 200,
1782
+ }),
1783
+ ),
1784
+ ).annotate({
1785
+ identifier:
1786
+ "GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest",
1787
+ }) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest>;
1788
+
1789
+ export interface GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse {
1790
+ body: unknown;
1791
+ }
1792
+ export const GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse =
1793
+ /*@__PURE__*/ S.suspend(() =>
1794
+ S.Struct({
1795
+ body: S.Unknown,
1796
+ }),
1797
+ ).annotate({
1798
+ identifier:
1799
+ "GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse",
1800
+ }) as any as S.Schema<GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse>;
1801
+
1802
+ export interface GetInfoKeyFnKeyInfoRequest {
1803
+ /** Key in the request parameters */
1804
+ key?: string;
1805
+ }
1806
+ export const GetInfoKeyFnKeyInfoRequest = /*@__PURE__*/ S.suspend(() =>
1807
+ S.Struct({
1808
+ key: S.optional(S.String.pipe(T.Query())),
1809
+ }).pipe(T.Http({ method: "GET", uri: "/key/info", code: 200 })),
1810
+ ).annotate({
1811
+ identifier: "GetInfoKeyFnKeyInfoRequest",
1812
+ }) as any as S.Schema<GetInfoKeyFnKeyInfoRequest>;
1813
+
1814
+ export interface GetInfoKeyFnKeyInfoResponse {
1815
+ body: unknown;
1816
+ }
1817
+ export const GetInfoKeyFnKeyInfoResponse = /*@__PURE__*/ S.suspend(() =>
1818
+ S.Struct({
1819
+ body: S.Unknown,
1820
+ }),
1821
+ ).annotate({
1822
+ identifier: "GetInfoKeyFnKeyInfoResponse",
1823
+ }) as any as S.Schema<GetInfoKeyFnKeyInfoResponse>;
1824
+
1825
+ export interface GetKeyAliasesKeyAliasRequest {
1826
+ /** Page number */
1827
+ page?: number;
1828
+ /** Page size */
1829
+ size?: number;
1830
+ /** Search key aliases (case-insensitive partial match) */
1831
+ search?: string;
1832
+ /** Filter aliases to keys belonging to this team */
1833
+ team_id?: string;
1834
+ }
1835
+ export const GetKeyAliasesKeyAliasRequest = /*@__PURE__*/ S.suspend(() =>
1836
+ S.Struct({
1837
+ page: S.optional(S.Number.pipe(T.Query())),
1838
+ size: S.optional(S.Number.pipe(T.Query())),
1839
+ search: S.optional(S.String.pipe(T.Query())),
1840
+ team_id: S.optional(S.String.pipe(T.Query())),
1841
+ }).pipe(T.Http({ method: "GET", uri: "/key/aliases", code: 200 })),
1842
+ ).annotate({
1843
+ identifier: "GetKeyAliasesKeyAliasRequest",
1844
+ }) as any as S.Schema<GetKeyAliasesKeyAliasRequest>;
1845
+
1846
+ export type GetKeyAliasesKeyAliasResponseBodyMap = {
1847
+ [key: string]: unknown | undefined;
1848
+ };
1849
+ export const GetKeyAliasesKeyAliasResponseBodyMap = /*@__PURE__*/ S.Record(
1850
+ S.String,
1851
+ S.Unknown,
1852
+ ) as any as S.Schema<GetKeyAliasesKeyAliasResponseBodyMap>;
1853
+
1854
+ export interface GetKeyAliasesKeyAliasResponse {
1855
+ body: GetKeyAliasesKeyAliasResponseBodyMap;
1856
+ }
1857
+ export const GetKeyAliasesKeyAliasResponse = /*@__PURE__*/ S.suspend(() =>
1858
+ S.Struct({
1859
+ body: GetKeyAliasesKeyAliasResponseBodyMap,
1860
+ }),
1861
+ ).annotate({
1862
+ identifier: "GetKeyAliasesKeyAliasResponse",
1863
+ }) as any as S.Schema<GetKeyAliasesKeyAliasResponse>;
1864
+
1865
+ export type ListKeysKeyListGetRequestExpandList = Array<string>;
1866
+ export const ListKeysKeyListGetRequestExpandList = /*@__PURE__*/ S.Array(
1867
+ S.String,
1868
+ ) as any as S.Schema<ListKeysKeyListGetRequestExpandList>;
1869
+
1870
+ export interface ListKeysKeyListGetRequest {
1871
+ /** Page number */
1872
+ page?: number;
1873
+ /** Page size */
1874
+ size?: number;
1875
+ /** Filter keys by user ID. Exact match by default; set substring_matching=true (admin only) for case-insensitive substring matching. */
1876
+ user_id?: string;
1877
+ /** Filter keys by team ID */
1878
+ team_id?: string;
1879
+ /** Filter keys by organization ID */
1880
+ organization_id?: string;
1881
+ /** Filter keys by key hash */
1882
+ key_hash?: string;
1883
+ /** Filter keys by key alias. Exact match by default; set substring_matching=true (admin only) for case-insensitive substring matching. */
1884
+ key_alias?: string;
1885
+ /** Return full key object */
1886
+ return_full_object?: boolean;
1887
+ /** Include all keys for teams that user is an admin of. */
1888
+ include_team_keys?: boolean;
1889
+ /** Include keys created by the user */
1890
+ include_created_by_keys?: boolean;
1891
+ /** Column to sort by (e.g. 'user_id', 'created_at', 'spend') */
1892
+ sort_by?: string;
1893
+ /** Sort order ('asc' or 'desc') */
1894
+ sort_order?: string;
1895
+ /** Expand related objects (e.g. 'user') */
1896
+ expand?: ListKeysKeyListGetRequestExpandList;
1897
+ /** Filter by status (e.g. 'deleted') */
1898
+ status?: string;
1899
+ /** Filter keys by project ID */
1900
+ project_id?: string;
1901
+ /** Filter keys by access group ID */
1902
+ access_group_id?: string;
1903
+ /** Filter keys by agent ID */
1904
+ agent_id?: string;
1905
+ /** If true (proxy admins only), match user_id/key_alias as case-insensitive substrings instead of exact values. Defaults to false: /key/list matched these exactly before substring search was added, and an exact user_id/key_alias filter must never return another user's keys. */
1906
+ substring_matching?: boolean;
1907
+ /** Filter keys by expiration. 'expired' returns keys whose expires is in the past; 'active' returns keys that never expire or expire in the future. Omit to return keys regardless of expiration. */
1908
+ expires?: string;
1909
+ }
1910
+ export const ListKeysKeyListGetRequest = /*@__PURE__*/ S.suspend(() =>
1911
+ S.Struct({
1912
+ page: S.optional(S.Number.pipe(T.Query())),
1913
+ size: S.optional(S.Number.pipe(T.Query())),
1914
+ user_id: S.optional(S.String.pipe(T.Query())),
1915
+ team_id: S.optional(S.String.pipe(T.Query())),
1916
+ organization_id: S.optional(S.String.pipe(T.Query())),
1917
+ key_hash: S.optional(S.String.pipe(T.Query())),
1918
+ key_alias: S.optional(S.String.pipe(T.Query())),
1919
+ return_full_object: S.optional(S.Boolean.pipe(T.Query())),
1920
+ include_team_keys: S.optional(S.Boolean.pipe(T.Query())),
1921
+ include_created_by_keys: S.optional(S.Boolean.pipe(T.Query())),
1922
+ sort_by: S.optional(S.String.pipe(T.Query())),
1923
+ sort_order: S.optional(S.String.pipe(T.Query())),
1924
+ expand: S.optional(ListKeysKeyListGetRequestExpandList.pipe(T.Query())),
1925
+ status: S.optional(S.String.pipe(T.Query())),
1926
+ project_id: S.optional(S.String.pipe(T.Query())),
1927
+ access_group_id: S.optional(S.String.pipe(T.Query())),
1928
+ agent_id: S.optional(S.String.pipe(T.Query())),
1929
+ substring_matching: S.optional(S.Boolean.pipe(T.Query())),
1930
+ expires: S.optional(S.String.pipe(T.Query())),
1931
+ }).pipe(T.Http({ method: "GET", uri: "/key/list", code: 200 })),
1932
+ ).annotate({
1933
+ identifier: "ListKeysKeyListGetRequest",
1934
+ }) as any as S.Schema<ListKeysKeyListGetRequest>;
1935
+
1936
+ export type UserAPIKeyAuthAccessGroupIdsList = Array<string>;
1937
+ export const UserAPIKeyAuthAccessGroupIdsList = /*@__PURE__*/ S.Array(
1938
+ S.String,
1939
+ ) as any as S.Schema<UserAPIKeyAuthAccessGroupIdsList>;
1940
+
1941
+ export type UserAPIKeyAuthAliasesMap = { [key: string]: unknown | undefined };
1942
+ export const UserAPIKeyAuthAliasesMap = /*@__PURE__*/ S.Record(
1943
+ S.String,
1944
+ S.Unknown,
1945
+ ) as any as S.Schema<UserAPIKeyAuthAliasesMap>;
1946
+
1947
+ export type UserAPIKeyAuthAllowedCacheControlsList = Array<unknown>;
1948
+ export const UserAPIKeyAuthAllowedCacheControlsList = /*@__PURE__*/ S.Array(
1949
+ S.Unknown,
1950
+ ) as any as S.Schema<UserAPIKeyAuthAllowedCacheControlsList>;
1951
+
1952
+ export type UserAPIKeyAuthAllowedModelRegion = "eu" | "us";
1953
+ export const UserAPIKeyAuthAllowedModelRegion = S.String;
1954
+
1955
+ export type UserAPIKeyAuthAllowedRoutesList = Array<unknown>;
1956
+ export const UserAPIKeyAuthAllowedRoutesList = /*@__PURE__*/ S.Array(
1957
+ S.Unknown,
1958
+ ) as any as S.Schema<UserAPIKeyAuthAllowedRoutesList>;
1959
+
1960
+ export type UserAPIKeyAuthBudgetFallbacksValueList = Array<string>;
1961
+ export const UserAPIKeyAuthBudgetFallbacksValueList = /*@__PURE__*/ S.Array(
1962
+ S.String,
1963
+ ) as any as S.Schema<UserAPIKeyAuthBudgetFallbacksValueList>;
1964
+
1965
+ export type UserAPIKeyAuthBudgetFallbacksMap = {
1966
+ [key: string]: UserAPIKeyAuthBudgetFallbacksValueList | undefined;
1967
+ };
1968
+ export const UserAPIKeyAuthBudgetFallbacksMap = /*@__PURE__*/ S.Record(
1969
+ S.String,
1970
+ UserAPIKeyAuthBudgetFallbacksValueList,
1971
+ ) as any as S.Schema<UserAPIKeyAuthBudgetFallbacksMap>;
1972
+
1973
+ export type UserAPIKeyAuthBudgetLimitsItemMap = {
1974
+ [key: string]: unknown | undefined;
1975
+ };
1976
+ export const UserAPIKeyAuthBudgetLimitsItemMap = /*@__PURE__*/ S.Record(
1977
+ S.String,
1978
+ S.Unknown,
1979
+ ) as any as S.Schema<UserAPIKeyAuthBudgetLimitsItemMap>;
1980
+
1981
+ export type UserAPIKeyAuthBudgetLimitsList =
1982
+ Array<UserAPIKeyAuthBudgetLimitsItemMap>;
1983
+ export const UserAPIKeyAuthBudgetLimitsList = /*@__PURE__*/ S.Array(
1984
+ UserAPIKeyAuthBudgetLimitsItemMap,
1985
+ ) as any as S.Schema<UserAPIKeyAuthBudgetLimitsList>;
1986
+
1987
+ export type UserAPIKeyAuthConfigMap = { [key: string]: unknown | undefined };
1988
+ export const UserAPIKeyAuthConfigMap = /*@__PURE__*/ S.Record(
1989
+ S.String,
1990
+ S.Unknown,
1991
+ ) as any as S.Schema<UserAPIKeyAuthConfigMap>;
1992
+
1993
+ export type UserAPIKeyAuthEndUserModelMaxBudgetMap = {
1994
+ [key: string]: unknown | undefined;
1995
+ };
1996
+ export const UserAPIKeyAuthEndUserModelMaxBudgetMap = /*@__PURE__*/ S.Record(
1997
+ S.String,
1998
+ S.Unknown,
1999
+ ) as any as S.Schema<UserAPIKeyAuthEndUserModelMaxBudgetMap>;
2000
+
2001
+ export type LiteLLMObjectPermissionTableAgentAccessGroupsList = Array<string>;
2002
+ export const LiteLLMObjectPermissionTableAgentAccessGroupsList =
2003
+ /*@__PURE__*/ S.Array(
2004
+ S.String,
2005
+ ) as any as S.Schema<LiteLLMObjectPermissionTableAgentAccessGroupsList>;
2006
+
2007
+ export type LiteLLMObjectPermissionTableAgentsList = Array<string>;
2008
+ export const LiteLLMObjectPermissionTableAgentsList = /*@__PURE__*/ S.Array(
2009
+ S.String,
2010
+ ) as any as S.Schema<LiteLLMObjectPermissionTableAgentsList>;
2011
+
2012
+ export type LiteLLMObjectPermissionTableBlockedToolsList = Array<string>;
2013
+ export const LiteLLMObjectPermissionTableBlockedToolsList =
2014
+ /*@__PURE__*/ S.Array(
2015
+ S.String,
2016
+ ) as any as S.Schema<LiteLLMObjectPermissionTableBlockedToolsList>;
2017
+
2018
+ export type LiteLLMObjectPermissionTableMcpAccessGroupsList = Array<string>;
2019
+ export const LiteLLMObjectPermissionTableMcpAccessGroupsList =
2020
+ /*@__PURE__*/ S.Array(
2021
+ S.String,
2022
+ ) as any as S.Schema<LiteLLMObjectPermissionTableMcpAccessGroupsList>;
2023
+
2024
+ export type LiteLLMObjectPermissionTableMcpServersList = Array<string>;
2025
+ export const LiteLLMObjectPermissionTableMcpServersList = /*@__PURE__*/ S.Array(
2026
+ S.String,
2027
+ ) as any as S.Schema<LiteLLMObjectPermissionTableMcpServersList>;
2028
+
2029
+ export type LiteLLMObjectPermissionTableMcpToolPermissionsValueList =
2030
+ Array<string>;
2031
+ export const LiteLLMObjectPermissionTableMcpToolPermissionsValueList =
2032
+ /*@__PURE__*/ S.Array(
2033
+ S.String,
2034
+ ) as any as S.Schema<LiteLLMObjectPermissionTableMcpToolPermissionsValueList>;
2035
+
2036
+ export type LiteLLMObjectPermissionTableMcpToolPermissionsMap = {
2037
+ [key: string]:
2038
+ | LiteLLMObjectPermissionTableMcpToolPermissionsValueList
2039
+ | undefined;
2040
+ };
2041
+ export const LiteLLMObjectPermissionTableMcpToolPermissionsMap =
2042
+ /*@__PURE__*/ S.Record(
2043
+ S.String,
2044
+ LiteLLMObjectPermissionTableMcpToolPermissionsValueList,
2045
+ ) as any as S.Schema<LiteLLMObjectPermissionTableMcpToolPermissionsMap>;
2046
+
2047
+ export type LiteLLMObjectPermissionTableMcpToolsetsList = Array<string>;
2048
+ export const LiteLLMObjectPermissionTableMcpToolsetsList =
2049
+ /*@__PURE__*/ S.Array(
2050
+ S.String,
2051
+ ) as any as S.Schema<LiteLLMObjectPermissionTableMcpToolsetsList>;
2052
+
2053
+ export type LiteLLMObjectPermissionTableModelsList = Array<string>;
2054
+ export const LiteLLMObjectPermissionTableModelsList = /*@__PURE__*/ S.Array(
2055
+ S.String,
2056
+ ) as any as S.Schema<LiteLLMObjectPermissionTableModelsList>;
2057
+
2058
+ export type LiteLLMObjectPermissionTableSearchToolsList = Array<string>;
2059
+ export const LiteLLMObjectPermissionTableSearchToolsList =
2060
+ /*@__PURE__*/ S.Array(
2061
+ S.String,
2062
+ ) as any as S.Schema<LiteLLMObjectPermissionTableSearchToolsList>;
2063
+
2064
+ export type LiteLLMObjectPermissionTableVectorStoresList = Array<string>;
2065
+ export const LiteLLMObjectPermissionTableVectorStoresList =
2066
+ /*@__PURE__*/ S.Array(
2067
+ S.String,
2068
+ ) as any as S.Schema<LiteLLMObjectPermissionTableVectorStoresList>;
2069
+
2070
+ /** Represents a LiteLLM_ObjectPermissionTable record */
2071
+ export interface LiteLLMObjectPermissionTable {
2072
+ agent_access_groups?: LiteLLMObjectPermissionTableAgentAccessGroupsList | null;
2073
+ agents?: LiteLLMObjectPermissionTableAgentsList | null;
2074
+ blocked_tools?: LiteLLMObjectPermissionTableBlockedToolsList | null;
2075
+ mcp_access_groups?: LiteLLMObjectPermissionTableMcpAccessGroupsList | null;
2076
+ mcp_servers?: LiteLLMObjectPermissionTableMcpServersList | null;
2077
+ mcp_tool_permissions?: LiteLLMObjectPermissionTableMcpToolPermissionsMap | null;
2078
+ mcp_tool_search_enabled?: boolean | null;
2079
+ mcp_toolsets?: LiteLLMObjectPermissionTableMcpToolsetsList | null;
2080
+ models?: LiteLLMObjectPermissionTableModelsList | null;
2081
+ object_permission_id: string;
2082
+ search_tools?: LiteLLMObjectPermissionTableSearchToolsList | null;
2083
+ vector_stores?: LiteLLMObjectPermissionTableVectorStoresList | null;
2084
+ }
2085
+ export const LiteLLMObjectPermissionTable = /*@__PURE__*/ S.suspend(() =>
2086
+ S.Struct({
2087
+ agent_access_groups: S.optional(
2088
+ S.NullOr(LiteLLMObjectPermissionTableAgentAccessGroupsList),
2089
+ ),
2090
+ agents: S.optional(S.NullOr(LiteLLMObjectPermissionTableAgentsList)),
2091
+ blocked_tools: S.optional(
2092
+ S.NullOr(LiteLLMObjectPermissionTableBlockedToolsList),
2093
+ ),
2094
+ mcp_access_groups: S.optional(
2095
+ S.NullOr(LiteLLMObjectPermissionTableMcpAccessGroupsList),
2096
+ ),
2097
+ mcp_servers: S.optional(
2098
+ S.NullOr(LiteLLMObjectPermissionTableMcpServersList),
2099
+ ),
2100
+ mcp_tool_permissions: S.optional(
2101
+ S.NullOr(LiteLLMObjectPermissionTableMcpToolPermissionsMap),
2102
+ ),
2103
+ mcp_tool_search_enabled: S.optional(S.NullOr(S.Boolean)),
2104
+ mcp_toolsets: S.optional(
2105
+ S.NullOr(LiteLLMObjectPermissionTableMcpToolsetsList),
2106
+ ),
2107
+ models: S.optional(S.NullOr(LiteLLMObjectPermissionTableModelsList)),
2108
+ object_permission_id: S.String,
2109
+ search_tools: S.optional(
2110
+ S.NullOr(LiteLLMObjectPermissionTableSearchToolsList),
2111
+ ),
2112
+ vector_stores: S.optional(
2113
+ S.NullOr(LiteLLMObjectPermissionTableVectorStoresList),
2114
+ ),
2115
+ }),
2116
+ ).annotate({
2117
+ identifier: "LiteLLMObjectPermissionTable",
2118
+ }) as any as S.Schema<LiteLLMObjectPermissionTable>;
2119
+
2120
+ export type UserAPIKeyAuthJwtClaimsMap = { [key: string]: unknown | undefined };
2121
+ export const UserAPIKeyAuthJwtClaimsMap = /*@__PURE__*/ S.Record(
2122
+ S.String,
2123
+ S.Unknown,
2124
+ ) as any as S.Schema<UserAPIKeyAuthJwtClaimsMap>;
2125
+
2126
+ export type UserAPIKeyAuthLitellmBudgetTableMap = {
2127
+ [key: string]: unknown | undefined;
2128
+ };
2129
+ export const UserAPIKeyAuthLitellmBudgetTableMap = /*@__PURE__*/ S.Record(
2130
+ S.String,
2131
+ S.Unknown,
2132
+ ) as any as S.Schema<UserAPIKeyAuthLitellmBudgetTableMap>;
2133
+
2134
+ export type UserAPIKeyAuthMetadataMap = { [key: string]: unknown | undefined };
2135
+ export const UserAPIKeyAuthMetadataMap = /*@__PURE__*/ S.Record(
2136
+ S.String,
2137
+ S.Unknown,
2138
+ ) as any as S.Schema<UserAPIKeyAuthMetadataMap>;
2139
+
2140
+ export type UserAPIKeyAuthModelMaxBudgetMap = {
2141
+ [key: string]: unknown | undefined;
2142
+ };
2143
+ export const UserAPIKeyAuthModelMaxBudgetMap = /*@__PURE__*/ S.Record(
2144
+ S.String,
2145
+ S.Unknown,
2146
+ ) as any as S.Schema<UserAPIKeyAuthModelMaxBudgetMap>;
2147
+
2148
+ export type UserAPIKeyAuthModelSpendMap = {
2149
+ [key: string]: unknown | undefined;
2150
+ };
2151
+ export const UserAPIKeyAuthModelSpendMap = /*@__PURE__*/ S.Record(
2152
+ S.String,
2153
+ S.Unknown,
2154
+ ) as any as S.Schema<UserAPIKeyAuthModelSpendMap>;
2155
+
2156
+ export type UserAPIKeyAuthModelsList = Array<unknown>;
2157
+ export const UserAPIKeyAuthModelsList = /*@__PURE__*/ S.Array(
2158
+ S.Unknown,
2159
+ ) as any as S.Schema<UserAPIKeyAuthModelsList>;
2160
+
2161
+ export type UserAPIKeyAuthOrganizationMetadataMap = {
2162
+ [key: string]: unknown | undefined;
2163
+ };
2164
+ export const UserAPIKeyAuthOrganizationMetadataMap = /*@__PURE__*/ S.Record(
2165
+ S.String,
2166
+ S.Unknown,
2167
+ ) as any as S.Schema<UserAPIKeyAuthOrganizationMetadataMap>;
2168
+
2169
+ export type UserAPIKeyAuthPermissionsMap = {
2170
+ [key: string]: unknown | undefined;
2171
+ };
2172
+ export const UserAPIKeyAuthPermissionsMap = /*@__PURE__*/ S.Record(
2173
+ S.String,
2174
+ S.Unknown,
2175
+ ) as any as S.Schema<UserAPIKeyAuthPermissionsMap>;
2176
+
2177
+ export type UserAPIKeyAuthProjectMetadataMap = {
2178
+ [key: string]: unknown | undefined;
2179
+ };
2180
+ export const UserAPIKeyAuthProjectMetadataMap = /*@__PURE__*/ S.Record(
2181
+ S.String,
2182
+ S.Unknown,
2183
+ ) as any as S.Schema<UserAPIKeyAuthProjectMetadataMap>;
2184
+
2185
+ export type UserAPIKeyAuthRouterSettingsMap = {
2186
+ [key: string]: unknown | undefined;
2187
+ };
2188
+ export const UserAPIKeyAuthRouterSettingsMap = /*@__PURE__*/ S.Record(
2189
+ S.String,
2190
+ S.Unknown,
2191
+ ) as any as S.Schema<UserAPIKeyAuthRouterSettingsMap>;
2192
+
2193
+ export type UserAPIKeyAuthRpmLimitPerModelMap = {
2194
+ [key: string]: number | undefined;
2195
+ };
2196
+ export const UserAPIKeyAuthRpmLimitPerModelMap = /*@__PURE__*/ S.Record(
2197
+ S.String,
2198
+ S.Number,
2199
+ ) as any as S.Schema<UserAPIKeyAuthRpmLimitPerModelMap>;
2200
+
2201
+ /** The role of the user within the team. 'admin' users can manage team settings and members, 'user' is a regular team member */
2202
+ export type MemberRole = "admin" | "user";
2203
+ export const MemberRole = S.String;
2204
+
2205
+ export interface Member {
2206
+ /** The role of the user within the team. 'admin' users can manage team settings and members, 'user' is a regular team member */
2207
+ role: MemberRole;
2208
+ /** The email address of the user to add. Either user_id or user_email must be provided */
2209
+ user_email?: string | null;
2210
+ /** The unique ID of the user to add. Either user_id or user_email must be provided */
2211
+ user_id?: string | null;
2212
+ }
2213
+ export const Member = /*@__PURE__*/ S.suspend(() =>
2214
+ S.Struct({
2215
+ role: MemberRole,
2216
+ user_email: S.optional(S.NullOr(S.String)),
2217
+ user_id: S.optional(S.NullOr(S.String)),
2218
+ }),
2219
+ ).annotate({ identifier: "Member" }) as any as S.Schema<Member>;
2220
+
2221
+ export type UserAPIKeyAuthTeamMetadataMap = {
2222
+ [key: string]: unknown | undefined;
2223
+ };
2224
+ export const UserAPIKeyAuthTeamMetadataMap = /*@__PURE__*/ S.Record(
2225
+ S.String,
2226
+ S.Unknown,
2227
+ ) as any as S.Schema<UserAPIKeyAuthTeamMetadataMap>;
2228
+
2229
+ export type UserAPIKeyAuthTeamModelAliasesMap = {
2230
+ [key: string]: unknown | undefined;
2231
+ };
2232
+ export const UserAPIKeyAuthTeamModelAliasesMap = /*@__PURE__*/ S.Record(
2233
+ S.String,
2234
+ S.Unknown,
2235
+ ) as any as S.Schema<UserAPIKeyAuthTeamModelAliasesMap>;
2236
+
2237
+ export type UserAPIKeyAuthTeamModelsList = Array<unknown>;
2238
+ export const UserAPIKeyAuthTeamModelsList = /*@__PURE__*/ S.Array(
2239
+ S.Unknown,
2240
+ ) as any as S.Schema<UserAPIKeyAuthTeamModelsList>;
2241
+
2242
+ export type UserAPIKeyAuthTpmLimitPerModelMap = {
2243
+ [key: string]: number | undefined;
2244
+ };
2245
+ export const UserAPIKeyAuthTpmLimitPerModelMap = /*@__PURE__*/ S.Record(
2246
+ S.String,
2247
+ S.Number,
2248
+ ) as any as S.Schema<UserAPIKeyAuthTpmLimitPerModelMap>;
2249
+
2250
+ export type UserAPIKeyAuthUserModelMaxBudgetMap = {
2251
+ [key: string]: unknown | undefined;
2252
+ };
2253
+ export const UserAPIKeyAuthUserModelMaxBudgetMap = /*@__PURE__*/ S.Record(
2254
+ S.String,
2255
+ S.Unknown,
2256
+ ) as any as S.Schema<UserAPIKeyAuthUserModelMaxBudgetMap>;
2257
+
2258
+ /** Admin Roles: PROXY_ADMIN: admin over the platform PROXY_ADMIN_VIEW_ONLY: can login, view all own keys, view all spend ORG_ADMIN: admin over a specific organization, can create teams, users only within their organization Internal User Roles: INTERNAL_USER: can login, view/create/delete their own keys, view their spend INTERNAL_USER_VIEW_ONLY: can login, view their own keys, view their own spend Team Roles: TEAM: used for JWT auth Customer Roles: CUSTOMER: External users -> these are customers */
2259
+ export type LitellmUserRoles =
2260
+ | "proxy_admin"
2261
+ | "proxy_admin_viewer"
2262
+ | "org_admin"
2263
+ | "internal_user"
2264
+ | "internal_user_viewer"
2265
+ | "team"
2266
+ | "customer";
2267
+ export const LitellmUserRoles = S.String;
2268
+
2269
+ /** Return the row in the db */
2270
+ export interface UserAPIKeyAuth {
2271
+ access_group_ids?: UserAPIKeyAuthAccessGroupIdsList | null;
2272
+ agent_id?: string | null;
2273
+ aliases?: UserAPIKeyAuthAliasesMap;
2274
+ allowed_cache_controls?: UserAPIKeyAuthAllowedCacheControlsList | null;
2275
+ allowed_model_region?: UserAPIKeyAuthAllowedModelRegion | null;
2276
+ allowed_routes?: UserAPIKeyAuthAllowedRoutesList | null;
2277
+ api_key?: string | null;
2278
+ auto_rotate?: boolean | null;
2279
+ blocked?: boolean | null;
2280
+ budget_duration?: string | null;
2281
+ budget_fallbacks?: UserAPIKeyAuthBudgetFallbacksMap;
2282
+ budget_id?: string | null;
2283
+ budget_limits?: UserAPIKeyAuthBudgetLimitsList | null;
2284
+ budget_reset_at?: string | null;
2285
+ config?: UserAPIKeyAuthConfigMap;
2286
+ created_at?: string | null;
2287
+ created_by?: string | null;
2288
+ created_by_user?: unknown | null;
2289
+ end_user_id?: string | null;
2290
+ end_user_max_budget?: number | null;
2291
+ end_user_model_max_budget?: UserAPIKeyAuthEndUserModelMaxBudgetMap | null;
2292
+ end_user_object_permission?: LiteLLMObjectPermissionTable | null;
2293
+ end_user_rpm_limit?: number | null;
2294
+ end_user_tpm_limit?: number | null;
2295
+ expires?: string | null;
2296
+ is_session_token?: boolean;
2297
+ jwt_claims?: UserAPIKeyAuthJwtClaimsMap | null;
2298
+ key_alias?: string | null;
2299
+ key_name?: string | null;
2300
+ key_rotation_at?: string | null;
2301
+ key_type?: string | null;
2302
+ last_active?: string | null;
2303
+ last_refreshed_at?: number | null;
2304
+ last_rotation_at?: string | null;
2305
+ litellm_budget_table?: UserAPIKeyAuthLitellmBudgetTableMap | null;
2306
+ max_budget?: number | null;
2307
+ max_parallel_requests?: number | null;
2308
+ metadata?: UserAPIKeyAuthMetadataMap;
2309
+ model_max_budget?: UserAPIKeyAuthModelMaxBudgetMap;
2310
+ model_spend?: UserAPIKeyAuthModelSpendMap;
2311
+ models?: UserAPIKeyAuthModelsList;
2312
+ object_permission?: LiteLLMObjectPermissionTable | null;
2313
+ object_permission_id?: string | null;
2314
+ org_id?: string | null;
2315
+ organization_alias?: string | null;
2316
+ organization_max_budget?: number | null;
2317
+ organization_metadata?: UserAPIKeyAuthOrganizationMetadataMap | null;
2318
+ organization_rpm_limit?: number | null;
2319
+ organization_tpm_limit?: number | null;
2320
+ parent_otel_span?: unknown | null;
2321
+ permissions?: UserAPIKeyAuthPermissionsMap;
2322
+ project_alias?: string | null;
2323
+ project_id?: string | null;
2324
+ project_metadata?: UserAPIKeyAuthProjectMetadataMap | null;
2325
+ request_route?: string | null;
2326
+ rotation_count?: number | null;
2327
+ rotation_interval?: string | null;
2328
+ router_settings?: UserAPIKeyAuthRouterSettingsMap | null;
2329
+ rpm_limit?: number | null;
2330
+ rpm_limit_per_model?: UserAPIKeyAuthRpmLimitPerModelMap | null;
2331
+ settings_updated_at?: string | null;
2332
+ soft_budget?: number | null;
2333
+ soft_budget_cooldown?: boolean;
2334
+ spend?: number;
2335
+ team_alias?: string | null;
2336
+ team_blocked?: boolean;
2337
+ team_id?: string | null;
2338
+ team_max_budget?: number | null;
2339
+ team_member?: Member | null;
2340
+ team_member_rpm_limit?: number | null;
2341
+ team_member_spend?: number | null;
2342
+ team_member_tpm_limit?: number | null;
2343
+ team_metadata?: UserAPIKeyAuthTeamMetadataMap | null;
2344
+ team_model_aliases?: UserAPIKeyAuthTeamModelAliasesMap | null;
2345
+ team_models?: UserAPIKeyAuthTeamModelsList;
2346
+ team_object_permission?: LiteLLMObjectPermissionTable | null;
2347
+ team_object_permission_id?: string | null;
2348
+ team_rpm_limit?: number | null;
2349
+ team_soft_budget?: number | null;
2350
+ team_spend?: number | null;
2351
+ team_tpm_limit?: number | null;
2352
+ token?: string | null;
2353
+ tpm_limit?: number | null;
2354
+ tpm_limit_per_model?: UserAPIKeyAuthTpmLimitPerModelMap | null;
2355
+ updated_at?: string | null;
2356
+ updated_by?: string | null;
2357
+ user?: unknown | null;
2358
+ user_email?: string | null;
2359
+ user_id?: string | null;
2360
+ user_max_budget?: number | null;
2361
+ user_model_max_budget?: UserAPIKeyAuthUserModelMaxBudgetMap | null;
2362
+ user_role?: LitellmUserRoles | null;
2363
+ user_rpm_limit?: number | null;
2364
+ user_spend?: number | null;
2365
+ user_tpm_limit?: number | null;
2366
+ }
2367
+ export const UserAPIKeyAuth = /*@__PURE__*/ S.suspend(() =>
2368
+ S.Struct({
2369
+ access_group_ids: S.optional(S.NullOr(UserAPIKeyAuthAccessGroupIdsList)),
2370
+ agent_id: S.optional(S.NullOr(S.String)),
2371
+ aliases: S.optional(UserAPIKeyAuthAliasesMap),
2372
+ allowed_cache_controls: S.optional(
2373
+ S.NullOr(UserAPIKeyAuthAllowedCacheControlsList),
2374
+ ),
2375
+ allowed_model_region: S.optional(
2376
+ S.NullOr(UserAPIKeyAuthAllowedModelRegion),
2377
+ ),
2378
+ allowed_routes: S.optional(S.NullOr(UserAPIKeyAuthAllowedRoutesList)),
2379
+ api_key: S.optional(S.NullOr(S.String)),
2380
+ auto_rotate: S.optional(S.NullOr(S.Boolean)),
2381
+ blocked: S.optional(S.NullOr(S.Boolean)),
2382
+ budget_duration: S.optional(S.NullOr(S.String)),
2383
+ budget_fallbacks: S.optional(UserAPIKeyAuthBudgetFallbacksMap),
2384
+ budget_id: S.optional(S.NullOr(S.String)),
2385
+ budget_limits: S.optional(S.NullOr(UserAPIKeyAuthBudgetLimitsList)),
2386
+ budget_reset_at: S.optional(S.NullOr(S.String)),
2387
+ config: S.optional(UserAPIKeyAuthConfigMap),
2388
+ created_at: S.optional(S.NullOr(S.String)),
2389
+ created_by: S.optional(S.NullOr(S.String)),
2390
+ created_by_user: S.optional(S.NullOr(S.Unknown)),
2391
+ end_user_id: S.optional(S.NullOr(S.String)),
2392
+ end_user_max_budget: S.optional(S.NullOr(S.Number)),
2393
+ end_user_model_max_budget: S.optional(
2394
+ S.NullOr(UserAPIKeyAuthEndUserModelMaxBudgetMap),
2395
+ ),
2396
+ end_user_object_permission: S.optional(
2397
+ S.NullOr(LiteLLMObjectPermissionTable),
2398
+ ),
2399
+ end_user_rpm_limit: S.optional(S.NullOr(S.Number)),
2400
+ end_user_tpm_limit: S.optional(S.NullOr(S.Number)),
2401
+ expires: S.optional(S.NullOr(S.String)),
2402
+ is_session_token: S.optional(S.Boolean),
2403
+ jwt_claims: S.optional(S.NullOr(UserAPIKeyAuthJwtClaimsMap)),
2404
+ key_alias: S.optional(S.NullOr(S.String)),
2405
+ key_name: S.optional(S.NullOr(S.String)),
2406
+ key_rotation_at: S.optional(S.NullOr(S.String)),
2407
+ key_type: S.optional(S.NullOr(S.String)),
2408
+ last_active: S.optional(S.NullOr(S.String)),
2409
+ last_refreshed_at: S.optional(S.NullOr(S.Number)),
2410
+ last_rotation_at: S.optional(S.NullOr(S.String)),
2411
+ litellm_budget_table: S.optional(
2412
+ S.NullOr(UserAPIKeyAuthLitellmBudgetTableMap),
2413
+ ),
2414
+ max_budget: S.optional(S.NullOr(S.Number)),
2415
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
2416
+ metadata: S.optional(UserAPIKeyAuthMetadataMap),
2417
+ model_max_budget: S.optional(UserAPIKeyAuthModelMaxBudgetMap),
2418
+ model_spend: S.optional(UserAPIKeyAuthModelSpendMap),
2419
+ models: S.optional(UserAPIKeyAuthModelsList),
2420
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionTable)),
2421
+ object_permission_id: S.optional(S.NullOr(S.String)),
2422
+ org_id: S.optional(S.NullOr(S.String)),
2423
+ organization_alias: S.optional(S.NullOr(S.String)),
2424
+ organization_max_budget: S.optional(S.NullOr(S.Number)),
2425
+ organization_metadata: S.optional(
2426
+ S.NullOr(UserAPIKeyAuthOrganizationMetadataMap),
2427
+ ),
2428
+ organization_rpm_limit: S.optional(S.NullOr(S.Number)),
2429
+ organization_tpm_limit: S.optional(S.NullOr(S.Number)),
2430
+ parent_otel_span: S.optional(S.NullOr(S.Unknown)),
2431
+ permissions: S.optional(UserAPIKeyAuthPermissionsMap),
2432
+ project_alias: S.optional(S.NullOr(S.String)),
2433
+ project_id: S.optional(S.NullOr(S.String)),
2434
+ project_metadata: S.optional(S.NullOr(UserAPIKeyAuthProjectMetadataMap)),
2435
+ request_route: S.optional(S.NullOr(S.String)),
2436
+ rotation_count: S.optional(S.NullOr(S.Number)),
2437
+ rotation_interval: S.optional(S.NullOr(S.String)),
2438
+ router_settings: S.optional(S.NullOr(UserAPIKeyAuthRouterSettingsMap)),
2439
+ rpm_limit: S.optional(S.NullOr(S.Number)),
2440
+ rpm_limit_per_model: S.optional(
2441
+ S.NullOr(UserAPIKeyAuthRpmLimitPerModelMap),
2442
+ ),
2443
+ settings_updated_at: S.optional(S.NullOr(S.String)),
2444
+ soft_budget: S.optional(S.NullOr(S.Number)),
2445
+ soft_budget_cooldown: S.optional(S.Boolean),
2446
+ spend: S.optional(S.Number),
2447
+ team_alias: S.optional(S.NullOr(S.String)),
2448
+ team_blocked: S.optional(S.Boolean),
2449
+ team_id: S.optional(S.NullOr(S.String)),
2450
+ team_max_budget: S.optional(S.NullOr(S.Number)),
2451
+ team_member: S.optional(S.NullOr(Member)),
2452
+ team_member_rpm_limit: S.optional(S.NullOr(S.Number)),
2453
+ team_member_spend: S.optional(S.NullOr(S.Number)),
2454
+ team_member_tpm_limit: S.optional(S.NullOr(S.Number)),
2455
+ team_metadata: S.optional(S.NullOr(UserAPIKeyAuthTeamMetadataMap)),
2456
+ team_model_aliases: S.optional(S.NullOr(UserAPIKeyAuthTeamModelAliasesMap)),
2457
+ team_models: S.optional(UserAPIKeyAuthTeamModelsList),
2458
+ team_object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionTable)),
2459
+ team_object_permission_id: S.optional(S.NullOr(S.String)),
2460
+ team_rpm_limit: S.optional(S.NullOr(S.Number)),
2461
+ team_soft_budget: S.optional(S.NullOr(S.Number)),
2462
+ team_spend: S.optional(S.NullOr(S.Number)),
2463
+ team_tpm_limit: S.optional(S.NullOr(S.Number)),
2464
+ token: S.optional(S.NullOr(S.String)),
2465
+ tpm_limit: S.optional(S.NullOr(S.Number)),
2466
+ tpm_limit_per_model: S.optional(
2467
+ S.NullOr(UserAPIKeyAuthTpmLimitPerModelMap),
2468
+ ),
2469
+ updated_at: S.optional(S.NullOr(S.String)),
2470
+ updated_by: S.optional(S.NullOr(S.String)),
2471
+ user: S.optional(S.NullOr(S.Unknown)),
2472
+ user_email: S.optional(S.NullOr(S.String)),
2473
+ user_id: S.optional(S.NullOr(S.String)),
2474
+ user_max_budget: S.optional(S.NullOr(S.Number)),
2475
+ user_model_max_budget: S.optional(
2476
+ S.NullOr(UserAPIKeyAuthUserModelMaxBudgetMap),
2477
+ ),
2478
+ user_role: S.optional(S.NullOr(LitellmUserRoles)),
2479
+ user_rpm_limit: S.optional(S.NullOr(S.Number)),
2480
+ user_spend: S.optional(S.NullOr(S.Number)),
2481
+ user_tpm_limit: S.optional(S.NullOr(S.Number)),
2482
+ }),
2483
+ ).annotate({ identifier: "UserAPIKeyAuth" }) as any as S.Schema<UserAPIKeyAuth>;
2484
+
2485
+ export type LiteLLMDeletedVerificationTokenAccessGroupIdsList = Array<string>;
2486
+ export const LiteLLMDeletedVerificationTokenAccessGroupIdsList =
2487
+ /*@__PURE__*/ S.Array(
2488
+ S.String,
2489
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenAccessGroupIdsList>;
2490
+
2491
+ export type LiteLLMDeletedVerificationTokenAliasesMap = {
2492
+ [key: string]: unknown | undefined;
2493
+ };
2494
+ export const LiteLLMDeletedVerificationTokenAliasesMap = /*@__PURE__*/ S.Record(
2495
+ S.String,
2496
+ S.Unknown,
2497
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenAliasesMap>;
2498
+
2499
+ export type LiteLLMDeletedVerificationTokenAllowedCacheControlsList =
2500
+ Array<unknown>;
2501
+ export const LiteLLMDeletedVerificationTokenAllowedCacheControlsList =
2502
+ /*@__PURE__*/ S.Array(
2503
+ S.Unknown,
2504
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenAllowedCacheControlsList>;
2505
+
2506
+ export type LiteLLMDeletedVerificationTokenAllowedRoutesList = Array<unknown>;
2507
+ export const LiteLLMDeletedVerificationTokenAllowedRoutesList =
2508
+ /*@__PURE__*/ S.Array(
2509
+ S.Unknown,
2510
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenAllowedRoutesList>;
2511
+
2512
+ export type LiteLLMDeletedVerificationTokenBudgetFallbacksValueList =
2513
+ Array<string>;
2514
+ export const LiteLLMDeletedVerificationTokenBudgetFallbacksValueList =
2515
+ /*@__PURE__*/ S.Array(
2516
+ S.String,
2517
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenBudgetFallbacksValueList>;
2518
+
2519
+ export type LiteLLMDeletedVerificationTokenBudgetFallbacksMap = {
2520
+ [key: string]:
2521
+ | LiteLLMDeletedVerificationTokenBudgetFallbacksValueList
2522
+ | undefined;
2523
+ };
2524
+ export const LiteLLMDeletedVerificationTokenBudgetFallbacksMap =
2525
+ /*@__PURE__*/ S.Record(
2526
+ S.String,
2527
+ LiteLLMDeletedVerificationTokenBudgetFallbacksValueList,
2528
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenBudgetFallbacksMap>;
2529
+
2530
+ export type LiteLLMDeletedVerificationTokenBudgetLimitsItemMap = {
2531
+ [key: string]: unknown | undefined;
2532
+ };
2533
+ export const LiteLLMDeletedVerificationTokenBudgetLimitsItemMap =
2534
+ /*@__PURE__*/ S.Record(
2535
+ S.String,
2536
+ S.Unknown,
2537
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenBudgetLimitsItemMap>;
2538
+
2539
+ export type LiteLLMDeletedVerificationTokenBudgetLimitsList =
2540
+ Array<LiteLLMDeletedVerificationTokenBudgetLimitsItemMap>;
2541
+ export const LiteLLMDeletedVerificationTokenBudgetLimitsList =
2542
+ /*@__PURE__*/ S.Array(
2543
+ LiteLLMDeletedVerificationTokenBudgetLimitsItemMap,
2544
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenBudgetLimitsList>;
2545
+
2546
+ export type LiteLLMDeletedVerificationTokenConfigMap = {
2547
+ [key: string]: unknown | undefined;
2548
+ };
2549
+ export const LiteLLMDeletedVerificationTokenConfigMap = /*@__PURE__*/ S.Record(
2550
+ S.String,
2551
+ S.Unknown,
2552
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenConfigMap>;
2553
+
2554
+ export type LiteLLMDeletedVerificationTokenLitellmBudgetTableMap = {
2555
+ [key: string]: unknown | undefined;
2556
+ };
2557
+ export const LiteLLMDeletedVerificationTokenLitellmBudgetTableMap =
2558
+ /*@__PURE__*/ S.Record(
2559
+ S.String,
2560
+ S.Unknown,
2561
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenLitellmBudgetTableMap>;
2562
+
2563
+ export type LiteLLMDeletedVerificationTokenMetadataMap = {
2564
+ [key: string]: unknown | undefined;
2565
+ };
2566
+ export const LiteLLMDeletedVerificationTokenMetadataMap =
2567
+ /*@__PURE__*/ S.Record(
2568
+ S.String,
2569
+ S.Unknown,
2570
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenMetadataMap>;
2571
+
2572
+ export type LiteLLMDeletedVerificationTokenModelMaxBudgetMap = {
2573
+ [key: string]: unknown | undefined;
2574
+ };
2575
+ export const LiteLLMDeletedVerificationTokenModelMaxBudgetMap =
2576
+ /*@__PURE__*/ S.Record(
2577
+ S.String,
2578
+ S.Unknown,
2579
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenModelMaxBudgetMap>;
2580
+
2581
+ export type LiteLLMDeletedVerificationTokenModelSpendMap = {
2582
+ [key: string]: unknown | undefined;
2583
+ };
2584
+ export const LiteLLMDeletedVerificationTokenModelSpendMap =
2585
+ /*@__PURE__*/ S.Record(
2586
+ S.String,
2587
+ S.Unknown,
2588
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenModelSpendMap>;
2589
+
2590
+ export type LiteLLMDeletedVerificationTokenModelsList = Array<unknown>;
2591
+ export const LiteLLMDeletedVerificationTokenModelsList = /*@__PURE__*/ S.Array(
2592
+ S.Unknown,
2593
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenModelsList>;
2594
+
2595
+ export type LiteLLMDeletedVerificationTokenPermissionsMap = {
2596
+ [key: string]: unknown | undefined;
2597
+ };
2598
+ export const LiteLLMDeletedVerificationTokenPermissionsMap =
2599
+ /*@__PURE__*/ S.Record(
2600
+ S.String,
2601
+ S.Unknown,
2602
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenPermissionsMap>;
2603
+
2604
+ export type LiteLLMDeletedVerificationTokenRouterSettingsMap = {
2605
+ [key: string]: unknown | undefined;
2606
+ };
2607
+ export const LiteLLMDeletedVerificationTokenRouterSettingsMap =
2608
+ /*@__PURE__*/ S.Record(
2609
+ S.String,
2610
+ S.Unknown,
2611
+ ) as any as S.Schema<LiteLLMDeletedVerificationTokenRouterSettingsMap>;
2612
+
2613
+ /** Audit record for deleted keys; mirrors the token plus deletion metadata. */
2614
+ export interface LiteLLMDeletedVerificationToken {
2615
+ access_group_ids?: LiteLLMDeletedVerificationTokenAccessGroupIdsList | null;
2616
+ agent_id?: string | null;
2617
+ aliases?: LiteLLMDeletedVerificationTokenAliasesMap;
2618
+ allowed_cache_controls?: LiteLLMDeletedVerificationTokenAllowedCacheControlsList | null;
2619
+ allowed_routes?: LiteLLMDeletedVerificationTokenAllowedRoutesList | null;
2620
+ auto_rotate?: boolean | null;
2621
+ blocked?: boolean | null;
2622
+ budget_duration?: string | null;
2623
+ budget_fallbacks?: LiteLLMDeletedVerificationTokenBudgetFallbacksMap;
2624
+ budget_id?: string | null;
2625
+ budget_limits?: LiteLLMDeletedVerificationTokenBudgetLimitsList | null;
2626
+ budget_reset_at?: string | null;
2627
+ config?: LiteLLMDeletedVerificationTokenConfigMap;
2628
+ created_at?: string | null;
2629
+ created_by?: string | null;
2630
+ deleted_at?: string | null;
2631
+ deleted_by?: string | null;
2632
+ deleted_by_api_key?: string | null;
2633
+ expires?: string | null;
2634
+ id?: string | null;
2635
+ key_alias?: string | null;
2636
+ key_name?: string | null;
2637
+ key_rotation_at?: string | null;
2638
+ key_type?: string | null;
2639
+ last_active?: string | null;
2640
+ last_rotation_at?: string | null;
2641
+ litellm_budget_table?: LiteLLMDeletedVerificationTokenLitellmBudgetTableMap | null;
2642
+ litellm_changed_by?: string | null;
2643
+ max_budget?: number | null;
2644
+ max_parallel_requests?: number | null;
2645
+ metadata?: LiteLLMDeletedVerificationTokenMetadataMap;
2646
+ model_max_budget?: LiteLLMDeletedVerificationTokenModelMaxBudgetMap;
2647
+ model_spend?: LiteLLMDeletedVerificationTokenModelSpendMap;
2648
+ models?: LiteLLMDeletedVerificationTokenModelsList;
2649
+ object_permission?: LiteLLMObjectPermissionTable | null;
2650
+ object_permission_id?: string | null;
2651
+ org_id?: string | null;
2652
+ permissions?: LiteLLMDeletedVerificationTokenPermissionsMap;
2653
+ project_id?: string | null;
2654
+ rotation_count?: number | null;
2655
+ rotation_interval?: string | null;
2656
+ router_settings?: LiteLLMDeletedVerificationTokenRouterSettingsMap | null;
2657
+ rpm_limit?: number | null;
2658
+ settings_updated_at?: string | null;
2659
+ soft_budget_cooldown?: boolean;
2660
+ spend?: number;
2661
+ team_id?: string | null;
2662
+ token?: string | null;
2663
+ tpm_limit?: number | null;
2664
+ updated_at?: string | null;
2665
+ updated_by?: string | null;
2666
+ user_id?: string | null;
2667
+ }
2668
+ export const LiteLLMDeletedVerificationToken = /*@__PURE__*/ S.suspend(() =>
2669
+ S.Struct({
2670
+ access_group_ids: S.optional(
2671
+ S.NullOr(LiteLLMDeletedVerificationTokenAccessGroupIdsList),
2672
+ ),
2673
+ agent_id: S.optional(S.NullOr(S.String)),
2674
+ aliases: S.optional(LiteLLMDeletedVerificationTokenAliasesMap),
2675
+ allowed_cache_controls: S.optional(
2676
+ S.NullOr(LiteLLMDeletedVerificationTokenAllowedCacheControlsList),
2677
+ ),
2678
+ allowed_routes: S.optional(
2679
+ S.NullOr(LiteLLMDeletedVerificationTokenAllowedRoutesList),
2680
+ ),
2681
+ auto_rotate: S.optional(S.NullOr(S.Boolean)),
2682
+ blocked: S.optional(S.NullOr(S.Boolean)),
2683
+ budget_duration: S.optional(S.NullOr(S.String)),
2684
+ budget_fallbacks: S.optional(
2685
+ LiteLLMDeletedVerificationTokenBudgetFallbacksMap,
2686
+ ),
2687
+ budget_id: S.optional(S.NullOr(S.String)),
2688
+ budget_limits: S.optional(
2689
+ S.NullOr(LiteLLMDeletedVerificationTokenBudgetLimitsList),
2690
+ ),
2691
+ budget_reset_at: S.optional(S.NullOr(S.String)),
2692
+ config: S.optional(LiteLLMDeletedVerificationTokenConfigMap),
2693
+ created_at: S.optional(S.NullOr(S.String)),
2694
+ created_by: S.optional(S.NullOr(S.String)),
2695
+ deleted_at: S.optional(S.NullOr(S.String)),
2696
+ deleted_by: S.optional(S.NullOr(S.String)),
2697
+ deleted_by_api_key: S.optional(S.NullOr(S.String)),
2698
+ expires: S.optional(S.NullOr(S.String)),
2699
+ id: S.optional(S.NullOr(S.String)),
2700
+ key_alias: S.optional(S.NullOr(S.String)),
2701
+ key_name: S.optional(S.NullOr(S.String)),
2702
+ key_rotation_at: S.optional(S.NullOr(S.String)),
2703
+ key_type: S.optional(S.NullOr(S.String)),
2704
+ last_active: S.optional(S.NullOr(S.String)),
2705
+ last_rotation_at: S.optional(S.NullOr(S.String)),
2706
+ litellm_budget_table: S.optional(
2707
+ S.NullOr(LiteLLMDeletedVerificationTokenLitellmBudgetTableMap),
2708
+ ),
2709
+ litellm_changed_by: S.optional(S.NullOr(S.String)),
2710
+ max_budget: S.optional(S.NullOr(S.Number)),
2711
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
2712
+ metadata: S.optional(LiteLLMDeletedVerificationTokenMetadataMap),
2713
+ model_max_budget: S.optional(
2714
+ LiteLLMDeletedVerificationTokenModelMaxBudgetMap,
2715
+ ),
2716
+ model_spend: S.optional(LiteLLMDeletedVerificationTokenModelSpendMap),
2717
+ models: S.optional(LiteLLMDeletedVerificationTokenModelsList),
2718
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionTable)),
2719
+ object_permission_id: S.optional(S.NullOr(S.String)),
2720
+ org_id: S.optional(S.NullOr(S.String)),
2721
+ permissions: S.optional(LiteLLMDeletedVerificationTokenPermissionsMap),
2722
+ project_id: S.optional(S.NullOr(S.String)),
2723
+ rotation_count: S.optional(S.NullOr(S.Number)),
2724
+ rotation_interval: S.optional(S.NullOr(S.String)),
2725
+ router_settings: S.optional(
2726
+ S.NullOr(LiteLLMDeletedVerificationTokenRouterSettingsMap),
2727
+ ),
2728
+ rpm_limit: S.optional(S.NullOr(S.Number)),
2729
+ settings_updated_at: S.optional(S.NullOr(S.String)),
2730
+ soft_budget_cooldown: S.optional(S.Boolean),
2731
+ spend: S.optional(S.Number),
2732
+ team_id: S.optional(S.NullOr(S.String)),
2733
+ token: S.optional(S.NullOr(S.String)),
2734
+ tpm_limit: S.optional(S.NullOr(S.Number)),
2735
+ updated_at: S.optional(S.NullOr(S.String)),
2736
+ updated_by: S.optional(S.NullOr(S.String)),
2737
+ user_id: S.optional(S.NullOr(S.String)),
2738
+ }),
2739
+ ).annotate({
2740
+ identifier: "LiteLLMDeletedVerificationToken",
2741
+ }) as any as S.Schema<LiteLLMDeletedVerificationToken>;
2742
+
2743
+ export type KeyListResponseObjectKeysItem =
2744
+ | string
2745
+ | UserAPIKeyAuth
2746
+ | LiteLLMDeletedVerificationToken;
2747
+ export const KeyListResponseObjectKeysItem =
2748
+ S.Unknown as any as S.Schema<KeyListResponseObjectKeysItem>;
2749
+
2750
+ export type KeyListResponseObjectKeysList =
2751
+ Array<KeyListResponseObjectKeysItem>;
2752
+ export const KeyListResponseObjectKeysList = /*@__PURE__*/ S.Array(
2753
+ KeyListResponseObjectKeysItem,
2754
+ ) as any as S.Schema<KeyListResponseObjectKeysList>;
2755
+
2756
+ export interface KeyListResponseObject {
2757
+ current_page?: number | null;
2758
+ keys?: KeyListResponseObjectKeysList;
2759
+ total_count?: number | null;
2760
+ total_pages?: number | null;
2761
+ }
2762
+ export const KeyListResponseObject = /*@__PURE__*/ S.suspend(() =>
2763
+ S.Struct({
2764
+ current_page: S.optional(S.NullOr(S.Number)),
2765
+ keys: S.optional(KeyListResponseObjectKeysList),
2766
+ total_count: S.optional(S.NullOr(S.Number)),
2767
+ total_pages: S.optional(S.NullOr(S.Number)),
2768
+ }),
2769
+ ).annotate({
2770
+ identifier: "KeyListResponseObject",
2771
+ }) as any as S.Schema<KeyListResponseObject>;
2772
+
2773
+ export interface PostBlockKeyKeyBlockRequest {
2774
+ key: string;
2775
+ }
2776
+ export const PostBlockKeyKeyBlockRequest = /*@__PURE__*/ S.suspend(() =>
2777
+ S.Struct({
2778
+ key: S.String,
2779
+ }).pipe(T.Http({ method: "POST", uri: "/key/block", code: 200 })),
2780
+ ).annotate({
2781
+ identifier: "PostBlockKeyKeyBlockRequest",
2782
+ }) as any as S.Schema<PostBlockKeyKeyBlockRequest>;
2783
+
2784
+ export type LiteLLMVerificationTokenAccessGroupIdsList = Array<string>;
2785
+ export const LiteLLMVerificationTokenAccessGroupIdsList = /*@__PURE__*/ S.Array(
2786
+ S.String,
2787
+ ) as any as S.Schema<LiteLLMVerificationTokenAccessGroupIdsList>;
2788
+
2789
+ export type LiteLLMVerificationTokenAliasesMap = {
2790
+ [key: string]: unknown | undefined;
2791
+ };
2792
+ export const LiteLLMVerificationTokenAliasesMap = /*@__PURE__*/ S.Record(
2793
+ S.String,
2794
+ S.Unknown,
2795
+ ) as any as S.Schema<LiteLLMVerificationTokenAliasesMap>;
2796
+
2797
+ export type LiteLLMVerificationTokenAllowedCacheControlsList = Array<unknown>;
2798
+ export const LiteLLMVerificationTokenAllowedCacheControlsList =
2799
+ /*@__PURE__*/ S.Array(
2800
+ S.Unknown,
2801
+ ) as any as S.Schema<LiteLLMVerificationTokenAllowedCacheControlsList>;
2802
+
2803
+ export type LiteLLMVerificationTokenAllowedRoutesList = Array<unknown>;
2804
+ export const LiteLLMVerificationTokenAllowedRoutesList = /*@__PURE__*/ S.Array(
2805
+ S.Unknown,
2806
+ ) as any as S.Schema<LiteLLMVerificationTokenAllowedRoutesList>;
2807
+
2808
+ export type LiteLLMVerificationTokenBudgetFallbacksValueList = Array<string>;
2809
+ export const LiteLLMVerificationTokenBudgetFallbacksValueList =
2810
+ /*@__PURE__*/ S.Array(
2811
+ S.String,
2812
+ ) as any as S.Schema<LiteLLMVerificationTokenBudgetFallbacksValueList>;
2813
+
2814
+ export type LiteLLMVerificationTokenBudgetFallbacksMap = {
2815
+ [key: string]: LiteLLMVerificationTokenBudgetFallbacksValueList | undefined;
2816
+ };
2817
+ export const LiteLLMVerificationTokenBudgetFallbacksMap =
2818
+ /*@__PURE__*/ S.Record(
2819
+ S.String,
2820
+ LiteLLMVerificationTokenBudgetFallbacksValueList,
2821
+ ) as any as S.Schema<LiteLLMVerificationTokenBudgetFallbacksMap>;
2822
+
2823
+ export type LiteLLMVerificationTokenBudgetLimitsItemMap = {
2824
+ [key: string]: unknown | undefined;
2825
+ };
2826
+ export const LiteLLMVerificationTokenBudgetLimitsItemMap =
2827
+ /*@__PURE__*/ S.Record(
2828
+ S.String,
2829
+ S.Unknown,
2830
+ ) as any as S.Schema<LiteLLMVerificationTokenBudgetLimitsItemMap>;
2831
+
2832
+ export type LiteLLMVerificationTokenBudgetLimitsList =
2833
+ Array<LiteLLMVerificationTokenBudgetLimitsItemMap>;
2834
+ export const LiteLLMVerificationTokenBudgetLimitsList = /*@__PURE__*/ S.Array(
2835
+ LiteLLMVerificationTokenBudgetLimitsItemMap,
2836
+ ) as any as S.Schema<LiteLLMVerificationTokenBudgetLimitsList>;
2837
+
2838
+ export type LiteLLMVerificationTokenConfigMap = {
2839
+ [key: string]: unknown | undefined;
2840
+ };
2841
+ export const LiteLLMVerificationTokenConfigMap = /*@__PURE__*/ S.Record(
2842
+ S.String,
2843
+ S.Unknown,
2844
+ ) as any as S.Schema<LiteLLMVerificationTokenConfigMap>;
2845
+
2846
+ export type LiteLLMVerificationTokenLitellmBudgetTableMap = {
2847
+ [key: string]: unknown | undefined;
2848
+ };
2849
+ export const LiteLLMVerificationTokenLitellmBudgetTableMap =
2850
+ /*@__PURE__*/ S.Record(
2851
+ S.String,
2852
+ S.Unknown,
2853
+ ) as any as S.Schema<LiteLLMVerificationTokenLitellmBudgetTableMap>;
2854
+
2855
+ export type LiteLLMVerificationTokenMetadataMap = {
2856
+ [key: string]: unknown | undefined;
2857
+ };
2858
+ export const LiteLLMVerificationTokenMetadataMap = /*@__PURE__*/ S.Record(
2859
+ S.String,
2860
+ S.Unknown,
2861
+ ) as any as S.Schema<LiteLLMVerificationTokenMetadataMap>;
2862
+
2863
+ export type LiteLLMVerificationTokenModelMaxBudgetMap = {
2864
+ [key: string]: unknown | undefined;
2865
+ };
2866
+ export const LiteLLMVerificationTokenModelMaxBudgetMap = /*@__PURE__*/ S.Record(
2867
+ S.String,
2868
+ S.Unknown,
2869
+ ) as any as S.Schema<LiteLLMVerificationTokenModelMaxBudgetMap>;
2870
+
2871
+ export type LiteLLMVerificationTokenModelSpendMap = {
2872
+ [key: string]: unknown | undefined;
2873
+ };
2874
+ export const LiteLLMVerificationTokenModelSpendMap = /*@__PURE__*/ S.Record(
2875
+ S.String,
2876
+ S.Unknown,
2877
+ ) as any as S.Schema<LiteLLMVerificationTokenModelSpendMap>;
2878
+
2879
+ export type LiteLLMVerificationTokenModelsList = Array<unknown>;
2880
+ export const LiteLLMVerificationTokenModelsList = /*@__PURE__*/ S.Array(
2881
+ S.Unknown,
2882
+ ) as any as S.Schema<LiteLLMVerificationTokenModelsList>;
2883
+
2884
+ export type LiteLLMVerificationTokenPermissionsMap = {
2885
+ [key: string]: unknown | undefined;
2886
+ };
2887
+ export const LiteLLMVerificationTokenPermissionsMap = /*@__PURE__*/ S.Record(
2888
+ S.String,
2889
+ S.Unknown,
2890
+ ) as any as S.Schema<LiteLLMVerificationTokenPermissionsMap>;
2891
+
2892
+ export type LiteLLMVerificationTokenRouterSettingsMap = {
2893
+ [key: string]: unknown | undefined;
2894
+ };
2895
+ export const LiteLLMVerificationTokenRouterSettingsMap = /*@__PURE__*/ S.Record(
2896
+ S.String,
2897
+ S.Unknown,
2898
+ ) as any as S.Schema<LiteLLMVerificationTokenRouterSettingsMap>;
2899
+
2900
+ export interface LiteLLMVerificationToken {
2901
+ access_group_ids?: LiteLLMVerificationTokenAccessGroupIdsList | null;
2902
+ agent_id?: string | null;
2903
+ aliases?: LiteLLMVerificationTokenAliasesMap;
2904
+ allowed_cache_controls?: LiteLLMVerificationTokenAllowedCacheControlsList | null;
2905
+ allowed_routes?: LiteLLMVerificationTokenAllowedRoutesList | null;
2906
+ auto_rotate?: boolean | null;
2907
+ blocked?: boolean | null;
2908
+ budget_duration?: string | null;
2909
+ budget_fallbacks?: LiteLLMVerificationTokenBudgetFallbacksMap;
2910
+ budget_id?: string | null;
2911
+ budget_limits?: LiteLLMVerificationTokenBudgetLimitsList | null;
2912
+ budget_reset_at?: string | null;
2913
+ config?: LiteLLMVerificationTokenConfigMap;
2914
+ created_at?: string | null;
2915
+ created_by?: string | null;
2916
+ expires?: string | null;
2917
+ key_alias?: string | null;
2918
+ key_name?: string | null;
2919
+ key_rotation_at?: string | null;
2920
+ key_type?: string | null;
2921
+ last_active?: string | null;
2922
+ last_rotation_at?: string | null;
2923
+ litellm_budget_table?: LiteLLMVerificationTokenLitellmBudgetTableMap | null;
2924
+ max_budget?: number | null;
2925
+ max_parallel_requests?: number | null;
2926
+ metadata?: LiteLLMVerificationTokenMetadataMap;
2927
+ model_max_budget?: LiteLLMVerificationTokenModelMaxBudgetMap;
2928
+ model_spend?: LiteLLMVerificationTokenModelSpendMap;
2929
+ models?: LiteLLMVerificationTokenModelsList;
2930
+ object_permission?: LiteLLMObjectPermissionTable | null;
2931
+ object_permission_id?: string | null;
2932
+ org_id?: string | null;
2933
+ permissions?: LiteLLMVerificationTokenPermissionsMap;
2934
+ project_id?: string | null;
2935
+ rotation_count?: number | null;
2936
+ rotation_interval?: string | null;
2937
+ router_settings?: LiteLLMVerificationTokenRouterSettingsMap | null;
2938
+ rpm_limit?: number | null;
2939
+ settings_updated_at?: string | null;
2940
+ soft_budget_cooldown?: boolean;
2941
+ spend?: number;
2942
+ team_id?: string | null;
2943
+ token?: string | null;
2944
+ tpm_limit?: number | null;
2945
+ updated_at?: string | null;
2946
+ updated_by?: string | null;
2947
+ user_id?: string | null;
2948
+ }
2949
+ export const LiteLLMVerificationToken = /*@__PURE__*/ S.suspend(() =>
2950
+ S.Struct({
2951
+ access_group_ids: S.optional(
2952
+ S.NullOr(LiteLLMVerificationTokenAccessGroupIdsList),
2953
+ ),
2954
+ agent_id: S.optional(S.NullOr(S.String)),
2955
+ aliases: S.optional(LiteLLMVerificationTokenAliasesMap),
2956
+ allowed_cache_controls: S.optional(
2957
+ S.NullOr(LiteLLMVerificationTokenAllowedCacheControlsList),
2958
+ ),
2959
+ allowed_routes: S.optional(
2960
+ S.NullOr(LiteLLMVerificationTokenAllowedRoutesList),
2961
+ ),
2962
+ auto_rotate: S.optional(S.NullOr(S.Boolean)),
2963
+ blocked: S.optional(S.NullOr(S.Boolean)),
2964
+ budget_duration: S.optional(S.NullOr(S.String)),
2965
+ budget_fallbacks: S.optional(LiteLLMVerificationTokenBudgetFallbacksMap),
2966
+ budget_id: S.optional(S.NullOr(S.String)),
2967
+ budget_limits: S.optional(
2968
+ S.NullOr(LiteLLMVerificationTokenBudgetLimitsList),
2969
+ ),
2970
+ budget_reset_at: S.optional(S.NullOr(S.String)),
2971
+ config: S.optional(LiteLLMVerificationTokenConfigMap),
2972
+ created_at: S.optional(S.NullOr(S.String)),
2973
+ created_by: S.optional(S.NullOr(S.String)),
2974
+ expires: S.optional(S.NullOr(S.String)),
2975
+ key_alias: S.optional(S.NullOr(S.String)),
2976
+ key_name: S.optional(S.NullOr(S.String)),
2977
+ key_rotation_at: S.optional(S.NullOr(S.String)),
2978
+ key_type: S.optional(S.NullOr(S.String)),
2979
+ last_active: S.optional(S.NullOr(S.String)),
2980
+ last_rotation_at: S.optional(S.NullOr(S.String)),
2981
+ litellm_budget_table: S.optional(
2982
+ S.NullOr(LiteLLMVerificationTokenLitellmBudgetTableMap),
2983
+ ),
2984
+ max_budget: S.optional(S.NullOr(S.Number)),
2985
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
2986
+ metadata: S.optional(LiteLLMVerificationTokenMetadataMap),
2987
+ model_max_budget: S.optional(LiteLLMVerificationTokenModelMaxBudgetMap),
2988
+ model_spend: S.optional(LiteLLMVerificationTokenModelSpendMap),
2989
+ models: S.optional(LiteLLMVerificationTokenModelsList),
2990
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionTable)),
2991
+ object_permission_id: S.optional(S.NullOr(S.String)),
2992
+ org_id: S.optional(S.NullOr(S.String)),
2993
+ permissions: S.optional(LiteLLMVerificationTokenPermissionsMap),
2994
+ project_id: S.optional(S.NullOr(S.String)),
2995
+ rotation_count: S.optional(S.NullOr(S.Number)),
2996
+ rotation_interval: S.optional(S.NullOr(S.String)),
2997
+ router_settings: S.optional(
2998
+ S.NullOr(LiteLLMVerificationTokenRouterSettingsMap),
2999
+ ),
3000
+ rpm_limit: S.optional(S.NullOr(S.Number)),
3001
+ settings_updated_at: S.optional(S.NullOr(S.String)),
3002
+ soft_budget_cooldown: S.optional(S.Boolean),
3003
+ spend: S.optional(S.Number),
3004
+ team_id: S.optional(S.NullOr(S.String)),
3005
+ token: S.optional(S.NullOr(S.String)),
3006
+ tpm_limit: S.optional(S.NullOr(S.Number)),
3007
+ updated_at: S.optional(S.NullOr(S.String)),
3008
+ updated_by: S.optional(S.NullOr(S.String)),
3009
+ user_id: S.optional(S.NullOr(S.String)),
3010
+ }),
3011
+ ).annotate({
3012
+ identifier: "LiteLLMVerificationToken",
3013
+ }) as any as S.Schema<LiteLLMVerificationToken>;
3014
+
3015
+ export interface PostBlockKeyKeyBlockResponse {
3016
+ body: LiteLLMVerificationToken | null;
3017
+ }
3018
+ export const PostBlockKeyKeyBlockResponse = /*@__PURE__*/ S.suspend(() =>
3019
+ S.Struct({
3020
+ body: S.NullOr(LiteLLMVerificationToken),
3021
+ }),
3022
+ ).annotate({
3023
+ identifier: "PostBlockKeyKeyBlockResponse",
3024
+ }) as any as S.Schema<PostBlockKeyKeyBlockResponse>;
3025
+
3026
+ export type KeyRequestKeyAliasesList = Array<string>;
3027
+ export const KeyRequestKeyAliasesList = /*@__PURE__*/ S.Array(
3028
+ S.String,
3029
+ ) as any as S.Schema<KeyRequestKeyAliasesList>;
3030
+
3031
+ export type KeyRequestKeysList = Array<string>;
3032
+ export const KeyRequestKeysList = /*@__PURE__*/ S.Array(
3033
+ S.String,
3034
+ ) as any as S.Schema<KeyRequestKeysList>;
3035
+
3036
+ export interface KeyRequest {
3037
+ key_aliases?: KeyRequestKeyAliasesList | null;
3038
+ keys?: KeyRequestKeysList | null;
3039
+ }
3040
+ export const KeyRequest = /*@__PURE__*/ S.suspend(() =>
3041
+ S.Struct({
3042
+ key_aliases: S.optional(S.NullOr(KeyRequestKeyAliasesList)),
3043
+ keys: S.optional(S.NullOr(KeyRequestKeysList)),
3044
+ }),
3045
+ ).annotate({ identifier: "KeyRequest" }) as any as S.Schema<KeyRequest>;
3046
+
3047
+ export interface PostInfoKeyFnV2V2KeyInfoRequest {
3048
+ body?: KeyRequest | null;
3049
+ }
3050
+ export const PostInfoKeyFnV2V2KeyInfoRequest = /*@__PURE__*/ S.suspend(() =>
3051
+ S.Struct({
3052
+ body: S.optional(S.NullOr(KeyRequest).pipe(T.HttpBody())),
3053
+ }).pipe(T.Http({ method: "POST", uri: "/v2/key/info", code: 200 })),
3054
+ ).annotate({
3055
+ identifier: "PostInfoKeyFnV2V2KeyInfoRequest",
3056
+ }) as any as S.Schema<PostInfoKeyFnV2V2KeyInfoRequest>;
3057
+
3058
+ export interface PostInfoKeyFnV2V2KeyInfoResponse {
3059
+ body: unknown;
3060
+ }
3061
+ export const PostInfoKeyFnV2V2KeyInfoResponse = /*@__PURE__*/ S.suspend(() =>
3062
+ S.Struct({
3063
+ body: S.Unknown,
3064
+ }),
3065
+ ).annotate({
3066
+ identifier: "PostInfoKeyFnV2V2KeyInfoResponse",
3067
+ }) as any as S.Schema<PostInfoKeyFnV2V2KeyInfoResponse>;
3068
+
3069
+ export interface PostKeyHealthKeyHealthRequest {}
3070
+ export const PostKeyHealthKeyHealthRequest = /*@__PURE__*/ S.suspend(() =>
3071
+ S.Struct({}).pipe(T.Http({ method: "POST", uri: "/key/health", code: 200 })),
3072
+ ).annotate({
3073
+ identifier: "PostKeyHealthKeyHealthRequest",
3074
+ }) as any as S.Schema<PostKeyHealthKeyHealthRequest>;
3075
+
3076
+ export type KeyHealthResponseKey = "healthy" | "unhealthy";
3077
+ export const KeyHealthResponseKey = S.String;
3078
+
3079
+ export type LoggingCallbackStatusCallbacksList = Array<string>;
3080
+ export const LoggingCallbackStatusCallbacksList = /*@__PURE__*/ S.Array(
3081
+ S.String,
3082
+ ) as any as S.Schema<LoggingCallbackStatusCallbacksList>;
3083
+
3084
+ export type LoggingCallbackStatusStatus = "healthy" | "unhealthy";
3085
+ export const LoggingCallbackStatusStatus = S.String;
3086
+
3087
+ export interface LoggingCallbackStatus {
3088
+ callbacks?: LoggingCallbackStatusCallbacksList;
3089
+ details?: string | null;
3090
+ status?: LoggingCallbackStatusStatus;
3091
+ }
3092
+ export const LoggingCallbackStatus = /*@__PURE__*/ S.suspend(() =>
3093
+ S.Struct({
3094
+ callbacks: S.optional(LoggingCallbackStatusCallbacksList),
3095
+ details: S.optional(S.NullOr(S.String)),
3096
+ status: S.optional(LoggingCallbackStatusStatus),
3097
+ }),
3098
+ ).annotate({
3099
+ identifier: "LoggingCallbackStatus",
3100
+ }) as any as S.Schema<LoggingCallbackStatus>;
3101
+
3102
+ export interface KeyHealthResponse {
3103
+ key?: KeyHealthResponseKey;
3104
+ logging_callbacks?: LoggingCallbackStatus | null;
3105
+ }
3106
+ export const KeyHealthResponse = /*@__PURE__*/ S.suspend(() =>
3107
+ S.Struct({
3108
+ key: S.optional(KeyHealthResponseKey),
3109
+ logging_callbacks: S.optional(S.NullOr(LoggingCallbackStatus)),
3110
+ }),
3111
+ ).annotate({
3112
+ identifier: "KeyHealthResponse",
3113
+ }) as any as S.Schema<KeyHealthResponse>;
3114
+
3115
+ export type RegenerateKeyRequestAccessGroupIdsList = Array<string>;
3116
+ export const RegenerateKeyRequestAccessGroupIdsList = /*@__PURE__*/ S.Array(
3117
+ S.String,
3118
+ ) as any as S.Schema<RegenerateKeyRequestAccessGroupIdsList>;
3119
+
3120
+ export type RegenerateKeyRequestAliasesMap = {
3121
+ [key: string]: unknown | undefined;
3122
+ };
3123
+ export const RegenerateKeyRequestAliasesMap = /*@__PURE__*/ S.Record(
3124
+ S.String,
3125
+ S.Unknown,
3126
+ ) as any as S.Schema<RegenerateKeyRequestAliasesMap>;
3127
+
3128
+ export type RegenerateKeyRequestAllowedCacheControlsList = Array<unknown>;
3129
+ export const RegenerateKeyRequestAllowedCacheControlsList =
3130
+ /*@__PURE__*/ S.Array(
3131
+ S.Unknown,
3132
+ ) as any as S.Schema<RegenerateKeyRequestAllowedCacheControlsList>;
3133
+
3134
+ export type RegenerateKeyRequestAllowedPassthroughRoutesList = Array<unknown>;
3135
+ export const RegenerateKeyRequestAllowedPassthroughRoutesList =
3136
+ /*@__PURE__*/ S.Array(
3137
+ S.Unknown,
3138
+ ) as any as S.Schema<RegenerateKeyRequestAllowedPassthroughRoutesList>;
3139
+
3140
+ export type RegenerateKeyRequestAllowedRoutesList = Array<unknown>;
3141
+ export const RegenerateKeyRequestAllowedRoutesList = /*@__PURE__*/ S.Array(
3142
+ S.Unknown,
3143
+ ) as any as S.Schema<RegenerateKeyRequestAllowedRoutesList>;
3144
+
3145
+ export type RegenerateKeyRequestAllowedVectorStoreIndexesList =
3146
+ Array<AllowedVectorStoreIndexItem>;
3147
+ export const RegenerateKeyRequestAllowedVectorStoreIndexesList =
3148
+ /*@__PURE__*/ S.Array(
3149
+ AllowedVectorStoreIndexItem,
3150
+ ) as any as S.Schema<RegenerateKeyRequestAllowedVectorStoreIndexesList>;
3151
+
3152
+ export type RegenerateKeyRequestBudgetFallbacksValueList = Array<string>;
3153
+ export const RegenerateKeyRequestBudgetFallbacksValueList =
3154
+ /*@__PURE__*/ S.Array(
3155
+ S.String,
3156
+ ) as any as S.Schema<RegenerateKeyRequestBudgetFallbacksValueList>;
3157
+
3158
+ export type RegenerateKeyRequestBudgetFallbacksMap = {
3159
+ [key: string]: RegenerateKeyRequestBudgetFallbacksValueList | undefined;
3160
+ };
3161
+ export const RegenerateKeyRequestBudgetFallbacksMap = /*@__PURE__*/ S.Record(
3162
+ S.String,
3163
+ RegenerateKeyRequestBudgetFallbacksValueList,
3164
+ ) as any as S.Schema<RegenerateKeyRequestBudgetFallbacksMap>;
3165
+
3166
+ export type RegenerateKeyRequestBudgetLimitsList = Array<BudgetLimitEntry>;
3167
+ export const RegenerateKeyRequestBudgetLimitsList = /*@__PURE__*/ S.Array(
3168
+ BudgetLimitEntry,
3169
+ ) as any as S.Schema<RegenerateKeyRequestBudgetLimitsList>;
3170
+
3171
+ export type RegenerateKeyRequestConfigMap = {
3172
+ [key: string]: unknown | undefined;
3173
+ };
3174
+ export const RegenerateKeyRequestConfigMap = /*@__PURE__*/ S.Record(
3175
+ S.String,
3176
+ S.Unknown,
3177
+ ) as any as S.Schema<RegenerateKeyRequestConfigMap>;
3178
+
3179
+ export type RegenerateKeyRequestDefaultEstimatedOutputTokensPerModelMap = {
3180
+ [key: string]: number | undefined;
3181
+ };
3182
+ export const RegenerateKeyRequestDefaultEstimatedOutputTokensPerModelMap =
3183
+ /*@__PURE__*/ S.Record(
3184
+ S.String,
3185
+ S.Number,
3186
+ ) as any as S.Schema<RegenerateKeyRequestDefaultEstimatedOutputTokensPerModelMap>;
3187
+
3188
+ export type RegenerateKeyRequestEnforcedParamsList = Array<string>;
3189
+ export const RegenerateKeyRequestEnforcedParamsList = /*@__PURE__*/ S.Array(
3190
+ S.String,
3191
+ ) as any as S.Schema<RegenerateKeyRequestEnforcedParamsList>;
3192
+
3193
+ export type RegenerateKeyRequestGuardrailsList = Array<string>;
3194
+ export const RegenerateKeyRequestGuardrailsList = /*@__PURE__*/ S.Array(
3195
+ S.String,
3196
+ ) as any as S.Schema<RegenerateKeyRequestGuardrailsList>;
3197
+
3198
+ export type RegenerateKeyRequestMcpRpmLimitMap = {
3199
+ [key: string]: number | undefined;
3200
+ };
3201
+ export const RegenerateKeyRequestMcpRpmLimitMap = /*@__PURE__*/ S.Record(
3202
+ S.String,
3203
+ S.Number,
3204
+ ) as any as S.Schema<RegenerateKeyRequestMcpRpmLimitMap>;
3205
+
3206
+ export type RegenerateKeyRequestMetadataMap = {
3207
+ [key: string]: unknown | undefined;
3208
+ };
3209
+ export const RegenerateKeyRequestMetadataMap = /*@__PURE__*/ S.Record(
3210
+ S.String,
3211
+ S.Unknown,
3212
+ ) as any as S.Schema<RegenerateKeyRequestMetadataMap>;
3213
+
3214
+ export type RegenerateKeyRequestModelMaxBudgetMap = {
3215
+ [key: string]: unknown | undefined;
3216
+ };
3217
+ export const RegenerateKeyRequestModelMaxBudgetMap = /*@__PURE__*/ S.Record(
3218
+ S.String,
3219
+ S.Unknown,
3220
+ ) as any as S.Schema<RegenerateKeyRequestModelMaxBudgetMap>;
3221
+
3222
+ export type RegenerateKeyRequestModelRpmLimitMap = {
3223
+ [key: string]: unknown | undefined;
3224
+ };
3225
+ export const RegenerateKeyRequestModelRpmLimitMap = /*@__PURE__*/ S.Record(
3226
+ S.String,
3227
+ S.Unknown,
3228
+ ) as any as S.Schema<RegenerateKeyRequestModelRpmLimitMap>;
3229
+
3230
+ export type RegenerateKeyRequestModelTpmLimitMap = {
3231
+ [key: string]: unknown | undefined;
3232
+ };
3233
+ export const RegenerateKeyRequestModelTpmLimitMap = /*@__PURE__*/ S.Record(
3234
+ S.String,
3235
+ S.Unknown,
3236
+ ) as any as S.Schema<RegenerateKeyRequestModelTpmLimitMap>;
3237
+
3238
+ export type RegenerateKeyRequestModelsList = Array<unknown>;
3239
+ export const RegenerateKeyRequestModelsList = /*@__PURE__*/ S.Array(
3240
+ S.Unknown,
3241
+ ) as any as S.Schema<RegenerateKeyRequestModelsList>;
3242
+
3243
+ export type RegenerateKeyRequestPermissionsMap = {
3244
+ [key: string]: unknown | undefined;
3245
+ };
3246
+ export const RegenerateKeyRequestPermissionsMap = /*@__PURE__*/ S.Record(
3247
+ S.String,
3248
+ S.Unknown,
3249
+ ) as any as S.Schema<RegenerateKeyRequestPermissionsMap>;
3250
+
3251
+ export type RegenerateKeyRequestPoliciesList = Array<string>;
3252
+ export const RegenerateKeyRequestPoliciesList = /*@__PURE__*/ S.Array(
3253
+ S.String,
3254
+ ) as any as S.Schema<RegenerateKeyRequestPoliciesList>;
3255
+
3256
+ export type RegenerateKeyRequestPromptsList = Array<string>;
3257
+ export const RegenerateKeyRequestPromptsList = /*@__PURE__*/ S.Array(
3258
+ S.String,
3259
+ ) as any as S.Schema<RegenerateKeyRequestPromptsList>;
3260
+
3261
+ export type RegenerateKeyRequestRpmLimitType =
3262
+ | "guaranteed_throughput"
3263
+ | "best_effort_throughput"
3264
+ | "dynamic";
3265
+ export const RegenerateKeyRequestRpmLimitType = S.String;
3266
+
3267
+ export type RegenerateKeyRequestTagRpmLimitMap = {
3268
+ [key: string]: number | undefined;
3269
+ };
3270
+ export const RegenerateKeyRequestTagRpmLimitMap = /*@__PURE__*/ S.Record(
3271
+ S.String,
3272
+ S.Number,
3273
+ ) as any as S.Schema<RegenerateKeyRequestTagRpmLimitMap>;
3274
+
3275
+ export type RegenerateKeyRequestTagsList = Array<string>;
3276
+ export const RegenerateKeyRequestTagsList = /*@__PURE__*/ S.Array(
3277
+ S.String,
3278
+ ) as any as S.Schema<RegenerateKeyRequestTagsList>;
3279
+
3280
+ export type RegenerateKeyRequestTpmLimitType =
3281
+ | "guaranteed_throughput"
3282
+ | "best_effort_throughput"
3283
+ | "dynamic";
3284
+ export const RegenerateKeyRequestTpmLimitType = S.String;
3285
+
3286
+ export interface RegenerateKeyRequest {
3287
+ access_group_ids?: RegenerateKeyRequestAccessGroupIdsList | null;
3288
+ agent_id?: string | null;
3289
+ aliases?: RegenerateKeyRequestAliasesMap | null;
3290
+ allowed_cache_controls?: RegenerateKeyRequestAllowedCacheControlsList | null;
3291
+ allowed_passthrough_routes?: RegenerateKeyRequestAllowedPassthroughRoutesList | null;
3292
+ allowed_routes?: RegenerateKeyRequestAllowedRoutesList | null;
3293
+ allowed_vector_store_indexes?: RegenerateKeyRequestAllowedVectorStoreIndexesList | null;
3294
+ /** Whether this key should be automatically rotated */
3295
+ auto_rotate?: boolean | null;
3296
+ blocked?: boolean | null;
3297
+ budget_duration?: string | null;
3298
+ budget_fallbacks?: RegenerateKeyRequestBudgetFallbacksMap | null;
3299
+ budget_id?: string | null;
3300
+ budget_limits?: RegenerateKeyRequestBudgetLimitsList | null;
3301
+ config?: RegenerateKeyRequestConfigMap | null;
3302
+ default_estimated_output_tokens?: number | null;
3303
+ default_estimated_output_tokens_per_model?: RegenerateKeyRequestDefaultEstimatedOutputTokensPerModelMap | null;
3304
+ disable_global_guardrails?: boolean | null;
3305
+ duration?: string | null;
3306
+ enable_prompt_caching?: boolean | null;
3307
+ enforced_params?: RegenerateKeyRequestEnforcedParamsList | null;
3308
+ grace_period?: string | null;
3309
+ guardrails?: RegenerateKeyRequestGuardrailsList | null;
3310
+ key?: string | null;
3311
+ key_alias?: string | null;
3312
+ /** Type of key that determines default allowed routes. */
3313
+ key_type?: LiteLLMKeyType | (string & {}) | null;
3314
+ max_budget?: number | null;
3315
+ max_parallel_requests?: number | null;
3316
+ mcp_rpm_limit?: RegenerateKeyRequestMcpRpmLimitMap | null;
3317
+ metadata?: RegenerateKeyRequestMetadataMap | null;
3318
+ model_max_budget?: RegenerateKeyRequestModelMaxBudgetMap | null;
3319
+ model_rpm_limit?: RegenerateKeyRequestModelRpmLimitMap | null;
3320
+ model_tpm_limit?: RegenerateKeyRequestModelTpmLimitMap | null;
3321
+ models?: RegenerateKeyRequestModelsList | null;
3322
+ new_key?: string | null;
3323
+ new_master_key?: string | null;
3324
+ object_permission?: LiteLLMObjectPermissionBase | null;
3325
+ organization_id?: string | null;
3326
+ permissions?: RegenerateKeyRequestPermissionsMap | null;
3327
+ policies?: RegenerateKeyRequestPoliciesList | null;
3328
+ project_id?: string | null;
3329
+ prompts?: RegenerateKeyRequestPromptsList | null;
3330
+ /** How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True */
3331
+ rotation_interval?: string | null;
3332
+ router_settings?: UpdateRouterConfig | null;
3333
+ rpm_limit?: number | null;
3334
+ rpm_limit_type?: RegenerateKeyRequestRpmLimitType | (string & {}) | null;
3335
+ send_invite_email?: boolean | null;
3336
+ soft_budget?: number | null;
3337
+ spend?: number | null;
3338
+ tag_rpm_limit?: RegenerateKeyRequestTagRpmLimitMap | null;
3339
+ tags?: RegenerateKeyRequestTagsList | null;
3340
+ team_id?: string | null;
3341
+ throttle_on_budget_exceeded?: boolean | null;
3342
+ tpm_limit?: number | null;
3343
+ tpm_limit_type?: RegenerateKeyRequestTpmLimitType | (string & {}) | null;
3344
+ user_id?: string | null;
3345
+ }
3346
+ export const RegenerateKeyRequest = /*@__PURE__*/ S.suspend(() =>
3347
+ S.Struct({
3348
+ access_group_ids: S.optional(
3349
+ S.NullOr(RegenerateKeyRequestAccessGroupIdsList),
3350
+ ),
3351
+ agent_id: S.optional(S.NullOr(S.String)),
3352
+ aliases: S.optional(S.NullOr(RegenerateKeyRequestAliasesMap)),
3353
+ allowed_cache_controls: S.optional(
3354
+ S.NullOr(RegenerateKeyRequestAllowedCacheControlsList),
3355
+ ),
3356
+ allowed_passthrough_routes: S.optional(
3357
+ S.NullOr(RegenerateKeyRequestAllowedPassthroughRoutesList),
3358
+ ),
3359
+ allowed_routes: S.optional(S.NullOr(RegenerateKeyRequestAllowedRoutesList)),
3360
+ allowed_vector_store_indexes: S.optional(
3361
+ S.NullOr(RegenerateKeyRequestAllowedVectorStoreIndexesList),
3362
+ ),
3363
+ auto_rotate: S.optional(S.NullOr(S.Boolean)),
3364
+ blocked: S.optional(S.NullOr(S.Boolean)),
3365
+ budget_duration: S.optional(S.NullOr(S.String)),
3366
+ budget_fallbacks: S.optional(
3367
+ S.NullOr(RegenerateKeyRequestBudgetFallbacksMap),
3368
+ ),
3369
+ budget_id: S.optional(S.NullOr(S.String)),
3370
+ budget_limits: S.optional(S.NullOr(RegenerateKeyRequestBudgetLimitsList)),
3371
+ config: S.optional(S.NullOr(RegenerateKeyRequestConfigMap)),
3372
+ default_estimated_output_tokens: S.optional(S.NullOr(S.Number)),
3373
+ default_estimated_output_tokens_per_model: S.optional(
3374
+ S.NullOr(RegenerateKeyRequestDefaultEstimatedOutputTokensPerModelMap),
3375
+ ),
3376
+ disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
3377
+ duration: S.optional(S.NullOr(S.String)),
3378
+ enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
3379
+ enforced_params: S.optional(
3380
+ S.NullOr(RegenerateKeyRequestEnforcedParamsList),
3381
+ ),
3382
+ grace_period: S.optional(S.NullOr(S.String)),
3383
+ guardrails: S.optional(S.NullOr(RegenerateKeyRequestGuardrailsList)),
3384
+ key: S.optional(S.NullOr(S.String)),
3385
+ key_alias: S.optional(S.NullOr(S.String)),
3386
+ key_type: S.optional(S.NullOr(LiteLLMKeyType)),
3387
+ max_budget: S.optional(S.NullOr(S.Number)),
3388
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
3389
+ mcp_rpm_limit: S.optional(S.NullOr(RegenerateKeyRequestMcpRpmLimitMap)),
3390
+ metadata: S.optional(S.NullOr(RegenerateKeyRequestMetadataMap)),
3391
+ model_max_budget: S.optional(
3392
+ S.NullOr(RegenerateKeyRequestModelMaxBudgetMap),
3393
+ ),
3394
+ model_rpm_limit: S.optional(S.NullOr(RegenerateKeyRequestModelRpmLimitMap)),
3395
+ model_tpm_limit: S.optional(S.NullOr(RegenerateKeyRequestModelTpmLimitMap)),
3396
+ models: S.optional(S.NullOr(RegenerateKeyRequestModelsList)),
3397
+ new_key: S.optional(S.NullOr(S.String)),
3398
+ new_master_key: S.optional(S.NullOr(S.String)),
3399
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionBase)),
3400
+ organization_id: S.optional(S.NullOr(S.String)),
3401
+ permissions: S.optional(S.NullOr(RegenerateKeyRequestPermissionsMap)),
3402
+ policies: S.optional(S.NullOr(RegenerateKeyRequestPoliciesList)),
3403
+ project_id: S.optional(S.NullOr(S.String)),
3404
+ prompts: S.optional(S.NullOr(RegenerateKeyRequestPromptsList)),
3405
+ rotation_interval: S.optional(S.NullOr(S.String)),
3406
+ router_settings: S.optional(S.NullOr(UpdateRouterConfig)),
3407
+ rpm_limit: S.optional(S.NullOr(S.Number)),
3408
+ rpm_limit_type: S.optional(S.NullOr(RegenerateKeyRequestRpmLimitType)),
3409
+ send_invite_email: S.optional(S.NullOr(S.Boolean)),
3410
+ soft_budget: S.optional(S.NullOr(S.Number)),
3411
+ spend: S.optional(S.NullOr(S.Number)),
3412
+ tag_rpm_limit: S.optional(S.NullOr(RegenerateKeyRequestTagRpmLimitMap)),
3413
+ tags: S.optional(S.NullOr(RegenerateKeyRequestTagsList)),
3414
+ team_id: S.optional(S.NullOr(S.String)),
3415
+ throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
3416
+ tpm_limit: S.optional(S.NullOr(S.Number)),
3417
+ tpm_limit_type: S.optional(S.NullOr(RegenerateKeyRequestTpmLimitType)),
3418
+ user_id: S.optional(S.NullOr(S.String)),
3419
+ }),
3420
+ ).annotate({
3421
+ identifier: "RegenerateKeyRequest",
3422
+ }) as any as S.Schema<RegenerateKeyRequest>;
3423
+
3424
+ export interface RegenerateKeyFnKeyKeyRegeneratePostRequest {
3425
+ key: string;
3426
+ body?: RegenerateKeyRequest | null;
3427
+ }
3428
+ export const RegenerateKeyFnKeyKeyRegeneratePostRequest =
3429
+ /*@__PURE__*/ S.suspend(() =>
3430
+ S.Struct({
3431
+ key: S.String.pipe(T.Label()),
3432
+ body: S.optional(S.NullOr(RegenerateKeyRequest).pipe(T.HttpBody())),
3433
+ }).pipe(
3434
+ T.Http({ method: "POST", uri: "/key/{key}/regenerate", code: 200 }),
3435
+ ),
3436
+ ).annotate({
3437
+ identifier: "RegenerateKeyFnKeyKeyRegeneratePostRequest",
3438
+ }) as any as S.Schema<RegenerateKeyFnKeyKeyRegeneratePostRequest>;
3439
+
3440
+ export interface RegenerateKeyFnKeyKeyRegeneratePostResponse {
3441
+ body: GenerateKeyResponse | null;
3442
+ }
3443
+ export const RegenerateKeyFnKeyKeyRegeneratePostResponse =
3444
+ /*@__PURE__*/ S.suspend(() =>
3445
+ S.Struct({
3446
+ body: S.NullOr(GenerateKeyResponse),
3447
+ }),
3448
+ ).annotate({
3449
+ identifier: "RegenerateKeyFnKeyKeyRegeneratePostResponse",
3450
+ }) as any as S.Schema<RegenerateKeyFnKeyKeyRegeneratePostResponse>;
3451
+
3452
+ export interface RegenerateKeyFnKeyRegeneratePostRequest {
3453
+ key?: string;
3454
+ body?: RegenerateKeyRequest | null;
3455
+ }
3456
+ export const RegenerateKeyFnKeyRegeneratePostRequest = /*@__PURE__*/ S.suspend(
3457
+ () =>
3458
+ S.Struct({
3459
+ key: S.optional(S.String.pipe(T.Query())),
3460
+ body: S.optional(S.NullOr(RegenerateKeyRequest).pipe(T.HttpBody())),
3461
+ }).pipe(T.Http({ method: "POST", uri: "/key/regenerate", code: 200 })),
3462
+ ).annotate({
3463
+ identifier: "RegenerateKeyFnKeyRegeneratePostRequest",
3464
+ }) as any as S.Schema<RegenerateKeyFnKeyRegeneratePostRequest>;
3465
+
3466
+ export interface RegenerateKeyFnKeyRegeneratePostResponse {
3467
+ body: GenerateKeyResponse | null;
3468
+ }
3469
+ export const RegenerateKeyFnKeyRegeneratePostResponse = /*@__PURE__*/ S.suspend(
3470
+ () =>
3471
+ S.Struct({
3472
+ body: S.NullOr(GenerateKeyResponse),
3473
+ }),
3474
+ ).annotate({
3475
+ identifier: "RegenerateKeyFnKeyRegeneratePostResponse",
3476
+ }) as any as S.Schema<RegenerateKeyFnKeyRegeneratePostResponse>;
3477
+
3478
+ export interface ResetKeySpendFnKeyKeyResetSpendPostRequest {
3479
+ key: string;
3480
+ reset_to: number;
3481
+ }
3482
+ export const ResetKeySpendFnKeyKeyResetSpendPostRequest =
3483
+ /*@__PURE__*/ S.suspend(() =>
3484
+ S.Struct({
3485
+ key: S.String.pipe(T.Label()),
3486
+ reset_to: S.Number,
3487
+ }).pipe(
3488
+ T.Http({ method: "POST", uri: "/key/{key}/reset_spend", code: 200 }),
3489
+ ),
3490
+ ).annotate({
3491
+ identifier: "ResetKeySpendFnKeyKeyResetSpendPostRequest",
3492
+ }) as any as S.Schema<ResetKeySpendFnKeyKeyResetSpendPostRequest>;
3493
+
3494
+ export type ResetKeySpendFnKeyKeyResetSpendPostResponseBodyMap = {
3495
+ [key: string]: unknown | undefined;
3496
+ };
3497
+ export const ResetKeySpendFnKeyKeyResetSpendPostResponseBodyMap =
3498
+ /*@__PURE__*/ S.Record(
3499
+ S.String,
3500
+ S.Unknown,
3501
+ ) as any as S.Schema<ResetKeySpendFnKeyKeyResetSpendPostResponseBodyMap>;
3502
+
3503
+ export interface ResetKeySpendFnKeyKeyResetSpendPostResponse {
3504
+ body: ResetKeySpendFnKeyKeyResetSpendPostResponseBodyMap;
3505
+ }
3506
+ export const ResetKeySpendFnKeyKeyResetSpendPostResponse =
3507
+ /*@__PURE__*/ S.suspend(() =>
3508
+ S.Struct({
3509
+ body: ResetKeySpendFnKeyKeyResetSpendPostResponseBodyMap,
3510
+ }),
3511
+ ).annotate({
3512
+ identifier: "ResetKeySpendFnKeyKeyResetSpendPostResponse",
3513
+ }) as any as S.Schema<ResetKeySpendFnKeyKeyResetSpendPostResponse>;
3514
+
3515
+ export interface UnblockKeyKeyUnblockPostRequest {
3516
+ key: string;
3517
+ }
3518
+ export const UnblockKeyKeyUnblockPostRequest = /*@__PURE__*/ S.suspend(() =>
3519
+ S.Struct({
3520
+ key: S.String,
3521
+ }).pipe(T.Http({ method: "POST", uri: "/key/unblock", code: 200 })),
3522
+ ).annotate({
3523
+ identifier: "UnblockKeyKeyUnblockPostRequest",
3524
+ }) as any as S.Schema<UnblockKeyKeyUnblockPostRequest>;
3525
+
3526
+ export interface UnblockKeyKeyUnblockPostResponse {
3527
+ body: unknown;
3528
+ }
3529
+ export const UnblockKeyKeyUnblockPostResponse = /*@__PURE__*/ S.suspend(() =>
3530
+ S.Struct({
3531
+ body: S.Unknown,
3532
+ }),
3533
+ ).annotate({
3534
+ identifier: "UnblockKeyKeyUnblockPostResponse",
3535
+ }) as any as S.Schema<UnblockKeyKeyUnblockPostResponse>;
3536
+
3537
+ export type UpdateKeyFnKeyUpdatePostRequestAccessGroupIdsList = Array<string>;
3538
+ export const UpdateKeyFnKeyUpdatePostRequestAccessGroupIdsList =
3539
+ /*@__PURE__*/ S.Array(
3540
+ S.String,
3541
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestAccessGroupIdsList>;
3542
+
3543
+ export type UpdateKeyFnKeyUpdatePostRequestAliasesMap = {
3544
+ [key: string]: unknown | undefined;
3545
+ };
3546
+ export const UpdateKeyFnKeyUpdatePostRequestAliasesMap = /*@__PURE__*/ S.Record(
3547
+ S.String,
3548
+ S.Unknown,
3549
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestAliasesMap>;
3550
+
3551
+ export type UpdateKeyFnKeyUpdatePostRequestAllowedCacheControlsList =
3552
+ Array<unknown>;
3553
+ export const UpdateKeyFnKeyUpdatePostRequestAllowedCacheControlsList =
3554
+ /*@__PURE__*/ S.Array(
3555
+ S.Unknown,
3556
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestAllowedCacheControlsList>;
3557
+
3558
+ export type UpdateKeyFnKeyUpdatePostRequestAllowedPassthroughRoutesList =
3559
+ Array<unknown>;
3560
+ export const UpdateKeyFnKeyUpdatePostRequestAllowedPassthroughRoutesList =
3561
+ /*@__PURE__*/ S.Array(
3562
+ S.Unknown,
3563
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestAllowedPassthroughRoutesList>;
3564
+
3565
+ export type UpdateKeyFnKeyUpdatePostRequestAllowedRoutesList = Array<unknown>;
3566
+ export const UpdateKeyFnKeyUpdatePostRequestAllowedRoutesList =
3567
+ /*@__PURE__*/ S.Array(
3568
+ S.Unknown,
3569
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestAllowedRoutesList>;
3570
+
3571
+ export type UpdateKeyFnKeyUpdatePostRequestAllowedVectorStoreIndexesList =
3572
+ Array<AllowedVectorStoreIndexItem>;
3573
+ export const UpdateKeyFnKeyUpdatePostRequestAllowedVectorStoreIndexesList =
3574
+ /*@__PURE__*/ S.Array(
3575
+ AllowedVectorStoreIndexItem,
3576
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestAllowedVectorStoreIndexesList>;
3577
+
3578
+ export type UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksValueList =
3579
+ Array<string>;
3580
+ export const UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksValueList =
3581
+ /*@__PURE__*/ S.Array(
3582
+ S.String,
3583
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksValueList>;
3584
+
3585
+ export type UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksMap = {
3586
+ [key: string]:
3587
+ | UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksValueList
3588
+ | undefined;
3589
+ };
3590
+ export const UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksMap =
3591
+ /*@__PURE__*/ S.Record(
3592
+ S.String,
3593
+ UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksValueList,
3594
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksMap>;
3595
+
3596
+ export type UpdateKeyFnKeyUpdatePostRequestBudgetLimitsList =
3597
+ Array<BudgetLimitEntry>;
3598
+ export const UpdateKeyFnKeyUpdatePostRequestBudgetLimitsList =
3599
+ /*@__PURE__*/ S.Array(
3600
+ BudgetLimitEntry,
3601
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestBudgetLimitsList>;
3602
+
3603
+ export type UpdateKeyFnKeyUpdatePostRequestConfigMap = {
3604
+ [key: string]: unknown | undefined;
3605
+ };
3606
+ export const UpdateKeyFnKeyUpdatePostRequestConfigMap = /*@__PURE__*/ S.Record(
3607
+ S.String,
3608
+ S.Unknown,
3609
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestConfigMap>;
3610
+
3611
+ export type UpdateKeyFnKeyUpdatePostRequestDefaultEstimatedOutputTokensPerModelMap =
3612
+ { [key: string]: number | undefined };
3613
+ export const UpdateKeyFnKeyUpdatePostRequestDefaultEstimatedOutputTokensPerModelMap =
3614
+ /*@__PURE__*/ S.Record(
3615
+ S.String,
3616
+ S.Number,
3617
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestDefaultEstimatedOutputTokensPerModelMap>;
3618
+
3619
+ export type UpdateKeyFnKeyUpdatePostRequestEnforcedParamsList = Array<string>;
3620
+ export const UpdateKeyFnKeyUpdatePostRequestEnforcedParamsList =
3621
+ /*@__PURE__*/ S.Array(
3622
+ S.String,
3623
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestEnforcedParamsList>;
3624
+
3625
+ export type UpdateKeyFnKeyUpdatePostRequestGuardrailsList = Array<string>;
3626
+ export const UpdateKeyFnKeyUpdatePostRequestGuardrailsList =
3627
+ /*@__PURE__*/ S.Array(
3628
+ S.String,
3629
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestGuardrailsList>;
3630
+
3631
+ export type UpdateKeyFnKeyUpdatePostRequestMcpRpmLimitMap = {
3632
+ [key: string]: number | undefined;
3633
+ };
3634
+ export const UpdateKeyFnKeyUpdatePostRequestMcpRpmLimitMap =
3635
+ /*@__PURE__*/ S.Record(
3636
+ S.String,
3637
+ S.Number,
3638
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestMcpRpmLimitMap>;
3639
+
3640
+ export type UpdateKeyFnKeyUpdatePostRequestMetadataMap = {
3641
+ [key: string]: unknown | undefined;
3642
+ };
3643
+ export const UpdateKeyFnKeyUpdatePostRequestMetadataMap =
3644
+ /*@__PURE__*/ S.Record(
3645
+ S.String,
3646
+ S.Unknown,
3647
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestMetadataMap>;
3648
+
3649
+ export type UpdateKeyFnKeyUpdatePostRequestModelMaxBudgetMap = {
3650
+ [key: string]: unknown | undefined;
3651
+ };
3652
+ export const UpdateKeyFnKeyUpdatePostRequestModelMaxBudgetMap =
3653
+ /*@__PURE__*/ S.Record(
3654
+ S.String,
3655
+ S.Unknown,
3656
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestModelMaxBudgetMap>;
3657
+
3658
+ export type UpdateKeyFnKeyUpdatePostRequestModelRpmLimitMap = {
3659
+ [key: string]: unknown | undefined;
3660
+ };
3661
+ export const UpdateKeyFnKeyUpdatePostRequestModelRpmLimitMap =
3662
+ /*@__PURE__*/ S.Record(
3663
+ S.String,
3664
+ S.Unknown,
3665
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestModelRpmLimitMap>;
3666
+
3667
+ export type UpdateKeyFnKeyUpdatePostRequestModelTpmLimitMap = {
3668
+ [key: string]: unknown | undefined;
3669
+ };
3670
+ export const UpdateKeyFnKeyUpdatePostRequestModelTpmLimitMap =
3671
+ /*@__PURE__*/ S.Record(
3672
+ S.String,
3673
+ S.Unknown,
3674
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestModelTpmLimitMap>;
3675
+
3676
+ export type UpdateKeyFnKeyUpdatePostRequestModelsList = Array<unknown>;
3677
+ export const UpdateKeyFnKeyUpdatePostRequestModelsList = /*@__PURE__*/ S.Array(
3678
+ S.Unknown,
3679
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestModelsList>;
3680
+
3681
+ export type UpdateKeyFnKeyUpdatePostRequestPermissionsMap = {
3682
+ [key: string]: unknown | undefined;
3683
+ };
3684
+ export const UpdateKeyFnKeyUpdatePostRequestPermissionsMap =
3685
+ /*@__PURE__*/ S.Record(
3686
+ S.String,
3687
+ S.Unknown,
3688
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestPermissionsMap>;
3689
+
3690
+ export type UpdateKeyFnKeyUpdatePostRequestPoliciesList = Array<string>;
3691
+ export const UpdateKeyFnKeyUpdatePostRequestPoliciesList =
3692
+ /*@__PURE__*/ S.Array(
3693
+ S.String,
3694
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestPoliciesList>;
3695
+
3696
+ export type UpdateKeyFnKeyUpdatePostRequestPromptsList = Array<string>;
3697
+ export const UpdateKeyFnKeyUpdatePostRequestPromptsList = /*@__PURE__*/ S.Array(
3698
+ S.String,
3699
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestPromptsList>;
3700
+
3701
+ export type UpdateKeyFnKeyUpdatePostRequestRpmLimitType =
3702
+ | "guaranteed_throughput"
3703
+ | "best_effort_throughput"
3704
+ | "dynamic";
3705
+ export const UpdateKeyFnKeyUpdatePostRequestRpmLimitType = S.String;
3706
+
3707
+ export type UpdateKeyFnKeyUpdatePostRequestTagRpmLimitMap = {
3708
+ [key: string]: number | undefined;
3709
+ };
3710
+ export const UpdateKeyFnKeyUpdatePostRequestTagRpmLimitMap =
3711
+ /*@__PURE__*/ S.Record(
3712
+ S.String,
3713
+ S.Number,
3714
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestTagRpmLimitMap>;
3715
+
3716
+ export type UpdateKeyFnKeyUpdatePostRequestTagsList = Array<string>;
3717
+ export const UpdateKeyFnKeyUpdatePostRequestTagsList = /*@__PURE__*/ S.Array(
3718
+ S.String,
3719
+ ) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequestTagsList>;
3720
+
3721
+ export type UpdateKeyFnKeyUpdatePostRequestTpmLimitType =
3722
+ | "guaranteed_throughput"
3723
+ | "best_effort_throughput"
3724
+ | "dynamic";
3725
+ export const UpdateKeyFnKeyUpdatePostRequestTpmLimitType = S.String;
3726
+
3727
+ export interface UpdateKeyFnKeyUpdatePostRequest {
3728
+ access_group_ids?: UpdateKeyFnKeyUpdatePostRequestAccessGroupIdsList | null;
3729
+ agent_id?: string | null;
3730
+ aliases?: UpdateKeyFnKeyUpdatePostRequestAliasesMap | null;
3731
+ allowed_cache_controls?: UpdateKeyFnKeyUpdatePostRequestAllowedCacheControlsList | null;
3732
+ allowed_passthrough_routes?: UpdateKeyFnKeyUpdatePostRequestAllowedPassthroughRoutesList | null;
3733
+ allowed_routes?: UpdateKeyFnKeyUpdatePostRequestAllowedRoutesList | null;
3734
+ allowed_vector_store_indexes?: UpdateKeyFnKeyUpdatePostRequestAllowedVectorStoreIndexesList | null;
3735
+ auto_rotate?: boolean | null;
3736
+ blocked?: boolean | null;
3737
+ budget_duration?: string | null;
3738
+ budget_fallbacks?: UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksMap | null;
3739
+ budget_id?: string | null;
3740
+ budget_limits?: UpdateKeyFnKeyUpdatePostRequestBudgetLimitsList | null;
3741
+ config?: UpdateKeyFnKeyUpdatePostRequestConfigMap | null;
3742
+ default_estimated_output_tokens?: number | null;
3743
+ default_estimated_output_tokens_per_model?: UpdateKeyFnKeyUpdatePostRequestDefaultEstimatedOutputTokensPerModelMap | null;
3744
+ disable_global_guardrails?: boolean | null;
3745
+ duration?: string | null;
3746
+ enable_prompt_caching?: boolean | null;
3747
+ enforced_params?: UpdateKeyFnKeyUpdatePostRequestEnforcedParamsList | null;
3748
+ guardrails?: UpdateKeyFnKeyUpdatePostRequestGuardrailsList | null;
3749
+ key?: string | null;
3750
+ key_alias?: string | null;
3751
+ max_budget?: number | null;
3752
+ max_parallel_requests?: number | null;
3753
+ mcp_rpm_limit?: UpdateKeyFnKeyUpdatePostRequestMcpRpmLimitMap | null;
3754
+ metadata?: UpdateKeyFnKeyUpdatePostRequestMetadataMap | null;
3755
+ model_max_budget?: UpdateKeyFnKeyUpdatePostRequestModelMaxBudgetMap | null;
3756
+ model_rpm_limit?: UpdateKeyFnKeyUpdatePostRequestModelRpmLimitMap | null;
3757
+ model_tpm_limit?: UpdateKeyFnKeyUpdatePostRequestModelTpmLimitMap | null;
3758
+ models?: UpdateKeyFnKeyUpdatePostRequestModelsList | null;
3759
+ object_permission?: LiteLLMObjectPermissionBase | null;
3760
+ organization_id?: string | null;
3761
+ permissions?: UpdateKeyFnKeyUpdatePostRequestPermissionsMap | null;
3762
+ policies?: UpdateKeyFnKeyUpdatePostRequestPoliciesList | null;
3763
+ prompts?: UpdateKeyFnKeyUpdatePostRequestPromptsList | null;
3764
+ rotation_interval?: string | null;
3765
+ router_settings?: UpdateRouterConfig | null;
3766
+ rpm_limit?: number | null;
3767
+ rpm_limit_type?:
3768
+ | UpdateKeyFnKeyUpdatePostRequestRpmLimitType
3769
+ | (string & {})
3770
+ | null;
3771
+ spend?: number | null;
3772
+ tag_rpm_limit?: UpdateKeyFnKeyUpdatePostRequestTagRpmLimitMap | null;
3773
+ tags?: UpdateKeyFnKeyUpdatePostRequestTagsList | null;
3774
+ team_id?: string | null;
3775
+ temp_budget_expiry?: string | null;
3776
+ temp_budget_increase?: number | null;
3777
+ throttle_on_budget_exceeded?: boolean | null;
3778
+ tpm_limit?: number | null;
3779
+ tpm_limit_type?:
3780
+ | UpdateKeyFnKeyUpdatePostRequestTpmLimitType
3781
+ | (string & {})
3782
+ | null;
3783
+ user_id?: string | null;
3784
+ }
3785
+ export const UpdateKeyFnKeyUpdatePostRequest = /*@__PURE__*/ S.suspend(() =>
3786
+ S.Struct({
3787
+ access_group_ids: S.optional(
3788
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestAccessGroupIdsList),
3789
+ ),
3790
+ agent_id: S.optional(S.NullOr(S.String)),
3791
+ aliases: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestAliasesMap)),
3792
+ allowed_cache_controls: S.optional(
3793
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestAllowedCacheControlsList),
3794
+ ),
3795
+ allowed_passthrough_routes: S.optional(
3796
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestAllowedPassthroughRoutesList),
3797
+ ),
3798
+ allowed_routes: S.optional(
3799
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestAllowedRoutesList),
3800
+ ),
3801
+ allowed_vector_store_indexes: S.optional(
3802
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestAllowedVectorStoreIndexesList),
3803
+ ),
3804
+ auto_rotate: S.optional(S.NullOr(S.Boolean)),
3805
+ blocked: S.optional(S.NullOr(S.Boolean)),
3806
+ budget_duration: S.optional(S.NullOr(S.String)),
3807
+ budget_fallbacks: S.optional(
3808
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestBudgetFallbacksMap),
3809
+ ),
3810
+ budget_id: S.optional(S.NullOr(S.String)),
3811
+ budget_limits: S.optional(
3812
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestBudgetLimitsList),
3813
+ ),
3814
+ config: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestConfigMap)),
3815
+ default_estimated_output_tokens: S.optional(S.NullOr(S.Number)),
3816
+ default_estimated_output_tokens_per_model: S.optional(
3817
+ S.NullOr(
3818
+ UpdateKeyFnKeyUpdatePostRequestDefaultEstimatedOutputTokensPerModelMap,
3819
+ ),
3820
+ ),
3821
+ disable_global_guardrails: S.optional(S.NullOr(S.Boolean)),
3822
+ duration: S.optional(S.NullOr(S.String)),
3823
+ enable_prompt_caching: S.optional(S.NullOr(S.Boolean)),
3824
+ enforced_params: S.optional(
3825
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestEnforcedParamsList),
3826
+ ),
3827
+ guardrails: S.optional(
3828
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestGuardrailsList),
3829
+ ),
3830
+ key: S.optional(S.NullOr(S.String)),
3831
+ key_alias: S.optional(S.NullOr(S.String)),
3832
+ max_budget: S.optional(S.NullOr(S.Number)),
3833
+ max_parallel_requests: S.optional(S.NullOr(S.Number)),
3834
+ mcp_rpm_limit: S.optional(
3835
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestMcpRpmLimitMap),
3836
+ ),
3837
+ metadata: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestMetadataMap)),
3838
+ model_max_budget: S.optional(
3839
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestModelMaxBudgetMap),
3840
+ ),
3841
+ model_rpm_limit: S.optional(
3842
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestModelRpmLimitMap),
3843
+ ),
3844
+ model_tpm_limit: S.optional(
3845
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestModelTpmLimitMap),
3846
+ ),
3847
+ models: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestModelsList)),
3848
+ object_permission: S.optional(S.NullOr(LiteLLMObjectPermissionBase)),
3849
+ organization_id: S.optional(S.NullOr(S.String)),
3850
+ permissions: S.optional(
3851
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestPermissionsMap),
3852
+ ),
3853
+ policies: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestPoliciesList)),
3854
+ prompts: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestPromptsList)),
3855
+ rotation_interval: S.optional(S.NullOr(S.String)),
3856
+ router_settings: S.optional(S.NullOr(UpdateRouterConfig)),
3857
+ rpm_limit: S.optional(S.NullOr(S.Number)),
3858
+ rpm_limit_type: S.optional(
3859
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestRpmLimitType),
3860
+ ),
3861
+ spend: S.optional(S.NullOr(S.Number)),
3862
+ tag_rpm_limit: S.optional(
3863
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestTagRpmLimitMap),
3864
+ ),
3865
+ tags: S.optional(S.NullOr(UpdateKeyFnKeyUpdatePostRequestTagsList)),
3866
+ team_id: S.optional(S.NullOr(S.String)),
3867
+ temp_budget_expiry: S.optional(S.NullOr(S.String)),
3868
+ temp_budget_increase: S.optional(S.NullOr(S.Number)),
3869
+ throttle_on_budget_exceeded: S.optional(S.NullOr(S.Boolean)),
3870
+ tpm_limit: S.optional(S.NullOr(S.Number)),
3871
+ tpm_limit_type: S.optional(
3872
+ S.NullOr(UpdateKeyFnKeyUpdatePostRequestTpmLimitType),
3873
+ ),
3874
+ user_id: S.optional(S.NullOr(S.String)),
3875
+ }).pipe(T.Http({ method: "POST", uri: "/key/update", code: 200 })),
3876
+ ).annotate({
3877
+ identifier: "UpdateKeyFnKeyUpdatePostRequest",
3878
+ }) as any as S.Schema<UpdateKeyFnKeyUpdatePostRequest>;
3879
+
3880
+ export interface UpdateKeyFnKeyUpdatePostResponse {
3881
+ body: unknown;
3882
+ }
3883
+ export const UpdateKeyFnKeyUpdatePostResponse = /*@__PURE__*/ S.suspend(() =>
3884
+ S.Struct({
3885
+ body: S.Unknown,
3886
+ }),
3887
+ ).annotate({
3888
+ identifier: "UpdateKeyFnKeyUpdatePostResponse",
3889
+ }) as any as S.Schema<UpdateKeyFnKeyUpdatePostResponse>;
3890
+
3891
+ export type BulkUpdateKeysKeyBulkUpdatePostError =
3892
+ | BadRequest
3893
+ | Forbidden
3894
+ | UnprocessableEntity
3895
+ | LitellmOpError;
3896
+ /** Bulk Update Keys Bulk update multiple keys at once. This endpoint allows updating multiple keys in a single request. Each key update is processed independently - if some updates fail, others will still succeed. Parameters: - keys: List[BulkUpdateKeyRequestItem] - List of key update requests, each containing: - key: str - The key identifier (token) to update - budget_id: Optional[str] - Budget ID associated with the key - max_budget: Optional[float] - Max budget for key - team_id: Optional[str] - Team ID associated with key - tags: Optional[List[str]] - Tags for organizing keys Returns: - total_requested: int - Total number of keys requested for update - successful_updates: List[SuccessfulKeyUpdate] - List of successfully updated keys with their updated info - failed_updates: List[FailedKeyUpdate] - List of failed updates with key_info and failed_reason Example request: ```bash curl --location 'http://0.0.0.0:4000/key/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "keys": [ { "key": "sk-1234", "max_budget": 100.0, "team_id": "team-123", "tags": ["production", "api"] }, { "key": "sk-5678", "budget_id": "budget-456", "tags": ["staging"] } ] }' ``` */
3897
+ export const bulkUpdateKeysKeyBulkUpdatePost: API.OperationMethod<
3898
+ BulkUpdateKeysKeyBulkUpdatePostRequest,
3899
+ BulkUpdateKeyResponse,
3900
+ BulkUpdateKeysKeyBulkUpdatePostError,
3901
+ LitellmOpContext
3902
+ > = /*@__PURE__*/ API.make(() => ({
3903
+ input: BulkUpdateKeysKeyBulkUpdatePostRequest,
3904
+ output: BulkUpdateKeyResponse,
3905
+ errors: [BadRequest, Forbidden, UnprocessableEntity],
3906
+ protocol: LitellmProtocol,
3907
+ retry: Retry.Retry,
3908
+ }));
3909
+
3910
+ export type BulkUpdateTeamKeysTeamKeyBulkUpdatePostError =
3911
+ | UnprocessableEntity
3912
+ | LitellmOpError;
3913
+ /** Bulk Update Team Keys Apply one update payload to many keys inside a single team. Pass `team_id` plus either `key_ids` or `all_keys_in_team=True`. The `update_fields` payload is broadcast to every selected key. Per-key failures are returned in `failed_updates` rather than aborting the batch. Callable by proxy admins, or by team admins with `KEY_UPDATE` permission. */
3914
+ export const bulkUpdateTeamKeysTeamKeyBulkUpdatePost: API.OperationMethod<
3915
+ BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequest,
3916
+ BulkUpdateKeyResponse,
3917
+ BulkUpdateTeamKeysTeamKeyBulkUpdatePostError,
3918
+ LitellmOpContext
3919
+ > = /*@__PURE__*/ API.make(() => ({
3920
+ input: BulkUpdateTeamKeysTeamKeyBulkUpdatePostRequest,
3921
+ output: BulkUpdateKeyResponse,
3922
+ errors: [UnprocessableEntity],
3923
+ protocol: LitellmProtocol,
3924
+ retry: Retry.Retry,
3925
+ }));
3926
+
3927
+ export type DeleteKeyFnKeyDeletePostError =
3928
+ | BadRequest
3929
+ | UnprocessableEntity
3930
+ | LitellmOpError;
3931
+ /** Delete Key Fn Delete a key from the key management system. Parameters:: - keys (List[str]): A list of keys or hashed keys to delete. Example {"keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]} - key_aliases (List[str]): A list of key aliases to delete. Can be passed instead of `keys`.Example {"key_aliases": ["alias1", "alias2"]} Returns: - deleted_keys (List[str]): A list of deleted keys. Example {"deleted_keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]} Example: ```bash curl --location 'http://0.0.0.0:4000/key/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "keys": ["sk-QWrxEynunsNpV1zT48HIrw"] }' ``` Raises: HTTPException: If an error occurs during key deletion. */
3932
+ export const deleteKeyFnKeyDeletePost: API.OperationMethod<
3933
+ DeleteKeyFnKeyDeletePostRequest,
3934
+ DeleteKeyFnKeyDeletePostResponse,
3935
+ DeleteKeyFnKeyDeletePostError,
3936
+ LitellmOpContext
3937
+ > = /*@__PURE__*/ API.make(() => ({
3938
+ input: DeleteKeyFnKeyDeletePostRequest,
3939
+ output: DeleteKeyFnKeyDeletePostResponse,
3940
+ errors: [BadRequest, UnprocessableEntity],
3941
+ protocol: LitellmProtocol,
3942
+ retry: Retry.Retry,
3943
+ }));
3944
+
3945
+ export type GenerateKeyFnKeyGeneratePostError =
3946
+ | BadRequest
3947
+ | Forbidden
3948
+ | UnprocessableEntity
3949
+ | LitellmOpError;
3950
+ /** Generate Key Fn Generate an API key based on the provided data. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - key_alias: Optional[str] - User defined key alias - key: Optional[str] - User defined key value. Must start with 'sk-' and be at least 16 characters long. If not set, a 16-digit unique sk-key is created for you. - team_id: Optional[str] - The team id of the key - user_id: Optional[str] - The user id of the key - agent_id: Optional[str] - The agent id associated with the key. - organization_id: Optional[str] - The organization id of the key. If not set, and team_id is set, the organization id will be the same as the team id. If conflict, an error will be raised. - project_id: Optional[str] - The project id of the key. When set, models and max_budget are validated against the project's limits. - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) - aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models - config: Optional[dict] - any key-specific configs, overrides config in config.yaml - spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend - send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key - max_budget: Optional[float] - Specify max budget for a given key. - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } - guardrails: Optional[List[str]] - List of active guardrails for the key - policies: Optional[List[str]] - List of policy names to apply to the key. Policies define guardrails, conditions, and inheritance rules. - disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key. - throttle_on_budget_exceeded: Optional[bool] - When the key exceeds its max_budget, throttle its tpm/rpm to the global budget_exceeded_throttle_percentage instead of blocking the key entirely. - enable_prompt_caching: Optional[bool] - Auto-inject prompt caching breakpoints (Anthropic cache_control markers) on requests made with this key. Anthropic and Bedrock Claude models only. - permissions: Optional[dict] - key-specific permissions. Currently just used for turning off pii masking (if connected). Example - {"pii": false} - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}}. IF null or {} then no model specific budget. - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - model_rpm_limit: Optional[dict] - key-specific model rpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific rpm limit. - model_tpm_limit: Optional[dict] - key-specific model tpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific tpm limit. - default_estimated_output_tokens: Optional[int] - Proxy admin only. Expected output tokens reserved for TPM limiting when a request omits max_tokens. Positive integer. Falls back to the team setting, then to the built-in estimate. - default_estimated_output_tokens_per_model: Optional[dict] - Proxy admin only. Per-model override of the above. Example - {"gpt-4": 4096, "gpt-3.5-turbo": 1024}. Takes precedence over the key-wide value. - mcp_rpm_limit: Optional[dict] - key-specific per-MCP-server rpm limit, keyed by MCP server name (alias if set, else the configured name). Example - {"github": 100, "slack": 200}. IF null or {} then no MCP-specific rpm limit. - tag_rpm_limit: Optional[dict] - key-specific per-request-tag rpm limit, keyed by request tag. Example - {"cell-1": 1000, "cell-2": 500}. Each tag gets an independent counter; requests whose tag is absent fall back to the key-level rpm limit. - tpm_limit_type: Optional[str] - Type of tpm limit. Options: "best_effort_throughput" (no error if we're overallocating tpm), "guaranteed_throughput" (raise an error if we're overallocating tpm), "dynamic" (dynamically exceed limit when no 429 errors). Defaults to "best_effort_throughput". - rpm_limit_type: Optional[str] - Type of rpm limit. Options: "best_effort_throughput" (no error if we're overallocating rpm), "guaranteed_throughput" (raise an error if we're overallocating rpm), "dynamic" (dynamically exceed limit when no 429 errors). Defaults to "best_effort_throughput". - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request - blocked: Optional[bool] - Whether the key is blocked. - rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per minute) - tpm_limit: Optional[int] - Specify tpm limit for a given key (Tokens per minute) - soft_budget: Optional[float] - Specify soft budget for a given key. Will trigger a slack alert when this soft budget is reached. - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"] - allowed_passthrough_routes: Optional[list] - List of allowed pass through endpoints for the key. Store the actual endpoint or store a wildcard pattern for a set of endpoints. Example - ["/my-custom-endpoint"]. Use this instead of allowed_routes, if you just want to specify which pass through endpoints the key can access, without specifying the routes. If allowed_routes is specified, allowed_pass_through_endpoints is ignored. - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission. - key_type: Optional[str] - Type of key that determines default allowed routes. Options: "llm_api" (can call LLM API routes), "management" (can call management routes), "read_only" (can only call info/read routes), "default" (uses default allowed routes). Defaults to "default". - prompts: Optional[List[str]] - List of allowed prompts for the key. If specified, the key will only be able to use these specific prompts. - auto_rotate: Optional[bool] - Whether this key should be automatically rotated (regenerated) - rotation_interval: Optional[str] - How often to auto-rotate this key (e.g., '30s', '30m', '30h', '30d'). Required if auto_rotate=True. - allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint. - router_settings: Optional[UpdateRouterConfig] - key-specific router settings. Example - {"model_group_retry_policy": {"gpt-4": {"RateLimitErrorRetries": 5}}}. IF null or {} then no router settings. - access_group_ids: Optional[List[str]] - List of access group IDs to associate with the key. Access groups define which models a key can access. Example - ["access_group_1", "access_group_2"]. - budget_limits: Optional[list] - List of concurrent budget windows for the key. Each window specifies a budget_limit, time_period, and optional budget_duration. Example - [{"budget_limit": 10.0, "time_period": "1d"}, {"budget_limit": 50.0, "time_period": "7d"}]. Examples: 1. Allow users to turn on/off pii masking ```bash curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "permissions": {"allow_pii_controls": true} }' ``` Returns: - key: (str) The generated api key - expires: (datetime) Datetime object for when key expires. - user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id. */
3951
+ export const generateKeyFnKeyGeneratePost: API.OperationMethod<
3952
+ GenerateKeyFnKeyGeneratePostRequest,
3953
+ GenerateKeyResponse,
3954
+ GenerateKeyFnKeyGeneratePostError,
3955
+ LitellmOpContext
3956
+ > = /*@__PURE__*/ API.make(() => ({
3957
+ input: GenerateKeyFnKeyGeneratePostRequest,
3958
+ output: GenerateKeyResponse,
3959
+ errors: [BadRequest, Forbidden, UnprocessableEntity],
3960
+ protocol: LitellmProtocol,
3961
+ retry: Retry.Retry,
3962
+ }));
3963
+
3964
+ export type GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostError =
3965
+ | UnprocessableEntity
3966
+ | LitellmOpError;
3967
+ /** Generate Service Account Key Fn Generate a Service Account API key based on the provided data. This key does not belong to any user. It belongs to the team. Why use a service account key? - Prevent key from being deleted when user is deleted. - Apply team limits, not team member limits to key. Docs: https://docs.litellm.ai/docs/proxy/virtual_keys Parameters: - duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - key_alias: Optional[str] - User defined key alias - key: Optional[str] - User defined key value. Must start with 'sk-' and be at least 16 characters long. If not set, a 16-digit unique sk-key is created for you. - team_id: Optional[str] - The team id of the key - user_id: Optional[str] - [NON-FUNCTIONAL] THIS WILL BE IGNORED. The user id of the key - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) - aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models - config: Optional[dict] - any key-specific configs, overrides config in config.yaml - spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend - send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key - max_budget: Optional[float] - Specify max budget for a given key. - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } - guardrails: Optional[List[str]] - List of active guardrails for the key - permissions: Optional[dict] - key-specific permissions. Currently just used for turning off pii masking (if connected). Example - {"pii": false} - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}}. IF null or {} then no model specific budget. - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - model_rpm_limit: Optional[dict] - key-specific model rpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific rpm limit. - model_tpm_limit: Optional[dict] - key-specific model tpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific tpm limit. - default_estimated_output_tokens: Optional[int] - Proxy admin only. Expected output tokens reserved for TPM limiting when a request omits max_tokens. Positive integer. Falls back to the team setting, then to the built-in estimate. - default_estimated_output_tokens_per_model: Optional[dict] - Proxy admin only. Per-model override of the above. Example - {"gpt-4": 4096, "gpt-3.5-turbo": 1024}. Takes precedence over the key-wide value. - mcp_rpm_limit: Optional[dict] - key-specific per-MCP-server rpm limit, keyed by MCP server name (alias if set, else the configured name). Example - {"github": 100, "slack": 200}. IF null or {} then no MCP-specific rpm limit. - tpm_limit_type: Optional[str] - TPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - rpm_limit_type: Optional[str] - RPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request - blocked: Optional[bool] - Whether the key is blocked. - rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per minute) - tpm_limit: Optional[int] - Specify tpm limit for a given key (Tokens per minute) - soft_budget: Optional[float] - Specify soft budget for a given key. Will trigger a slack alert when this soft budget is reached. - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"] - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission. Examples: - allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint. 1. Allow users to turn on/off pii masking ```bash curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "permissions": {"allow_pii_controls": true} }' ``` Returns: - key: (str) The generated api key - expires: (datetime) Datetime object for when key expires. - user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id. */
3968
+ export const generateServiceAccountKeyFnKeyServiceAccountGeneratePost: API.OperationMethod<
3969
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest,
3970
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse,
3971
+ GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostError,
3972
+ LitellmOpContext
3973
+ > = /*@__PURE__*/ API.make(() => ({
3974
+ input: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostRequest,
3975
+ output: GenerateServiceAccountKeyFnKeyServiceAccountGeneratePostResponse,
3976
+ errors: [UnprocessableEntity],
3977
+ protocol: LitellmProtocol,
3978
+ retry: Retry.Retry,
3979
+ }));
3980
+
3981
+ export type GetInfoKeyFnKeyInfoError = UnprocessableEntity | LitellmOpError;
3982
+ /** Info Key Fn Retrieve information about a key. Parameters: - key: str | None (query parameter) - The key to look up. Accepts the plaintext key or its hash. Defaults to the key in the Authorization header. Returns: - key: str - The key that was looked up, echoed back as it was passed in - info: dict - The key's row, minus the hashed token - key_alias: str | None - User-friendly key alias - spend: float - Amount spent by the key. When budget_duration is set this covers only the current budget window, not the key's lifetime - max_budget: float | None - Max budget for the key, enforced against spend - budget_duration: str | None - Budget reset period ("30d", "1h", etc.) - budget_reset_at: datetime | None - When the current budget window ends and spend is next reset to 0, not when it was last reset. Reset times snap to standard boundaries in the configured timezone (30d and 1mo land on the 1st of the month, 7d on Monday, 1h on the hour), so subtracting budget_duration from it does not give the window's start - model_max_budget: dict - Per-model budgets, e.g. {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - model_max_budget_usage: dict | None - Current-window spend per model, present only when the key has per-model budgets - models: list - Model_name's the key is allowed to call - tpm_limit / rpm_limit: int | None - Tokens and requests per minute limits - metadata: dict - Metadata for the key, e.g. {"team": "core-infra"} - blocked: bool | None - Whether the key is blocked - expires: datetime | None - When the key stops authenticating requests - last_active: datetime | None - When the key was last used - object_permission: dict | None - Resolved vector store / MCP permissions when the key has an object_permission_id Example Curl: ``` curl -X GET "http://0.0.0.0:4000/key/info?key=sk-test-example-key-123" -H "Authorization: Bearer sk-1234" ``` Example Curl - if no key is passed, it will use the Key Passed in Authorization Header ``` curl -X GET "http://0.0.0.0:4000/key/info" -H "Authorization: Bearer sk-test-example-key-123" ``` */
3983
+ export const getInfoKeyFnKeyInfo: API.OperationMethod<
3984
+ GetInfoKeyFnKeyInfoRequest,
3985
+ GetInfoKeyFnKeyInfoResponse,
3986
+ GetInfoKeyFnKeyInfoError,
3987
+ LitellmOpContext
3988
+ > = /*@__PURE__*/ API.make(() => ({
3989
+ input: GetInfoKeyFnKeyInfoRequest,
3990
+ output: GetInfoKeyFnKeyInfoResponse,
3991
+ errors: [UnprocessableEntity],
3992
+ protocol: LitellmProtocol,
3993
+ retry: Retry.Retry,
3994
+ }));
3995
+
3996
+ export type GetKeyAliasesKeyAliasError = UnprocessableEntity | LitellmOpError;
3997
+ /** Key Aliases Lists key aliases with pagination and optional search. Non-admin users only see aliases for keys they own or keys belonging to their teams. Returns: { "aliases": List[str], "total_count": int, "current_page": int, "total_pages": int, "size": int, } */
3998
+ export const getKeyAliasesKeyAlias: API.OperationMethod<
3999
+ GetKeyAliasesKeyAliasRequest,
4000
+ GetKeyAliasesKeyAliasResponse,
4001
+ GetKeyAliasesKeyAliasError,
4002
+ LitellmOpContext
4003
+ > = /*@__PURE__*/ API.make(() => ({
4004
+ input: GetKeyAliasesKeyAliasRequest,
4005
+ output: GetKeyAliasesKeyAliasResponse,
4006
+ errors: [UnprocessableEntity],
4007
+ protocol: LitellmProtocol,
4008
+ retry: Retry.Retry,
4009
+ }));
4010
+
4011
+ export type ListKeysKeyListGetError =
4012
+ | BadRequest
4013
+ | UnprocessableEntity
4014
+ | LitellmOpError;
4015
+ /** List Keys List all keys for a given user / team / organization. Parameters: expand: Optional[List[str]] - Expand related objects (e.g. 'user' to include user information) status: Optional[str] - Filter by status. Currently supports "deleted" to query deleted keys. Returns: { "keys": List[str] or List[UserAPIKeyAuth], "total_count": int, "current_page": int, "total_pages": int, } When expand includes "user", each key object will include a "user" field with the associated user object. Note: When expand=user is specified, full key objects are returned regardless of the return_full_object parameter. */
4016
+ export const listKeysKeyListGet: API.OperationMethod<
4017
+ ListKeysKeyListGetRequest,
4018
+ KeyListResponseObject,
4019
+ ListKeysKeyListGetError,
4020
+ LitellmOpContext
4021
+ > = /*@__PURE__*/ API.make(() => ({
4022
+ input: ListKeysKeyListGetRequest,
4023
+ output: KeyListResponseObject,
4024
+ errors: [BadRequest, UnprocessableEntity],
4025
+ protocol: LitellmProtocol,
4026
+ retry: Retry.Retry,
4027
+ }));
4028
+
4029
+ export type PostBlockKeyKeyBlockError = UnprocessableEntity | LitellmOpError;
4030
+ /** Block Key Block an Virtual key from making any requests. Parameters: - key: str - The key to block. Can be either the unhashed key (sk-...) or the hashed key value Example: ```bash curl --location 'http://0.0.0.0:4000/key/block' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "key": "sk-Fn8Ej39NxjAXrvpUGKghGw" }' ``` Note: This is an admin-only endpoint. Only proxy admins, team admins, or org admins can block keys. */
4031
+ export const postBlockKeyKeyBlock: API.OperationMethod<
4032
+ PostBlockKeyKeyBlockRequest,
4033
+ PostBlockKeyKeyBlockResponse,
4034
+ PostBlockKeyKeyBlockError,
4035
+ LitellmOpContext
4036
+ > = /*@__PURE__*/ API.make(() => ({
4037
+ input: PostBlockKeyKeyBlockRequest,
4038
+ output: PostBlockKeyKeyBlockResponse,
4039
+ errors: [UnprocessableEntity],
4040
+ protocol: LitellmProtocol,
4041
+ retry: Retry.Retry,
4042
+ }));
4043
+
4044
+ export type PostInfoKeyFnV2V2KeyInfoError =
4045
+ | UnprocessableEntity
4046
+ | LitellmOpError;
4047
+ /** Info Key Fn V2 Retrieve information about a list of keys. **New endpoint**. Currently admin only. Parameters: keys: Optional[list] = body parameter representing the key(s) in the request user_api_key_dict: UserAPIKeyAuth = Dependency representing the user's API key Returns: Dict containing the key and its associated information Example Curl: ``` curl -X GET "http://0.0.0.0:4000/key/info" -H "Authorization: Bearer sk-1234" -d {"keys": ["sk-1", "sk-2", "sk-3"]} ``` */
4048
+ export const postInfoKeyFnV2V2KeyInfo: API.OperationMethod<
4049
+ PostInfoKeyFnV2V2KeyInfoRequest,
4050
+ PostInfoKeyFnV2V2KeyInfoResponse,
4051
+ PostInfoKeyFnV2V2KeyInfoError,
4052
+ LitellmOpContext
4053
+ > = /*@__PURE__*/ API.make(() => ({
4054
+ input: PostInfoKeyFnV2V2KeyInfoRequest,
4055
+ output: PostInfoKeyFnV2V2KeyInfoResponse,
4056
+ errors: [UnprocessableEntity],
4057
+ protocol: LitellmProtocol,
4058
+ retry: Retry.Retry,
4059
+ }));
4060
+
4061
+ export type PostKeyHealthKeyHealthError = LitellmOpError;
4062
+ /** Key Health Check the health of the key Checks: - If key based logging is configured correctly - sends a test log Usage Pass the key in the request header ```bash curl -X POST "http://localhost:4000/key/health" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ``` Response when logging callbacks are setup correctly: ```json { "key": "healthy", "logging_callbacks": { "callbacks": [ "gcs_bucket" ], "status": "healthy", "details": "No logger exceptions triggered, system is healthy. Manually check if logs were sent to ['gcs_bucket']" } } ``` Response when logging callbacks are not setup correctly: ```json { "key": "unhealthy", "logging_callbacks": { "callbacks": [ "gcs_bucket" ], "status": "unhealthy", "details": "Logger exceptions triggered, system is unhealthy: Failed to load vertex credentials. Check to see if credentials containing partial/invalid information." } } ``` */
4063
+ export const postKeyHealthKeyHealth: API.OperationMethod<
4064
+ PostKeyHealthKeyHealthRequest,
4065
+ KeyHealthResponse,
4066
+ PostKeyHealthKeyHealthError,
4067
+ LitellmOpContext
4068
+ > = /*@__PURE__*/ API.make(() => ({
4069
+ input: PostKeyHealthKeyHealthRequest,
4070
+ output: KeyHealthResponse,
4071
+ errors: [],
4072
+ protocol: LitellmProtocol,
4073
+ retry: Retry.Retry,
4074
+ }));
4075
+
4076
+ export type RegenerateKeyFnKeyKeyRegeneratePostError =
4077
+ | UnprocessableEntity
4078
+ | LitellmOpError;
4079
+ /** Regenerate Key Fn Regenerate an existing API key while optionally updating its parameters. Parameters: - key: str (path parameter) - The key to regenerate - data: Optional[RegenerateKeyRequest] - Request body containing optional parameters to update - key: Optional[str] - The key to regenerate. - new_master_key: Optional[str] - The new master key to use, if key is the master key. - new_key: Optional[str] - The new key to use, if key is not the master key. Must start with 'sk-' and be at least 16 characters long. If both set, new_master_key will be used. - key_alias: Optional[str] - User-friendly key alias - user_id: Optional[str] - User ID associated with key - team_id: Optional[str] - Team ID associated with key - models: Optional[list] - Model_name's a user is allowed to call - tags: Optional[List[str]] - Tags for organizing keys (Enterprise only) - spend: Optional[float] - Amount spent by key - max_budget: Optional[float] - Max budget for key - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) - soft_budget: Optional[float] - Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached. - max_parallel_requests: Optional[int] - Rate limit for parallel requests - metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"} - tpm_limit: Optional[int] - Tokens per minute limit - rpm_limit: Optional[int] - Requests per minute limit - model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200} - model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000} - allowed_cache_controls: Optional[list] - List of allowed cache control values - duration: Optional[str] - Key validity duration ("30d", "1h", etc.) - permissions: Optional[dict] - Key-specific permissions - guardrails: Optional[List[str]] - List of active guardrails for the key - blocked: Optional[bool] - Whether the key is blocked - grace_period: Optional[str] - Duration to keep old key valid after rotation (e.g. "24h", "2d"). Omitted = immediate revoke. Env: LITELLM_KEY_ROTATION_GRACE_PERIOD Returns: - GenerateKeyResponse containing the new key and its updated parameters Example: ```bash curl --location --request POST 'http://localhost:4000/key/sk-1234/regenerate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ "max_budget": 100, "metadata": {"team": "core-infra"}, "models": ["gpt-4", "gpt-3.5-turbo"] }' ``` Note: This is an Enterprise feature. It requires a premium license to use. */
4080
+ export const regenerateKeyFnKeyKeyRegeneratePost: API.OperationMethod<
4081
+ RegenerateKeyFnKeyKeyRegeneratePostRequest,
4082
+ RegenerateKeyFnKeyKeyRegeneratePostResponse,
4083
+ RegenerateKeyFnKeyKeyRegeneratePostError,
4084
+ LitellmOpContext
4085
+ > = /*@__PURE__*/ API.make(() => ({
4086
+ input: RegenerateKeyFnKeyKeyRegeneratePostRequest,
4087
+ output: RegenerateKeyFnKeyKeyRegeneratePostResponse,
4088
+ errors: [UnprocessableEntity],
4089
+ protocol: LitellmProtocol,
4090
+ retry: Retry.Retry,
4091
+ }));
4092
+
4093
+ export type RegenerateKeyFnKeyRegeneratePostError =
4094
+ | UnprocessableEntity
4095
+ | LitellmOpError;
4096
+ /** Regenerate Key Fn Regenerate an existing API key while optionally updating its parameters. Parameters: - key: str (path parameter) - The key to regenerate - data: Optional[RegenerateKeyRequest] - Request body containing optional parameters to update - key: Optional[str] - The key to regenerate. - new_master_key: Optional[str] - The new master key to use, if key is the master key. - new_key: Optional[str] - The new key to use, if key is not the master key. Must start with 'sk-' and be at least 16 characters long. If both set, new_master_key will be used. - key_alias: Optional[str] - User-friendly key alias - user_id: Optional[str] - User ID associated with key - team_id: Optional[str] - Team ID associated with key - models: Optional[list] - Model_name's a user is allowed to call - tags: Optional[List[str]] - Tags for organizing keys (Enterprise only) - spend: Optional[float] - Amount spent by key - max_budget: Optional[float] - Max budget for key - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) - soft_budget: Optional[float] - Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached. - max_parallel_requests: Optional[int] - Rate limit for parallel requests - metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"} - tpm_limit: Optional[int] - Tokens per minute limit - rpm_limit: Optional[int] - Requests per minute limit - model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200} - model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000} - allowed_cache_controls: Optional[list] - List of allowed cache control values - duration: Optional[str] - Key validity duration ("30d", "1h", etc.) - permissions: Optional[dict] - Key-specific permissions - guardrails: Optional[List[str]] - List of active guardrails for the key - blocked: Optional[bool] - Whether the key is blocked - grace_period: Optional[str] - Duration to keep old key valid after rotation (e.g. "24h", "2d"). Omitted = immediate revoke. Env: LITELLM_KEY_ROTATION_GRACE_PERIOD Returns: - GenerateKeyResponse containing the new key and its updated parameters Example: ```bash curl --location --request POST 'http://localhost:4000/key/sk-1234/regenerate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ "max_budget": 100, "metadata": {"team": "core-infra"}, "models": ["gpt-4", "gpt-3.5-turbo"] }' ``` Note: This is an Enterprise feature. It requires a premium license to use. */
4097
+ export const regenerateKeyFnKeyRegeneratePost: API.OperationMethod<
4098
+ RegenerateKeyFnKeyRegeneratePostRequest,
4099
+ RegenerateKeyFnKeyRegeneratePostResponse,
4100
+ RegenerateKeyFnKeyRegeneratePostError,
4101
+ LitellmOpContext
4102
+ > = /*@__PURE__*/ API.make(() => ({
4103
+ input: RegenerateKeyFnKeyRegeneratePostRequest,
4104
+ output: RegenerateKeyFnKeyRegeneratePostResponse,
4105
+ errors: [UnprocessableEntity],
4106
+ protocol: LitellmProtocol,
4107
+ retry: Retry.Retry,
4108
+ }));
4109
+
4110
+ export type ResetKeySpendFnKeyKeyResetSpendPostError =
4111
+ | UnprocessableEntity
4112
+ | LitellmOpError;
4113
+ /** Reset Key Spend Fn */
4114
+ export const resetKeySpendFnKeyKeyResetSpendPost: API.OperationMethod<
4115
+ ResetKeySpendFnKeyKeyResetSpendPostRequest,
4116
+ ResetKeySpendFnKeyKeyResetSpendPostResponse,
4117
+ ResetKeySpendFnKeyKeyResetSpendPostError,
4118
+ LitellmOpContext
4119
+ > = /*@__PURE__*/ API.make(() => ({
4120
+ input: ResetKeySpendFnKeyKeyResetSpendPostRequest,
4121
+ output: ResetKeySpendFnKeyKeyResetSpendPostResponse,
4122
+ errors: [UnprocessableEntity],
4123
+ protocol: LitellmProtocol,
4124
+ retry: Retry.Retry,
4125
+ }));
4126
+
4127
+ export type UnblockKeyKeyUnblockPostError =
4128
+ | UnprocessableEntity
4129
+ | LitellmOpError;
4130
+ /** Unblock Key Unblock a Virtual key to allow it to make requests again. Parameters: - key: str - The key to unblock. Can be either the unhashed key (sk-...) or the hashed key value Example: ```bash curl --location 'http://0.0.0.0:4000/key/unblock' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "key": "sk-Fn8Ej39NxjAXrvpUGKghGw" }' ``` Note: This is an admin-only endpoint. Only proxy admins, team admins, or org admins can unblock keys. */
4131
+ export const unblockKeyKeyUnblockPost: API.OperationMethod<
4132
+ UnblockKeyKeyUnblockPostRequest,
4133
+ UnblockKeyKeyUnblockPostResponse,
4134
+ UnblockKeyKeyUnblockPostError,
4135
+ LitellmOpContext
4136
+ > = /*@__PURE__*/ API.make(() => ({
4137
+ input: UnblockKeyKeyUnblockPostRequest,
4138
+ output: UnblockKeyKeyUnblockPostResponse,
4139
+ errors: [UnprocessableEntity],
4140
+ protocol: LitellmProtocol,
4141
+ retry: Retry.Retry,
4142
+ }));
4143
+
4144
+ export type UpdateKeyFnKeyUpdatePostError =
4145
+ | BadRequest
4146
+ | Forbidden
4147
+ | NotFound
4148
+ | UnprocessableEntity
4149
+ | LitellmOpError;
4150
+ /** Update Key Fn Update an existing API key's parameters. Parameters: - key: Optional[str] - The key to update. Either key or key_alias must be provided. - key_alias: Optional[str] - User-friendly key alias. If key is omitted, also identifies the key to update (must match exactly one key, same as /key/delete's key_aliases) - user_id: Optional[str] - User ID associated with key - team_id: Optional[str] - Team ID associated with key - agent_id: Optional[str] - The agent id associated with the key. - organization_id: Optional[str] - The organization id of the key. - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. - models: Optional[list] - Model_name's a user is allowed to call - tags: Optional[List[str]] - Tags for organizing keys (Enterprise only) - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) - spend: Optional[float] - Amount spent by key - max_budget: Optional[float] - Max budget for key - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} - budget_fallbacks: Optional[Dict[str, List[str]]] - Per-model fallback chain tried in order when that model's own `model_max_budget` is exceeded, e.g. {"gpt-4o": ["gpt-4o-mini"]}. - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) - soft_budget: Optional[float] - [TODO] Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached. - max_parallel_requests: Optional[int] - Rate limit for parallel requests - metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"} - tpm_limit: Optional[int] - Tokens per minute limit - rpm_limit: Optional[int] - Requests per minute limit - model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200} - mcp_rpm_limit: Optional[dict] - Per-MCP-server RPM limits, keyed by MCP server name {"github": 100, "slack": 200} - tag_rpm_limit: Optional[dict] - Per-request-tag RPM limits, keyed by request tag {"cell-1": 1000, "cell-2": 500}. Each tag gets an independent counter; absent tags fall back to the key-level rpm limit. - model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000} - default_estimated_output_tokens: Optional[int] - Proxy admin only. Expected output tokens reserved for TPM limiting when a request omits max_tokens. Positive integer. - default_estimated_output_tokens_per_model: Optional[dict] - Proxy admin only. Per-model override of the above {"gpt-4": 4096, "gpt-3.5-turbo": 1024} - tpm_limit_type: Optional[str] - TPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - rpm_limit_type: Optional[str] - RPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic" - allowed_cache_controls: Optional[list] - List of allowed cache control values - duration: Optional[str] - Key validity duration ("30d", "1h", etc.), null to never expire, or "-1" to never expire (deprecated, use null) - permissions: Optional[dict] - Key-specific permissions - send_invite_email: Optional[bool] - Send invite email to user_id - guardrails: Optional[List[str]] - List of active guardrails for the key - policies: Optional[List[str]] - List of policy names to apply to the key. Policies define guardrails, conditions, and inheritance rules. - disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key. - throttle_on_budget_exceeded: Optional[bool] - When the key exceeds its max_budget, throttle its tpm/rpm to the global budget_exceeded_throttle_percentage instead of blocking the key entirely. - enable_prompt_caching: Optional[bool] - Auto-inject prompt caching breakpoints (Anthropic cache_control markers) on requests made with this key. Anthropic and Bedrock Claude models only. - prompts: Optional[List[str]] - List of prompts that the key is allowed to use. - blocked: Optional[bool] - Whether the key is blocked - aliases: Optional[dict] - Model aliases for the key - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases) - config: Optional[dict] - [DEPRECATED PARAM] Key-specific config. - temp_budget_increase: Optional[float] - Temporary budget increase for the key (Enterprise only). - temp_budget_expiry: Optional[str] - Expiry time for the temporary budget increase (Enterprise only). - allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"] - allowed_passthrough_routes: Optional[list] - List of allowed pass through routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/my-custom-endpoint"]. Use this instead of allowed_routes, if you just want to specify which pass through routes the key can access, without specifying the routes. If allowed_routes is specified, allowed_passthrough_routes is ignored. - prompts: Optional[List[str]] - List of allowed prompts for the key. If specified, the key will only be able to use these specific prompts. - object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission. - auto_rotate: Optional[bool] - Whether this key should be automatically rotated - rotation_interval: Optional[str] - How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True - allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint. - router_settings: Optional[UpdateRouterConfig] - key-specific router settings. Example - {"model_group_retry_policy": {"gpt-4": {"RateLimitErrorRetries": 5}}}. IF null or {} then no router settings. - access_group_ids: Optional[List[str]] - List of access group IDs to associate with the key. Access groups define which models a key can access. Example - ["access_group_1", "access_group_2"]. - budget_limits: Optional[list] - List of concurrent budget windows for the key. Each window specifies a budget_limit, time_period, and optional budget_duration. Example - [{"budget_limit": 10.0, "time_period": "1d"}, {"budget_limit": 50.0, "time_period": "7d"}]. Example: ```bash curl --location 'http://0.0.0.0:4000/key/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ "key": "sk-1234", "key_alias": "my-key", "user_id": "user-1234", "team_id": "team-1234", "max_budget": 100, "metadata": {"any_key": "any-val"}, }' ``` */
4151
+ export const updateKeyFnKeyUpdatePost: API.OperationMethod<
4152
+ UpdateKeyFnKeyUpdatePostRequest,
4153
+ UpdateKeyFnKeyUpdatePostResponse,
4154
+ UpdateKeyFnKeyUpdatePostError,
4155
+ LitellmOpContext
4156
+ > = /*@__PURE__*/ API.make(() => ({
4157
+ input: UpdateKeyFnKeyUpdatePostRequest,
4158
+ output: UpdateKeyFnKeyUpdatePostResponse,
4159
+ errors: [BadRequest, Forbidden, NotFound, UnprocessableEntity],
4160
+ protocol: LitellmProtocol,
4161
+ retry: Retry.Retry,
4162
+ }));