@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
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # @homeflare/distilled-litellm
2
+
3
+ This package is **not a HomeFlare SDK**. It is an unmodified copy of
4
+ `@distilled.cloud/litellm`, generated by the [distilled](https://github.com/alchemy-run/distilled)
5
+ pipeline from the LiteLLM Proxy's own `app.openapi()` document at tag
6
+ `v1.100.0`, published here under its own name only because
7
+ `@distilled.cloud/litellm` does not exist on npm yet — the kit builds it in a
8
+ local clone of `alchemy-run/distilled` but, per house policy, never pushes to
9
+ that upstream. See
10
+ [`../alchemy/docs/distilled-interim.md`](../alchemy/docs/distilled-interim.md)
11
+ for the full route every distilled-sourced vendor package follows, and why
12
+ this one exists at all.
13
+
14
+ ⛔ **Do not hand-edit anything under `src/`.** The whole point of the route
15
+ above is that this directory is _copied_, not written — a fix belongs in the
16
+ distilled clone's `packages/litellm/`, regenerated, then copied back here.
17
+
18
+ ⚠️ **License.** Apache-2.0, not the kit's usual MIT — this content is a
19
+ redistribution of `alchemy-run/distilled`'s own Apache-2.0-licensed output,
20
+ and relicensing a copy would misstate what it is. See `LICENSE`.
21
+
22
+ ## What's in it
23
+
24
+ 105 service modules, one per LiteLLM Proxy OpenAPI tag — `model_management`,
25
+ `key_management`, `team_management`, `internal_user_management`,
26
+ `budget_management`, `misc` (the untagged `/config/pass_through_endpoint*`
27
+ family and other UI/debug/login/MCP routes), and every other admin/inference
28
+ tag LiteLLM's own API reference groups by (928 operations total). Every
29
+ operation gets an Effect-typed, `catchTag`-able error for every status the
30
+ spec declares, plus the undeclared `400`/`403`/`404`/`409` responses this
31
+ package's own source-reading found on the primary CRUD routes of the five
32
+ admin tags above (`patches/{budget,key,team,internal_user,model}_management/*.json`
33
+ — each patch cites the exact pinned-source file:line it is grounded in; see
34
+ `../../litellm/docs/errors.md` in the distilled clone for the full account).
35
+ `GenerateKeyResponse.key` and `NewUserResponse.key` — the literal virtual-key
36
+ value `/key/generate`, `/key/regenerate` and `/user/new` return — decode to
37
+ `Redacted.Redacted<string>` rather than a plain `string`.
38
+
39
+ ```ts
40
+ import * as Litellm from '@distilled.cloud/litellm'; // aliased onto this package — see docs/distilled-interim.md
41
+ import * as Effect from 'effect/Effect';
42
+
43
+ const program = Litellm.Services.keyManagement
44
+ .generateKeyFnKeyGeneratePost({ key_alias: 'my-service' })
45
+ .pipe(
46
+ Effect.provide(Litellm.LitellmProtocol),
47
+ Effect.provide(Litellm.credentials({ apiKey: '...', baseUrl: 'https://litellm.example.com' })),
48
+ );
49
+ ```
50
+
51
+ Kit code never imports `@homeflare/distilled-litellm` directly — always
52
+ `@distilled.cloud/litellm`, aliased in the consuming package's `package.json`
53
+ (`"@distilled.cloud/litellm": "npm:@homeflare/distilled-litellm@<version>"`),
54
+ so the eventual cutover to the real published package is a one-line alias
55
+ swap with no import changes anywhere in the kit.
56
+
57
+ ## Updating it
58
+
59
+ From the distilled clone's `homeflare/litellm` worktree:
60
+
61
+ ```sh
62
+ DISTILLED_SPECS_LOCAL=1 pnpm --filter @distilled.cloud/litellm run generate
63
+ pnpm --filter @distilled.cloud/litellm run typecheck
64
+ pnpm format && pnpm specs:check
65
+ ```
66
+
67
+ Then copy `src/` here verbatim, bump this package's own `version` (a patch
68
+ release — the generated content changed, not this package's own shape), add
69
+ a changeset, and let the kit's normal release flow publish it.
70
+
71
+ ## License
72
+
73
+ Apache-2.0 (see `LICENSE`) — not the kit's usual MIT. `src/` is an
74
+ unmodified copy of `@distilled.cloud/litellm`'s own output from
75
+ `alchemy-run/distilled`, which is itself Apache-2.0; this package's own
76
+ files (`package.json`, `tsconfig.json`, `scripts/smoke.ts`, this README)
77
+ are offered under the same terms.
@@ -0,0 +1,27 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
4
+ import * as Redacted from "effect/Redacted";
5
+ export interface Config {
6
+ readonly apiKey: Redacted.Redacted<string>;
7
+ /** The proxy's origin, trailing slash stripped. No default — see the header. */
8
+ readonly apiBaseUrl: string;
9
+ }
10
+ declare const Credentials_base: Context.ServiceClass<Credentials, "LitellmCredentials", Effect.Effect<Config, never, never>>;
11
+ export declare class Credentials extends Credentials_base {
12
+ }
13
+ export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
14
+ /**
15
+ * Convenience layer from a plain key and the proxy's origin.
16
+ *
17
+ * ⛔ THE KEY IS NEVER A PROP (house rule, S25 — Alchemy persists attributes
18
+ * unencrypted). A caller building this layer from a stack should read the
19
+ * key fresh from the environment/a secret store, never from committed
20
+ * state.
21
+ */
22
+ export declare const credentials: (config: {
23
+ readonly apiKey: string | Redacted.Redacted<string>;
24
+ readonly baseUrl: string;
25
+ }) => Layer.Layer<Credentials>;
26
+ export {};
27
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAG5C,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,gFAAgF;IAChF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAGR;CAAG;AAqB5B,eAAO,MAAM,kBAAkB,wCAgB9B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,WAAY;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAUxB,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * LiteLLM credentials — hand-written.
3
+ *
4
+ * The `Credentials` service resolves `{ apiKey, apiBaseUrl }` per request;
5
+ * the protocol layer formats the `Authorization: Bearer <apiKey>` header
6
+ * from it.
7
+ *
8
+ * LiteLLM Proxy is self-hosted, so — like Forgejo, and unlike a
9
+ * single-tenant SaaS — there is no default API root: the instance URL is
10
+ * part of the credential. `apiKey` is either the proxy's own master key
11
+ * (`general_settings.master_key` / `LITELLM_MASTER_KEY`) or a virtual key
12
+ * with the `proxy_admin` role — every `/key`, `/team`, `/user`, `/budget`,
13
+ * `/model` and `/config` mutation this package's services reach requires
14
+ * `user_api_key_dict.user_role == PROXY_ADMIN`
15
+ * (`litellm/proxy/auth/user_api_key_auth.py`, `proxy_server.py`'s
16
+ * `update_config_general_settings` at tag `v1.100.0` — see `protocol.ts`).
17
+ * A read-scoped virtual key can call the list/info GETs but every mutation
18
+ * answers `401` (LiteLLM does not distinguish "wrong key" from
19
+ * "right key, wrong role" — see `errors.ts`).
20
+ */
21
+ import * as EffectConfig from "effect/Config";
22
+ import * as Context from "effect/Context";
23
+ import * as Effect from "effect/Effect";
24
+ import * as Layer from "effect/Layer";
25
+ import * as Redacted from "effect/Redacted";
26
+ import { ConfigError } from "@distilled.cloud/core/errors";
27
+ export class Credentials extends Context.Service()("LitellmCredentials") {
28
+ }
29
+ const normalizeBaseUrl = (baseUrl) => {
30
+ // Linear on purpose: a `/\/+$/` regex backtracks polynomially on a long run of
31
+ // "/" that is not at the end (CodeQL js/polynomial-redos, the same defect
32
+ // NetBox's and Paperless-ngx's sibling SDKs already fixed for this identical
33
+ // helper), and this is caller input.
34
+ let end = baseUrl.length;
35
+ while (end > 0 && baseUrl.charCodeAt(end - 1) === 47)
36
+ end--;
37
+ return baseUrl.slice(0, end);
38
+ };
39
+ const envConfig = EffectConfig.all({
40
+ // `LITELLM_PROXY_URL` / `LITELLM_PROXY_API_KEY` are the names LiteLLM's
41
+ // own `litellm` CLI client reads (`litellm/proxy/client/cli/main.py` at
42
+ // the tag) — using the vendor's own names means a consumer who already
43
+ // has a `.env` for the `litellm` CLI needs nothing new for this package.
44
+ apiKey: EffectConfig.String("LITELLM_PROXY_API_KEY"),
45
+ baseUrl: EffectConfig.String("LITELLM_PROXY_URL"),
46
+ });
47
+ export const CredentialsFromEnv = Layer.succeed(Credentials, envConfig.pipe(Effect.mapError(() => new ConfigError({
48
+ message: "LITELLM_PROXY_URL and LITELLM_PROXY_API_KEY environment variables are required",
49
+ })), Effect.map(({ apiKey, baseUrl }) => ({
50
+ apiKey: Redacted.make(apiKey),
51
+ apiBaseUrl: normalizeBaseUrl(baseUrl),
52
+ })), Effect.orDie));
53
+ /**
54
+ * Convenience layer from a plain key and the proxy's origin.
55
+ *
56
+ * ⛔ THE KEY IS NEVER A PROP (house rule, S25 — Alchemy persists attributes
57
+ * unencrypted). A caller building this layer from a stack should read the
58
+ * key fresh from the environment/a secret store, never from committed
59
+ * state.
60
+ */
61
+ export const credentials = (config) => Layer.succeed(Credentials, Effect.succeed({
62
+ apiKey: typeof config.apiKey === "string"
63
+ ? Redacted.make(config.apiKey)
64
+ : config.apiKey,
65
+ apiBaseUrl: normalizeBaseUrl(config.baseUrl),
66
+ }));
67
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAQ3D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAG7C,CAAC,oBAAoB,CAAC;CAAG;AAE5B,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAU,EAAE;IACnD,+EAA+E;IAC/E,0EAA0E;IAC1E,6EAA6E;IAC7E,qCAAqC;IACrC,IAAI,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IACzB,OAAO,GAAG,GAAG,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,CAAC;IAC5D,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC;IACjC,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,yEAAyE;IACzE,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,uBAAuB,CAAC;IACpD,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,mBAAmB,CAAC;CAClD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAC7C,WAAW,EACX,SAAS,CAAC,IAAI,CACZ,MAAM,CAAC,QAAQ,CACb,GAAG,EAAE,CACH,IAAI,WAAW,CAAC;IACd,OAAO,EACL,gFAAgF;CACnF,CAAC,CACL,EACD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;IACnC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;IAC7B,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC;CACtC,CAAC,CAAC,EACH,MAAM,CAAC,KAAK,CACb,CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAG3B,EAA4B,EAAE,CAC7B,KAAK,CAAC,OAAO,CACX,WAAW,EACX,MAAM,CAAC,OAAO,CAAC;IACb,MAAM,EACJ,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;QAC/B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAC9B,CAAC,CAAC,MAAM,CAAC,MAAM;IACnB,UAAU,EAAE,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC;CAC7C,CAAC,CACH,CAAC"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * LiteLLM-specific error types.
3
+ *
4
+ * Re-exports the common HTTP errors from core and adds the LiteLLM-specific
5
+ * unknown-error and parse-error wrappers.
6
+ *
7
+ * LiteLLM Proxy's failure envelope is genuinely heterogeneous — measured
8
+ * against the pinned `v1.100.0` source, NOT assumed from the spec (whose own
9
+ * `ErrorResponse` schema names only one of the real shapes). A `ProxyException`
10
+ * (`proxy_server.py`'s `openai_exception_handler` at the tag, the path a
11
+ * `router.py` "no healthy deployment" style failure funnels through) answers
12
+ * a BARE `{"error": {"message", "type", "param", "code"}}` — no `detail`
13
+ * wrapper at all. Plain FastAPI `HTTPException(status_code, detail=...)` —
14
+ * the dominant pattern across every `/key`, `/team`, `/user`, `/budget`,
15
+ * `/model` and `/config` route in `management_endpoints/*.py` — answers
16
+ * `{"detail": "<string>"}` OR `{"detail": {"error": ..., "message"?: ...}}`,
17
+ * NOT the `{"detail": [...]}` array `RequestValidationError` uses for 422
18
+ * (see `HTTPValidationError`/`ValidationError` in the vendor spec, decoded
19
+ * by core's shared `UnprocessableEntity`). See `protocol.ts`'s
20
+ * `errorEnvelope`/`messageFrom` for the exact extraction order — a sibling
21
+ * `message` field always wins over a short `error` code, verified against
22
+ * `litellm_pre_call_utils.py`'s `reject_url_valued_destination`. There is no
23
+ * machine-readable code on most routes (LiteLLM's own `code` field is
24
+ * usually the stringified status, e.g. `"400"`), so the SDK dispatches on
25
+ * the HTTP status: the per-operation classes generated from each
26
+ * operation's declared responses first, then core's shared status map, then
27
+ * {@link UnknownLitellmError}.
28
+ *
29
+ * ⛔ The vendor's own OpenAPI document (`litellm-openapi` @ 1.100.0, dumped
30
+ * by the vendor's own `gen-api-types.mjs` — see `scripts/convert.ts`)
31
+ * declares almost NO error responses beyond the FastAPI-automatic `422` —
32
+ * measured across all 696 paths, the only per-operation `400`/`401`/`403`/
33
+ * `404`/`408`/`429`/`500`/`503` declarations anywhere outside the
34
+ * `/openai/deployments/{model}/chat/completions` LLM-passthrough route are
35
+ * `GET /audit/{id}`'s `404`/`500` (both already in the spec — no patch
36
+ * needed). None of the admin surface this package's tag split covers
37
+ * (`model_management`, `key_management`, `team_management`,
38
+ * `internal_user_management`, `budget_management`, the untagged
39
+ * `/config/pass_through_endpoint*` family) declares anything beyond `422`.
40
+ * `401`/`429`/`500`/`502`/`503`/`504` still typecheck on every operation —
41
+ * they ride the shared `LitellmOpError` union via core's
42
+ * `DEFAULT_ERROR_STATUSES` (see `protocol.ts`) — but a status OUTSIDE that
43
+ * default set (`400`, `403`, `404`, `409`, `423`) that the spec doesn't
44
+ * declare for a given operation would decode correctly at runtime (core's
45
+ * shared `HTTP_STATUS_MAP` fallback in `protocol-rest.ts` still maps it) but
46
+ * NOT appear in that operation's TypeScript error union — an untyped escape
47
+ * the Typed Error Doctrine exists to catch. `patches/misc/…json` fixes the
48
+ * one such case this package has vendor-source evidence for (see its own
49
+ * comment); the rest of the admin surface is unverified beyond the spec —
50
+ * see this package's README.
51
+ */
52
+ export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
53
+ import type { DefaultErrors as CoreDefaultErrors } from "@distilled.cloud/core/errors";
54
+ import * as Schema from "effect/Schema";
55
+ declare const UnknownLitellmError_base: Schema.Class<UnknownLitellmError, Schema.TaggedStruct<"UnknownLitellmError", {
56
+ readonly code: Schema.optional<Schema.String>;
57
+ readonly message: Schema.optional<Schema.String>;
58
+ readonly body: Schema.Unknown;
59
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
60
+ "@distilled.cloud/error/categories": {
61
+ ServerError: true;
62
+ };
63
+ });
64
+ /**
65
+ * Unknown LiteLLM error — returned when a failed response's HTTP status has
66
+ * no mapped error class, or the body doesn't match the `ProxyException`
67
+ * envelope. Carries the raw body for later cataloging.
68
+ */
69
+ export declare class UnknownLitellmError extends UnknownLitellmError_base {
70
+ }
71
+ declare const LitellmParseError_base: Schema.Class<LitellmParseError, Schema.TaggedStruct<"LitellmParseError", {
72
+ readonly body: Schema.Unknown;
73
+ readonly cause: Schema.Unknown;
74
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
75
+ "@distilled.cloud/error/categories": {
76
+ ParseError: true;
77
+ };
78
+ });
79
+ /** Schema parse error wrapper. */
80
+ export declare class LitellmParseError extends LitellmParseError_base {
81
+ }
82
+ /**
83
+ * Errors any LiteLLM operation may surface in addition to the per-operation
84
+ * typed status errors.
85
+ */
86
+ export type ClientErrors = UnknownLitellmError | LitellmParseError;
87
+ /**
88
+ * Default LiteLLM operation errors: the shared HTTP status errors from core
89
+ * plus the client-level fallback/decode errors.
90
+ */
91
+ export type DefaultErrors = CoreDefaultErrors | ClientErrors;
92
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAGxC;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,wBAOT;CAAG;;;;;;;;;AAEnC,kCAAkC;AAClC,qBAAa,iBAAkB,SAAQ,sBAMR;CAAG;AAElC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,YAAY,CAAC"}
package/dist/errors.js ADDED
@@ -0,0 +1,72 @@
1
+ /**
2
+ * LiteLLM-specific error types.
3
+ *
4
+ * Re-exports the common HTTP errors from core and adds the LiteLLM-specific
5
+ * unknown-error and parse-error wrappers.
6
+ *
7
+ * LiteLLM Proxy's failure envelope is genuinely heterogeneous — measured
8
+ * against the pinned `v1.100.0` source, NOT assumed from the spec (whose own
9
+ * `ErrorResponse` schema names only one of the real shapes). A `ProxyException`
10
+ * (`proxy_server.py`'s `openai_exception_handler` at the tag, the path a
11
+ * `router.py` "no healthy deployment" style failure funnels through) answers
12
+ * a BARE `{"error": {"message", "type", "param", "code"}}` — no `detail`
13
+ * wrapper at all. Plain FastAPI `HTTPException(status_code, detail=...)` —
14
+ * the dominant pattern across every `/key`, `/team`, `/user`, `/budget`,
15
+ * `/model` and `/config` route in `management_endpoints/*.py` — answers
16
+ * `{"detail": "<string>"}` OR `{"detail": {"error": ..., "message"?: ...}}`,
17
+ * NOT the `{"detail": [...]}` array `RequestValidationError` uses for 422
18
+ * (see `HTTPValidationError`/`ValidationError` in the vendor spec, decoded
19
+ * by core's shared `UnprocessableEntity`). See `protocol.ts`'s
20
+ * `errorEnvelope`/`messageFrom` for the exact extraction order — a sibling
21
+ * `message` field always wins over a short `error` code, verified against
22
+ * `litellm_pre_call_utils.py`'s `reject_url_valued_destination`. There is no
23
+ * machine-readable code on most routes (LiteLLM's own `code` field is
24
+ * usually the stringified status, e.g. `"400"`), so the SDK dispatches on
25
+ * the HTTP status: the per-operation classes generated from each
26
+ * operation's declared responses first, then core's shared status map, then
27
+ * {@link UnknownLitellmError}.
28
+ *
29
+ * ⛔ The vendor's own OpenAPI document (`litellm-openapi` @ 1.100.0, dumped
30
+ * by the vendor's own `gen-api-types.mjs` — see `scripts/convert.ts`)
31
+ * declares almost NO error responses beyond the FastAPI-automatic `422` —
32
+ * measured across all 696 paths, the only per-operation `400`/`401`/`403`/
33
+ * `404`/`408`/`429`/`500`/`503` declarations anywhere outside the
34
+ * `/openai/deployments/{model}/chat/completions` LLM-passthrough route are
35
+ * `GET /audit/{id}`'s `404`/`500` (both already in the spec — no patch
36
+ * needed). None of the admin surface this package's tag split covers
37
+ * (`model_management`, `key_management`, `team_management`,
38
+ * `internal_user_management`, `budget_management`, the untagged
39
+ * `/config/pass_through_endpoint*` family) declares anything beyond `422`.
40
+ * `401`/`429`/`500`/`502`/`503`/`504` still typecheck on every operation —
41
+ * they ride the shared `LitellmOpError` union via core's
42
+ * `DEFAULT_ERROR_STATUSES` (see `protocol.ts`) — but a status OUTSIDE that
43
+ * default set (`400`, `403`, `404`, `409`, `423`) that the spec doesn't
44
+ * declare for a given operation would decode correctly at runtime (core's
45
+ * shared `HTTP_STATUS_MAP` fallback in `protocol-rest.ts` still maps it) but
46
+ * NOT appear in that operation's TypeScript error union — an untyped escape
47
+ * the Typed Error Doctrine exists to catch. `patches/misc/…json` fixes the
48
+ * one such case this package has vendor-source evidence for (see its own
49
+ * comment); the rest of the admin surface is unverified beyond the spec —
50
+ * see this package's README.
51
+ */
52
+ export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
53
+ import * as Schema from "effect/Schema";
54
+ import * as Category from "@distilled.cloud/core/category";
55
+ /**
56
+ * Unknown LiteLLM error — returned when a failed response's HTTP status has
57
+ * no mapped error class, or the body doesn't match the `ProxyException`
58
+ * envelope. Carries the raw body for later cataloging.
59
+ */
60
+ export class UnknownLitellmError extends Schema.TaggedError()("UnknownLitellmError", {
61
+ code: Schema.optional(Schema.String),
62
+ message: Schema.optional(Schema.String),
63
+ body: Schema.Unknown,
64
+ }).pipe(Category.withServerError) {
65
+ }
66
+ /** Schema parse error wrapper. */
67
+ export class LitellmParseError extends Schema.TaggedError()("LitellmParseError", {
68
+ body: Schema.Unknown,
69
+ cause: Schema.Unknown,
70
+ }).pipe(Category.withParseError) {
71
+ }
72
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,MAAM,CAAC,WAAW,EAAuB,CAChF,qBAAqB,EACrB;IACE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC,OAAO;CACrB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;CAAG;AAEnC,kCAAkC;AAClC,MAAM,OAAO,iBAAkB,SAAQ,MAAM,CAAC,WAAW,EAAqB,CAC5E,mBAAmB,EACnB;IACE,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO;CACtB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @distilled.cloud/litellm — LiteLLM Proxy admin API SDK for Effect.
3
+ *
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy models in
5
+ * `.generated-specs` (written by `scripts/convert.ts` from LiteLLM's pinned
6
+ * `app.openapi()` document, tag v1.100.0 — see README.md). Everything else
7
+ * in this folder is hand-written.
8
+ *
9
+ * One module per LiteLLM OpenAPI tag — `model_management`, `key_management`,
10
+ * `team_management`, `internal_user_management`, `budget_management`,
11
+ * `misc` (the untagged `/config/pass_through_endpoint*` family and other
12
+ * UI/debug/login/MCP routes), … — the same split LiteLLM's own API
13
+ * reference groups by. See README.md for the full tag → admin-surface map.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import * as Litellm from "@distilled.cloud/litellm";
18
+ *
19
+ * const key = yield* Litellm.Services.keyManagement.generateKeyFn({
20
+ * key_alias: "my-service",
21
+ * });
22
+ * ```
23
+ */
24
+ export * from "./credentials.ts";
25
+ export * from "./errors.ts";
26
+ export * as T from "./traits.ts";
27
+ export { LitellmProtocol, type LitellmOpError, type LitellmOpContext, } from "./protocol.ts";
28
+ export * as Retry from "./retry.ts";
29
+ export * as Services from "./services/index.ts";
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @distilled.cloud/litellm — LiteLLM Proxy admin API SDK for Effect.
3
+ *
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy models in
5
+ * `.generated-specs` (written by `scripts/convert.ts` from LiteLLM's pinned
6
+ * `app.openapi()` document, tag v1.100.0 — see README.md). Everything else
7
+ * in this folder is hand-written.
8
+ *
9
+ * One module per LiteLLM OpenAPI tag — `model_management`, `key_management`,
10
+ * `team_management`, `internal_user_management`, `budget_management`,
11
+ * `misc` (the untagged `/config/pass_through_endpoint*` family and other
12
+ * UI/debug/login/MCP routes), … — the same split LiteLLM's own API
13
+ * reference groups by. See README.md for the full tag → admin-surface map.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import * as Litellm from "@distilled.cloud/litellm";
18
+ *
19
+ * const key = yield* Litellm.Services.keyManagement.generateKeyFn({
20
+ * key_alias: "my-service",
21
+ * });
22
+ * ```
23
+ */
24
+ export * from "./credentials.js";
25
+ export * from "./errors.js";
26
+ export * as T from "./traits.js";
27
+ export { LitellmProtocol, } from "./protocol.js";
28
+ export * as Retry from "./retry.js";
29
+ export * as Services from "./services/index.js";
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,eAAe,GAGhB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type * as Layer from "effect/Layer";
2
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
3
+ import type * as HttpClientError from "effect/unstable/http/HttpClientError";
4
+ import type * as API from "@distilled.cloud/core/api";
5
+ import type { ConfigError } from "@distilled.cloud/core/errors";
6
+ import { Credentials } from "./credentials.ts";
7
+ import { type DefaultErrors } from "./errors.ts";
8
+ /**
9
+ * Error channel shared by every generated LiteLLM operation. Generated
10
+ * service files annotate operations with `API.OperationMethod<I, O,
11
+ * LitellmOpError, LitellmOpContext>` explicitly so the compiler never
12
+ * infers these back out of the schema generics.
13
+ */
14
+ export type LitellmOpError = DefaultErrors | ConfigError | HttpClientError.HttpClientError;
15
+ /** Context (requirements) shared by every generated LiteLLM operation. */
16
+ export type LitellmOpContext = Credentials | HttpClient.HttpClient;
17
+ export declare const LitellmProtocol: Layer.Layer<API.Protocol>;
18
+ //# sourceMappingURL=protocol.d.ts.map