@meetkai/mka1 0.55.25 → 0.55.27

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 (368) hide show
  1. package/README.md +410 -410
  2. package/bin/mcp-server.js +2373 -1975
  3. package/bin/mcp-server.js.map +36 -32
  4. package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.d.ts +2 -0
  5. package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.js +2 -0
  7. package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.js.map +1 -1
  8. package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.d.ts +2 -0
  9. package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.js +2 -0
  11. package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.js.map +1 -1
  12. package/dist/commonjs/funcs/billingGetOrganizationBilling.d.ts +2 -0
  13. package/dist/commonjs/funcs/billingGetOrganizationBilling.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/billingGetOrganizationBilling.js +2 -0
  15. package/dist/commonjs/funcs/billingGetOrganizationBilling.js.map +1 -1
  16. package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.d.ts +2 -0
  17. package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.d.ts.map +1 -1
  18. package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.js +2 -0
  19. package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.js.map +1 -1
  20. package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.d.ts +2 -0
  21. package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.d.ts.map +1 -1
  22. package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.js +2 -0
  23. package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.js.map +1 -1
  24. package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.d.ts +2 -0
  25. package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.d.ts.map +1 -1
  26. package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.js +2 -0
  27. package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.js.map +1 -1
  28. package/dist/commonjs/funcs/llmAuditGetRequestTrace.d.ts +19 -0
  29. package/dist/commonjs/funcs/llmAuditGetRequestTrace.d.ts.map +1 -0
  30. package/dist/commonjs/funcs/llmAuditGetRequestTrace.js +132 -0
  31. package/dist/commonjs/funcs/llmAuditGetRequestTrace.js.map +1 -0
  32. package/dist/commonjs/lib/config.d.ts +2 -2
  33. package/dist/commonjs/lib/config.js +2 -2
  34. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  35. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  36. package/dist/commonjs/mcp-server/server.js +3 -1
  37. package/dist/commonjs/mcp-server/server.js.map +1 -1
  38. package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingPortal.d.ts.map +1 -1
  39. package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingPortal.js +1 -1
  40. package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingPortal.js.map +1 -1
  41. package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingSetup.d.ts.map +1 -1
  42. package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingSetup.js +1 -1
  43. package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingSetup.js.map +1 -1
  44. package/dist/commonjs/mcp-server/tools/billingGetOrganizationBilling.d.ts.map +1 -1
  45. package/dist/commonjs/mcp-server/tools/billingGetOrganizationBilling.js +1 -1
  46. package/dist/commonjs/mcp-server/tools/billingGetOrganizationBilling.js.map +1 -1
  47. package/dist/commonjs/mcp-server/tools/billingListOrganizationBillingInvoices.d.ts.map +1 -1
  48. package/dist/commonjs/mcp-server/tools/billingListOrganizationBillingInvoices.js +1 -1
  49. package/dist/commonjs/mcp-server/tools/billingListOrganizationBillingInvoices.js.map +1 -1
  50. package/dist/commonjs/mcp-server/tools/billingSetOrganizationBillingEnabled.d.ts.map +1 -1
  51. package/dist/commonjs/mcp-server/tools/billingSetOrganizationBillingEnabled.js +1 -1
  52. package/dist/commonjs/mcp-server/tools/billingSetOrganizationBillingEnabled.js.map +1 -1
  53. package/dist/commonjs/mcp-server/tools/billingUpdateOrganizationBillingProfile.d.ts.map +1 -1
  54. package/dist/commonjs/mcp-server/tools/billingUpdateOrganizationBillingProfile.js +1 -1
  55. package/dist/commonjs/mcp-server/tools/billingUpdateOrganizationBillingProfile.js.map +1 -1
  56. package/dist/commonjs/mcp-server/tools/llmAuditGetRequestTrace.d.ts +8 -0
  57. package/dist/commonjs/mcp-server/tools/llmAuditGetRequestTrace.d.ts.map +1 -0
  58. package/dist/commonjs/mcp-server/tools/llmAuditGetRequestTrace.js +64 -0
  59. package/dist/commonjs/mcp-server/tools/llmAuditGetRequestTrace.js.map +1 -0
  60. package/dist/commonjs/models/components/banwordsguardrail.d.ts +27 -0
  61. package/dist/commonjs/models/components/banwordsguardrail.d.ts.map +1 -1
  62. package/dist/commonjs/models/components/banwordsguardrail.js +21 -1
  63. package/dist/commonjs/models/components/banwordsguardrail.js.map +1 -1
  64. package/dist/commonjs/models/components/classifierguardrail.d.ts +27 -0
  65. package/dist/commonjs/models/components/classifierguardrail.d.ts.map +1 -1
  66. package/dist/commonjs/models/components/classifierguardrail.js +21 -1
  67. package/dist/commonjs/models/components/classifierguardrail.js.map +1 -1
  68. package/dist/commonjs/models/components/clusterdefaultrulesummary.d.ts +21 -0
  69. package/dist/commonjs/models/components/clusterdefaultrulesummary.d.ts.map +1 -1
  70. package/dist/commonjs/models/components/clusterdefaultrulesummary.js +16 -1
  71. package/dist/commonjs/models/components/clusterdefaultrulesummary.js.map +1 -1
  72. package/dist/commonjs/models/components/createvectorstorerequest.d.ts +1 -1
  73. package/dist/commonjs/models/components/embeddingmodellimits.d.ts +5 -5
  74. package/dist/commonjs/models/components/embeddingmodellimits.d.ts.map +1 -1
  75. package/dist/commonjs/models/components/embeddingmodellimits.js +6 -6
  76. package/dist/commonjs/models/components/embeddingmodellimits.js.map +1 -1
  77. package/dist/commonjs/models/components/embeddingsrequest.d.ts +1 -1
  78. package/dist/commonjs/models/components/index.d.ts +1 -0
  79. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  80. package/dist/commonjs/models/components/index.js +1 -0
  81. package/dist/commonjs/models/components/index.js.map +1 -1
  82. package/dist/commonjs/models/components/leakageguardrail.d.ts +27 -0
  83. package/dist/commonjs/models/components/leakageguardrail.d.ts.map +1 -1
  84. package/dist/commonjs/models/components/leakageguardrail.js +21 -1
  85. package/dist/commonjs/models/components/leakageguardrail.js.map +1 -1
  86. package/dist/commonjs/models/components/outputwindow.d.ts +28 -0
  87. package/dist/commonjs/models/components/outputwindow.d.ts.map +1 -0
  88. package/dist/commonjs/models/components/outputwindow.js +71 -0
  89. package/dist/commonjs/models/components/outputwindow.js.map +1 -0
  90. package/dist/commonjs/models/components/promptinjectionguardrail.d.ts +27 -0
  91. package/dist/commonjs/models/components/promptinjectionguardrail.d.ts.map +1 -1
  92. package/dist/commonjs/models/components/promptinjectionguardrail.js +21 -1
  93. package/dist/commonjs/models/components/promptinjectionguardrail.js.map +1 -1
  94. package/dist/commonjs/models/components/tooldefinition.d.ts +1 -1
  95. package/dist/commonjs/models/components/vectorstore.d.ts +1 -1
  96. package/dist/commonjs/models/operations/getmodel.d.ts +2 -2
  97. package/dist/commonjs/models/operations/getrequesttrace.d.ts +203 -0
  98. package/dist/commonjs/models/operations/getrequesttrace.d.ts.map +1 -0
  99. package/dist/commonjs/models/operations/getrequesttrace.js +277 -0
  100. package/dist/commonjs/models/operations/getrequesttrace.js.map +1 -0
  101. package/dist/commonjs/models/operations/index.d.ts +1 -0
  102. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  103. package/dist/commonjs/models/operations/index.js +1 -0
  104. package/dist/commonjs/models/operations/index.js.map +1 -1
  105. package/dist/commonjs/models/operations/listmodels.d.ts +2 -2
  106. package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.d.ts +3 -0
  107. package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.d.ts.map +1 -1
  108. package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.js +3 -0
  109. package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.js.map +1 -1
  110. package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.d.ts +3 -0
  111. package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.d.ts.map +1 -1
  112. package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.js +3 -0
  113. package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.js.map +1 -1
  114. package/dist/commonjs/react-query/billingGetOrganizationBilling.d.ts +6 -0
  115. package/dist/commonjs/react-query/billingGetOrganizationBilling.d.ts.map +1 -1
  116. package/dist/commonjs/react-query/billingGetOrganizationBilling.js +6 -0
  117. package/dist/commonjs/react-query/billingGetOrganizationBilling.js.map +1 -1
  118. package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.d.ts +6 -0
  119. package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.d.ts.map +1 -1
  120. package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.js +6 -0
  121. package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.js.map +1 -1
  122. package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.d.ts +3 -0
  123. package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.d.ts.map +1 -1
  124. package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.js +3 -0
  125. package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.js.map +1 -1
  126. package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.d.ts +3 -0
  127. package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.d.ts.map +1 -1
  128. package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.js +3 -0
  129. package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.js.map +1 -1
  130. package/dist/commonjs/react-query/index.d.ts +1 -0
  131. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  132. package/dist/commonjs/react-query/index.js +1 -0
  133. package/dist/commonjs/react-query/index.js.map +1 -1
  134. package/dist/commonjs/react-query/llmAuditGetRequestTrace.core.d.ts +12 -0
  135. package/dist/commonjs/react-query/llmAuditGetRequestTrace.core.d.ts.map +1 -0
  136. package/dist/commonjs/react-query/llmAuditGetRequestTrace.core.js +34 -0
  137. package/dist/commonjs/react-query/llmAuditGetRequestTrace.core.js.map +1 -0
  138. package/dist/commonjs/react-query/llmAuditGetRequestTrace.d.ts +28 -0
  139. package/dist/commonjs/react-query/llmAuditGetRequestTrace.d.ts.map +1 -0
  140. package/dist/commonjs/react-query/llmAuditGetRequestTrace.js +60 -0
  141. package/dist/commonjs/react-query/llmAuditGetRequestTrace.js.map +1 -0
  142. package/dist/commonjs/sdk/audit.d.ts +5 -3
  143. package/dist/commonjs/sdk/audit.d.ts.map +1 -1
  144. package/dist/commonjs/sdk/audit.js +7 -4
  145. package/dist/commonjs/sdk/audit.js.map +1 -1
  146. package/dist/commonjs/sdk/billing.d.ts +18 -0
  147. package/dist/commonjs/sdk/billing.d.ts.map +1 -1
  148. package/dist/commonjs/sdk/billing.js +18 -0
  149. package/dist/commonjs/sdk/billing.js.map +1 -1
  150. package/dist/commonjs/sdk/flags.d.ts +2 -2
  151. package/dist/commonjs/sdk/flags.d.ts.map +1 -1
  152. package/dist/commonjs/sdk/flags.js +2 -2
  153. package/dist/commonjs/sdk/flags.js.map +1 -1
  154. package/dist/commonjs/sdk/llm.d.ts +3 -0
  155. package/dist/commonjs/sdk/llm.d.ts.map +1 -1
  156. package/dist/commonjs/sdk/llm.js +4 -0
  157. package/dist/commonjs/sdk/llm.js.map +1 -1
  158. package/dist/commonjs/sdk/sdkaudit.d.ts +10 -0
  159. package/dist/commonjs/sdk/sdkaudit.d.ts.map +1 -0
  160. package/dist/commonjs/sdk/sdkaudit.js +19 -0
  161. package/dist/commonjs/sdk/sdkaudit.js.map +1 -0
  162. package/dist/esm/funcs/billingCreateOrganizationBillingPortal.d.ts +2 -0
  163. package/dist/esm/funcs/billingCreateOrganizationBillingPortal.d.ts.map +1 -1
  164. package/dist/esm/funcs/billingCreateOrganizationBillingPortal.js +2 -0
  165. package/dist/esm/funcs/billingCreateOrganizationBillingPortal.js.map +1 -1
  166. package/dist/esm/funcs/billingCreateOrganizationBillingSetup.d.ts +2 -0
  167. package/dist/esm/funcs/billingCreateOrganizationBillingSetup.d.ts.map +1 -1
  168. package/dist/esm/funcs/billingCreateOrganizationBillingSetup.js +2 -0
  169. package/dist/esm/funcs/billingCreateOrganizationBillingSetup.js.map +1 -1
  170. package/dist/esm/funcs/billingGetOrganizationBilling.d.ts +2 -0
  171. package/dist/esm/funcs/billingGetOrganizationBilling.d.ts.map +1 -1
  172. package/dist/esm/funcs/billingGetOrganizationBilling.js +2 -0
  173. package/dist/esm/funcs/billingGetOrganizationBilling.js.map +1 -1
  174. package/dist/esm/funcs/billingListOrganizationBillingInvoices.d.ts +2 -0
  175. package/dist/esm/funcs/billingListOrganizationBillingInvoices.d.ts.map +1 -1
  176. package/dist/esm/funcs/billingListOrganizationBillingInvoices.js +2 -0
  177. package/dist/esm/funcs/billingListOrganizationBillingInvoices.js.map +1 -1
  178. package/dist/esm/funcs/billingSetOrganizationBillingEnabled.d.ts +2 -0
  179. package/dist/esm/funcs/billingSetOrganizationBillingEnabled.d.ts.map +1 -1
  180. package/dist/esm/funcs/billingSetOrganizationBillingEnabled.js +2 -0
  181. package/dist/esm/funcs/billingSetOrganizationBillingEnabled.js.map +1 -1
  182. package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.d.ts +2 -0
  183. package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.d.ts.map +1 -1
  184. package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.js +2 -0
  185. package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.js.map +1 -1
  186. package/dist/esm/funcs/llmAuditGetRequestTrace.d.ts +19 -0
  187. package/dist/esm/funcs/llmAuditGetRequestTrace.d.ts.map +1 -0
  188. package/dist/esm/funcs/llmAuditGetRequestTrace.js +96 -0
  189. package/dist/esm/funcs/llmAuditGetRequestTrace.js.map +1 -0
  190. package/dist/esm/lib/config.d.ts +2 -2
  191. package/dist/esm/lib/config.js +2 -2
  192. package/dist/esm/mcp-server/mcp-server.js +1 -1
  193. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  194. package/dist/esm/mcp-server/server.js +3 -1
  195. package/dist/esm/mcp-server/server.js.map +1 -1
  196. package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingPortal.d.ts.map +1 -1
  197. package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingPortal.js +1 -1
  198. package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingPortal.js.map +1 -1
  199. package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingSetup.d.ts.map +1 -1
  200. package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingSetup.js +1 -1
  201. package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingSetup.js.map +1 -1
  202. package/dist/esm/mcp-server/tools/billingGetOrganizationBilling.d.ts.map +1 -1
  203. package/dist/esm/mcp-server/tools/billingGetOrganizationBilling.js +1 -1
  204. package/dist/esm/mcp-server/tools/billingGetOrganizationBilling.js.map +1 -1
  205. package/dist/esm/mcp-server/tools/billingListOrganizationBillingInvoices.d.ts.map +1 -1
  206. package/dist/esm/mcp-server/tools/billingListOrganizationBillingInvoices.js +1 -1
  207. package/dist/esm/mcp-server/tools/billingListOrganizationBillingInvoices.js.map +1 -1
  208. package/dist/esm/mcp-server/tools/billingSetOrganizationBillingEnabled.d.ts.map +1 -1
  209. package/dist/esm/mcp-server/tools/billingSetOrganizationBillingEnabled.js +1 -1
  210. package/dist/esm/mcp-server/tools/billingSetOrganizationBillingEnabled.js.map +1 -1
  211. package/dist/esm/mcp-server/tools/billingUpdateOrganizationBillingProfile.d.ts.map +1 -1
  212. package/dist/esm/mcp-server/tools/billingUpdateOrganizationBillingProfile.js +1 -1
  213. package/dist/esm/mcp-server/tools/billingUpdateOrganizationBillingProfile.js.map +1 -1
  214. package/dist/esm/mcp-server/tools/llmAuditGetRequestTrace.d.ts +8 -0
  215. package/dist/esm/mcp-server/tools/llmAuditGetRequestTrace.d.ts.map +1 -0
  216. package/dist/esm/mcp-server/tools/llmAuditGetRequestTrace.js +28 -0
  217. package/dist/esm/mcp-server/tools/llmAuditGetRequestTrace.js.map +1 -0
  218. package/dist/esm/models/components/banwordsguardrail.d.ts +27 -0
  219. package/dist/esm/models/components/banwordsguardrail.d.ts.map +1 -1
  220. package/dist/esm/models/components/banwordsguardrail.js +20 -0
  221. package/dist/esm/models/components/banwordsguardrail.js.map +1 -1
  222. package/dist/esm/models/components/classifierguardrail.d.ts +27 -0
  223. package/dist/esm/models/components/classifierguardrail.d.ts.map +1 -1
  224. package/dist/esm/models/components/classifierguardrail.js +20 -0
  225. package/dist/esm/models/components/classifierguardrail.js.map +1 -1
  226. package/dist/esm/models/components/clusterdefaultrulesummary.d.ts +21 -0
  227. package/dist/esm/models/components/clusterdefaultrulesummary.d.ts.map +1 -1
  228. package/dist/esm/models/components/clusterdefaultrulesummary.js +15 -0
  229. package/dist/esm/models/components/clusterdefaultrulesummary.js.map +1 -1
  230. package/dist/esm/models/components/createvectorstorerequest.d.ts +1 -1
  231. package/dist/esm/models/components/embeddingmodellimits.d.ts +5 -5
  232. package/dist/esm/models/components/embeddingmodellimits.d.ts.map +1 -1
  233. package/dist/esm/models/components/embeddingmodellimits.js +6 -6
  234. package/dist/esm/models/components/embeddingmodellimits.js.map +1 -1
  235. package/dist/esm/models/components/embeddingsrequest.d.ts +1 -1
  236. package/dist/esm/models/components/index.d.ts +1 -0
  237. package/dist/esm/models/components/index.d.ts.map +1 -1
  238. package/dist/esm/models/components/index.js +1 -0
  239. package/dist/esm/models/components/index.js.map +1 -1
  240. package/dist/esm/models/components/leakageguardrail.d.ts +27 -0
  241. package/dist/esm/models/components/leakageguardrail.d.ts.map +1 -1
  242. package/dist/esm/models/components/leakageguardrail.js +20 -0
  243. package/dist/esm/models/components/leakageguardrail.js.map +1 -1
  244. package/dist/esm/models/components/outputwindow.d.ts +28 -0
  245. package/dist/esm/models/components/outputwindow.d.ts.map +1 -0
  246. package/dist/esm/models/components/outputwindow.js +33 -0
  247. package/dist/esm/models/components/outputwindow.js.map +1 -0
  248. package/dist/esm/models/components/promptinjectionguardrail.d.ts +27 -0
  249. package/dist/esm/models/components/promptinjectionguardrail.d.ts.map +1 -1
  250. package/dist/esm/models/components/promptinjectionguardrail.js +20 -0
  251. package/dist/esm/models/components/promptinjectionguardrail.js.map +1 -1
  252. package/dist/esm/models/components/tooldefinition.d.ts +1 -1
  253. package/dist/esm/models/components/vectorstore.d.ts +1 -1
  254. package/dist/esm/models/operations/getmodel.d.ts +2 -2
  255. package/dist/esm/models/operations/getrequesttrace.d.ts +203 -0
  256. package/dist/esm/models/operations/getrequesttrace.d.ts.map +1 -0
  257. package/dist/esm/models/operations/getrequesttrace.js +231 -0
  258. package/dist/esm/models/operations/getrequesttrace.js.map +1 -0
  259. package/dist/esm/models/operations/index.d.ts +1 -0
  260. package/dist/esm/models/operations/index.d.ts.map +1 -1
  261. package/dist/esm/models/operations/index.js +1 -0
  262. package/dist/esm/models/operations/index.js.map +1 -1
  263. package/dist/esm/models/operations/listmodels.d.ts +2 -2
  264. package/dist/esm/react-query/billingCreateOrganizationBillingPortal.d.ts +3 -0
  265. package/dist/esm/react-query/billingCreateOrganizationBillingPortal.d.ts.map +1 -1
  266. package/dist/esm/react-query/billingCreateOrganizationBillingPortal.js +3 -0
  267. package/dist/esm/react-query/billingCreateOrganizationBillingPortal.js.map +1 -1
  268. package/dist/esm/react-query/billingCreateOrganizationBillingSetup.d.ts +3 -0
  269. package/dist/esm/react-query/billingCreateOrganizationBillingSetup.d.ts.map +1 -1
  270. package/dist/esm/react-query/billingCreateOrganizationBillingSetup.js +3 -0
  271. package/dist/esm/react-query/billingCreateOrganizationBillingSetup.js.map +1 -1
  272. package/dist/esm/react-query/billingGetOrganizationBilling.d.ts +6 -0
  273. package/dist/esm/react-query/billingGetOrganizationBilling.d.ts.map +1 -1
  274. package/dist/esm/react-query/billingGetOrganizationBilling.js +6 -0
  275. package/dist/esm/react-query/billingGetOrganizationBilling.js.map +1 -1
  276. package/dist/esm/react-query/billingListOrganizationBillingInvoices.d.ts +6 -0
  277. package/dist/esm/react-query/billingListOrganizationBillingInvoices.d.ts.map +1 -1
  278. package/dist/esm/react-query/billingListOrganizationBillingInvoices.js +6 -0
  279. package/dist/esm/react-query/billingListOrganizationBillingInvoices.js.map +1 -1
  280. package/dist/esm/react-query/billingSetOrganizationBillingEnabled.d.ts +3 -0
  281. package/dist/esm/react-query/billingSetOrganizationBillingEnabled.d.ts.map +1 -1
  282. package/dist/esm/react-query/billingSetOrganizationBillingEnabled.js +3 -0
  283. package/dist/esm/react-query/billingSetOrganizationBillingEnabled.js.map +1 -1
  284. package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.d.ts +3 -0
  285. package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.d.ts.map +1 -1
  286. package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.js +3 -0
  287. package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.js.map +1 -1
  288. package/dist/esm/react-query/index.d.ts +1 -0
  289. package/dist/esm/react-query/index.d.ts.map +1 -1
  290. package/dist/esm/react-query/index.js +1 -0
  291. package/dist/esm/react-query/index.js.map +1 -1
  292. package/dist/esm/react-query/llmAuditGetRequestTrace.core.d.ts +12 -0
  293. package/dist/esm/react-query/llmAuditGetRequestTrace.core.d.ts.map +1 -0
  294. package/dist/esm/react-query/llmAuditGetRequestTrace.core.js +29 -0
  295. package/dist/esm/react-query/llmAuditGetRequestTrace.core.js.map +1 -0
  296. package/dist/esm/react-query/llmAuditGetRequestTrace.d.ts +28 -0
  297. package/dist/esm/react-query/llmAuditGetRequestTrace.d.ts.map +1 -0
  298. package/dist/esm/react-query/llmAuditGetRequestTrace.js +50 -0
  299. package/dist/esm/react-query/llmAuditGetRequestTrace.js.map +1 -0
  300. package/dist/esm/sdk/audit.d.ts +5 -3
  301. package/dist/esm/sdk/audit.d.ts.map +1 -1
  302. package/dist/esm/sdk/audit.js +7 -4
  303. package/dist/esm/sdk/audit.js.map +1 -1
  304. package/dist/esm/sdk/billing.d.ts +18 -0
  305. package/dist/esm/sdk/billing.d.ts.map +1 -1
  306. package/dist/esm/sdk/billing.js +18 -0
  307. package/dist/esm/sdk/billing.js.map +1 -1
  308. package/dist/esm/sdk/flags.d.ts +2 -2
  309. package/dist/esm/sdk/flags.d.ts.map +1 -1
  310. package/dist/esm/sdk/flags.js +2 -2
  311. package/dist/esm/sdk/flags.js.map +1 -1
  312. package/dist/esm/sdk/llm.d.ts +3 -0
  313. package/dist/esm/sdk/llm.d.ts.map +1 -1
  314. package/dist/esm/sdk/llm.js +4 -0
  315. package/dist/esm/sdk/llm.js.map +1 -1
  316. package/dist/esm/sdk/sdkaudit.d.ts +10 -0
  317. package/dist/esm/sdk/sdkaudit.d.ts.map +1 -0
  318. package/dist/esm/sdk/sdkaudit.js +15 -0
  319. package/dist/esm/sdk/sdkaudit.js.map +1 -0
  320. package/jsr.json +1 -1
  321. package/package.json +1 -1
  322. package/src/funcs/billingCreateOrganizationBillingPortal.ts +2 -0
  323. package/src/funcs/billingCreateOrganizationBillingSetup.ts +2 -0
  324. package/src/funcs/billingGetOrganizationBilling.ts +2 -0
  325. package/src/funcs/billingListOrganizationBillingInvoices.ts +2 -0
  326. package/src/funcs/billingSetOrganizationBillingEnabled.ts +2 -0
  327. package/src/funcs/billingUpdateOrganizationBillingProfile.ts +2 -0
  328. package/src/funcs/llmAuditGetRequestTrace.ts +181 -0
  329. package/src/lib/config.ts +2 -2
  330. package/src/mcp-server/mcp-server.ts +1 -1
  331. package/src/mcp-server/server.ts +3 -1
  332. package/src/mcp-server/tools/billingCreateOrganizationBillingPortal.ts +2 -1
  333. package/src/mcp-server/tools/billingCreateOrganizationBillingSetup.ts +2 -1
  334. package/src/mcp-server/tools/billingGetOrganizationBilling.ts +2 -1
  335. package/src/mcp-server/tools/billingListOrganizationBillingInvoices.ts +2 -1
  336. package/src/mcp-server/tools/billingSetOrganizationBillingEnabled.ts +2 -1
  337. package/src/mcp-server/tools/billingUpdateOrganizationBillingProfile.ts +2 -1
  338. package/src/mcp-server/tools/llmAuditGetRequestTrace.ts +37 -0
  339. package/src/models/components/banwordsguardrail.ts +44 -0
  340. package/src/models/components/classifierguardrail.ts +48 -0
  341. package/src/models/components/clusterdefaultrulesummary.ts +34 -0
  342. package/src/models/components/createvectorstorerequest.ts +1 -1
  343. package/src/models/components/embeddingmodellimits.ts +11 -11
  344. package/src/models/components/embeddingsrequest.ts +1 -1
  345. package/src/models/components/index.ts +1 -0
  346. package/src/models/components/leakageguardrail.ts +48 -0
  347. package/src/models/components/outputwindow.ts +71 -0
  348. package/src/models/components/promptinjectionguardrail.ts +49 -0
  349. package/src/models/components/tooldefinition.ts +1 -1
  350. package/src/models/components/vectorstore.ts +1 -1
  351. package/src/models/operations/getmodel.ts +2 -2
  352. package/src/models/operations/getrequesttrace.ts +501 -0
  353. package/src/models/operations/index.ts +1 -0
  354. package/src/models/operations/listmodels.ts +2 -2
  355. package/src/react-query/billingCreateOrganizationBillingPortal.ts +3 -0
  356. package/src/react-query/billingCreateOrganizationBillingSetup.ts +3 -0
  357. package/src/react-query/billingGetOrganizationBilling.ts +6 -0
  358. package/src/react-query/billingListOrganizationBillingInvoices.ts +6 -0
  359. package/src/react-query/billingSetOrganizationBillingEnabled.ts +3 -0
  360. package/src/react-query/billingUpdateOrganizationBillingProfile.ts +3 -0
  361. package/src/react-query/index.ts +1 -0
  362. package/src/react-query/llmAuditGetRequestTrace.core.ts +71 -0
  363. package/src/react-query/llmAuditGetRequestTrace.ts +136 -0
  364. package/src/sdk/audit.ts +9 -7
  365. package/src/sdk/billing.ts +18 -0
  366. package/src/sdk/flags.ts +4 -4
  367. package/src/sdk/llm.ts +6 -0
  368. package/src/sdk/sdkaudit.ts +25 -0
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
@@ -18,6 +19,26 @@ import {
18
19
  GuardrailInputSource$inboundSchema,
19
20
  GuardrailInputSource$outboundSchema,
20
21
  } from "./guardrailinputsource.js";
22
+ import {
23
+ OutputWindow,
24
+ OutputWindow$inboundSchema,
25
+ OutputWindow$Outbound,
26
+ OutputWindow$outboundSchema,
27
+ } from "./outputwindow.js";
28
+
29
+ /**
30
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
31
+ */
32
+ export const ClassifierGuardrailOutputTiming = {
33
+ Final: "final",
34
+ Streaming: "streaming",
35
+ } as const;
36
+ /**
37
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
38
+ */
39
+ export type ClassifierGuardrailOutputTiming = ClosedEnum<
40
+ typeof ClassifierGuardrailOutputTiming
41
+ >;
21
42
 
22
43
  export type ClassifierGuardrail = {
23
44
  mode: "classifier";
@@ -29,6 +50,14 @@ export type ClassifierGuardrail = {
29
50
  * Also apply this guardrail to model output, not just the request
30
51
  */
31
52
  checkOutput?: boolean | undefined;
53
+ /**
54
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
55
+ */
56
+ outputTiming?: ClassifierGuardrailOutputTiming | undefined;
57
+ /**
58
+ * When a streaming output check runs: whichever of max_chars and max_ms fills first
59
+ */
60
+ outputWindow?: OutputWindow | undefined;
32
61
  /**
33
62
  * Request sources this guardrail checks before they reach the model. Omit to use the mode's default: every source for classifier; every source except system for ban_words, since instructions often name the terms they forbid; only what the user sends for prompt_injection and leakage, whose keyword patterns match ordinary instructions, replies and documents. An empty list checks no input, so the rule only checks output when check_output is set. Rules saved before this field existed were set to user messages only.
34
63
  */
@@ -36,6 +65,15 @@ export type ClassifierGuardrail = {
36
65
  config: ClassifierConfig;
37
66
  };
38
67
 
68
+ /** @internal */
69
+ export const ClassifierGuardrailOutputTiming$inboundSchema: z.ZodNativeEnum<
70
+ typeof ClassifierGuardrailOutputTiming
71
+ > = z.nativeEnum(ClassifierGuardrailOutputTiming);
72
+ /** @internal */
73
+ export const ClassifierGuardrailOutputTiming$outboundSchema: z.ZodNativeEnum<
74
+ typeof ClassifierGuardrailOutputTiming
75
+ > = ClassifierGuardrailOutputTiming$inboundSchema;
76
+
39
77
  /** @internal */
40
78
  export const ClassifierGuardrail$inboundSchema: z.ZodType<
41
79
  ClassifierGuardrail,
@@ -45,11 +83,15 @@ export const ClassifierGuardrail$inboundSchema: z.ZodType<
45
83
  mode: z.literal("classifier"),
46
84
  enabled: z.boolean().default(true),
47
85
  check_output: z.boolean().optional(),
86
+ output_timing: ClassifierGuardrailOutputTiming$inboundSchema.optional(),
87
+ output_window: OutputWindow$inboundSchema.optional(),
48
88
  input_sources: z.array(GuardrailInputSource$inboundSchema).optional(),
49
89
  config: ClassifierConfig$inboundSchema,
50
90
  }).transform((v) => {
51
91
  return remap$(v, {
52
92
  "check_output": "checkOutput",
93
+ "output_timing": "outputTiming",
94
+ "output_window": "outputWindow",
53
95
  "input_sources": "inputSources",
54
96
  });
55
97
  });
@@ -58,6 +100,8 @@ export type ClassifierGuardrail$Outbound = {
58
100
  mode: "classifier";
59
101
  enabled: boolean;
60
102
  check_output?: boolean | undefined;
103
+ output_timing?: string | undefined;
104
+ output_window?: OutputWindow$Outbound | undefined;
61
105
  input_sources?: Array<string> | undefined;
62
106
  config: ClassifierConfig$Outbound;
63
107
  };
@@ -71,11 +115,15 @@ export const ClassifierGuardrail$outboundSchema: z.ZodType<
71
115
  mode: z.literal("classifier"),
72
116
  enabled: z.boolean().default(true),
73
117
  checkOutput: z.boolean().optional(),
118
+ outputTiming: ClassifierGuardrailOutputTiming$outboundSchema.optional(),
119
+ outputWindow: OutputWindow$outboundSchema.optional(),
74
120
  inputSources: z.array(GuardrailInputSource$outboundSchema).optional(),
75
121
  config: ClassifierConfig$outboundSchema,
76
122
  }).transform((v) => {
77
123
  return remap$(v, {
78
124
  checkOutput: "check_output",
125
+ outputTiming: "output_timing",
126
+ outputWindow: "output_window",
79
127
  inputSources: "input_sources",
80
128
  });
81
129
  });
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
@@ -18,6 +19,20 @@ import {
18
19
  GuardrailMode$outboundSchema,
19
20
  } from "./guardrailmode.js";
20
21
 
22
+ /**
23
+ * When this guardrail checks model output: once on the finished text (final, the default) or while it streams
24
+ */
25
+ export const ClusterDefaultRuleSummaryOutputTiming = {
26
+ Final: "final",
27
+ Streaming: "streaming",
28
+ } as const;
29
+ /**
30
+ * When this guardrail checks model output: once on the finished text (final, the default) or while it streams
31
+ */
32
+ export type ClusterDefaultRuleSummaryOutputTiming = ClosedEnum<
33
+ typeof ClusterDefaultRuleSummaryOutputTiming
34
+ >;
35
+
21
36
  /**
22
37
  * A cluster default guardrail, without the operator's configuration
23
38
  */
@@ -28,6 +43,10 @@ export type ClusterDefaultRuleSummary = {
28
43
  * Whether this guardrail also checks model output
29
44
  */
30
45
  checkOutput?: boolean | undefined;
46
+ /**
47
+ * When this guardrail checks model output: once on the finished text (final, the default) or while it streams
48
+ */
49
+ outputTiming?: ClusterDefaultRuleSummaryOutputTiming | undefined;
31
50
  /**
32
51
  * Request sources this guardrail checks
33
52
  */
@@ -38,6 +57,16 @@ export type ClusterDefaultRuleSummary = {
38
57
  rejectionMessage?: string | undefined;
39
58
  };
40
59
 
60
+ /** @internal */
61
+ export const ClusterDefaultRuleSummaryOutputTiming$inboundSchema:
62
+ z.ZodNativeEnum<typeof ClusterDefaultRuleSummaryOutputTiming> = z.nativeEnum(
63
+ ClusterDefaultRuleSummaryOutputTiming,
64
+ );
65
+ /** @internal */
66
+ export const ClusterDefaultRuleSummaryOutputTiming$outboundSchema:
67
+ z.ZodNativeEnum<typeof ClusterDefaultRuleSummaryOutputTiming> =
68
+ ClusterDefaultRuleSummaryOutputTiming$inboundSchema;
69
+
41
70
  /** @internal */
42
71
  export const ClusterDefaultRuleSummary$inboundSchema: z.ZodType<
43
72
  ClusterDefaultRuleSummary,
@@ -47,11 +76,13 @@ export const ClusterDefaultRuleSummary$inboundSchema: z.ZodType<
47
76
  mode: GuardrailMode$inboundSchema,
48
77
  enabled: z.boolean(),
49
78
  check_output: z.boolean().optional(),
79
+ output_timing: ClusterDefaultRuleSummaryOutputTiming$inboundSchema.optional(),
50
80
  input_sources: z.array(GuardrailInputSource$inboundSchema),
51
81
  rejection_message: z.string().optional(),
52
82
  }).transform((v) => {
53
83
  return remap$(v, {
54
84
  "check_output": "checkOutput",
85
+ "output_timing": "outputTiming",
55
86
  "input_sources": "inputSources",
56
87
  "rejection_message": "rejectionMessage",
57
88
  });
@@ -61,6 +92,7 @@ export type ClusterDefaultRuleSummary$Outbound = {
61
92
  mode: string;
62
93
  enabled: boolean;
63
94
  check_output?: boolean | undefined;
95
+ output_timing?: string | undefined;
64
96
  input_sources: Array<string>;
65
97
  rejection_message?: string | undefined;
66
98
  };
@@ -74,11 +106,13 @@ export const ClusterDefaultRuleSummary$outboundSchema: z.ZodType<
74
106
  mode: GuardrailMode$outboundSchema,
75
107
  enabled: z.boolean(),
76
108
  checkOutput: z.boolean().optional(),
109
+ outputTiming: ClusterDefaultRuleSummaryOutputTiming$outboundSchema.optional(),
77
110
  inputSources: z.array(GuardrailInputSource$outboundSchema),
78
111
  rejectionMessage: z.string().optional(),
79
112
  }).transform((v) => {
80
113
  return remap$(v, {
81
114
  checkOutput: "check_output",
115
+ outputTiming: "output_timing",
82
116
  inputSources: "input_sources",
83
117
  rejectionMessage: "rejection_message",
84
118
  });
@@ -87,7 +87,7 @@ export type CreateVectorStoreRequest = {
87
87
  */
88
88
  embeddingModel?: string | undefined;
89
89
  /**
90
- * The number of dimensions for the embedding vectors. Only supported for models with flexible dimensions. If not specified, uses the model's default dimensions.
90
+ * The number of dimensions for the embedding vectors. Must equal the model's size when it is fixed, or lie within its range (`embedding_dimension_range` on `GET /models/{model_id}`). If not specified, uses the model's default dimensions. The store stays searchable only while the model's declared dimensions still include this size and the model returns embeddings of this width.
91
91
  */
92
92
  embeddingDimensions?: number | undefined;
93
93
  /**
@@ -13,15 +13,15 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
13
  */
14
14
  export type EmbeddingModelLimits = {
15
15
  /**
16
- * Maximum number of inputs allowed in a single batch request
16
+ * Maximum number of inputs allowed in a single batch request: the model's batch size or the gateway-wide 10,000-input limit, whichever is lower, on `POST /embeddings`. Batch `/v1/embeddings` lines are held only to the model's batch size.
17
17
  */
18
18
  maxBatchSize: number;
19
19
  /**
20
- * Maximum tokens per individual input (derived from contextWindow)
20
+ * Maximum tokens per individual input: the model's context window. Null when the registry records no context window: no token cap applies beyond what `max_input_length` implies. For a window long enough that its estimated character length exceeds the gateway-wide character limit, `max_input_length` binds first. Advisory on `/embeddings`, which accepts only strings and enforces `max_input_length`.
21
21
  */
22
- maxInputTokens: number;
22
+ maxInputTokens: number | null;
23
23
  /**
24
- * Maximum characters per individual input (contextWindow * 2)
24
+ * Maximum characters per individual input: the cap derived from the model's context window or the gateway-wide 100,000-character limit, whichever is lower, on `POST /embeddings`. Batch `/v1/embeddings` lines are held only to the model's cap.
25
25
  */
26
26
  maxInputLength: number;
27
27
  };
@@ -32,9 +32,9 @@ export const EmbeddingModelLimits$inboundSchema: z.ZodType<
32
32
  z.ZodTypeDef,
33
33
  unknown
34
34
  > = z.object({
35
- max_batch_size: z.number(),
36
- max_input_tokens: z.number(),
37
- max_input_length: z.number(),
35
+ max_batch_size: z.number().int(),
36
+ max_input_tokens: z.nullable(z.number().int()),
37
+ max_input_length: z.number().int(),
38
38
  }).transform((v) => {
39
39
  return remap$(v, {
40
40
  "max_batch_size": "maxBatchSize",
@@ -45,7 +45,7 @@ export const EmbeddingModelLimits$inboundSchema: z.ZodType<
45
45
  /** @internal */
46
46
  export type EmbeddingModelLimits$Outbound = {
47
47
  max_batch_size: number;
48
- max_input_tokens: number;
48
+ max_input_tokens: number | null;
49
49
  max_input_length: number;
50
50
  };
51
51
 
@@ -55,9 +55,9 @@ export const EmbeddingModelLimits$outboundSchema: z.ZodType<
55
55
  z.ZodTypeDef,
56
56
  EmbeddingModelLimits
57
57
  > = z.object({
58
- maxBatchSize: z.number(),
59
- maxInputTokens: z.number(),
60
- maxInputLength: z.number(),
58
+ maxBatchSize: z.number().int(),
59
+ maxInputTokens: z.nullable(z.number().int()),
60
+ maxInputLength: z.number().int(),
61
61
  }).transform((v) => {
62
62
  return remap$(v, {
63
63
  maxBatchSize: "max_batch_size",
@@ -39,7 +39,7 @@ export type EmbeddingsRequest = {
39
39
  */
40
40
  model: string;
41
41
  /**
42
- * The number of dimensions the resulting output embeddings should have. Only supported in certain models.
42
+ * The number of dimensions the resulting output embeddings should have. Ignored for a model with a fixed size, which always returns that size. For a model with a range it must lie within the range (`embedding_dimension_range` on `GET /models/{model_id}`), or the request fails with 400.
43
43
  */
44
44
  dimensions?: number | undefined;
45
45
  /**
@@ -534,6 +534,7 @@ export * from "./outputref.js";
534
534
  export * from "./outputspec.js";
535
535
  export * from "./outputtext.js";
536
536
  export * from "./outputtokensdetails.js";
537
+ export * from "./outputwindow.js";
537
538
  export * from "./pagegeneration.js";
538
539
  export * from "./pagelogline.js";
539
540
  export * from "./param.js";
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
@@ -18,6 +19,26 @@ import {
18
19
  LeakageConfig$Outbound,
19
20
  LeakageConfig$outboundSchema,
20
21
  } from "./leakageconfig.js";
22
+ import {
23
+ OutputWindow,
24
+ OutputWindow$inboundSchema,
25
+ OutputWindow$Outbound,
26
+ OutputWindow$outboundSchema,
27
+ } from "./outputwindow.js";
28
+
29
+ /**
30
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
31
+ */
32
+ export const LeakageGuardrailOutputTiming = {
33
+ Final: "final",
34
+ Streaming: "streaming",
35
+ } as const;
36
+ /**
37
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
38
+ */
39
+ export type LeakageGuardrailOutputTiming = ClosedEnum<
40
+ typeof LeakageGuardrailOutputTiming
41
+ >;
21
42
 
22
43
  /**
23
44
  * Leakage guardrail
@@ -32,6 +53,14 @@ export type LeakageGuardrail = {
32
53
  * Also apply this guardrail to model output, not just the request
33
54
  */
34
55
  checkOutput?: boolean | undefined;
56
+ /**
57
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
58
+ */
59
+ outputTiming?: LeakageGuardrailOutputTiming | undefined;
60
+ /**
61
+ * When a streaming output check runs: whichever of max_chars and max_ms fills first
62
+ */
63
+ outputWindow?: OutputWindow | undefined;
35
64
  /**
36
65
  * Request sources this guardrail checks before they reach the model. Omit to use the mode's default: every source for classifier; every source except system for ban_words, since instructions often name the terms they forbid; only what the user sends for prompt_injection and leakage, whose keyword patterns match ordinary instructions, replies and documents. An empty list checks no input, so the rule only checks output when check_output is set. Rules saved before this field existed were set to user messages only.
37
66
  */
@@ -42,6 +71,15 @@ export type LeakageGuardrail = {
42
71
  config?: LeakageConfig | undefined;
43
72
  };
44
73
 
74
+ /** @internal */
75
+ export const LeakageGuardrailOutputTiming$inboundSchema: z.ZodNativeEnum<
76
+ typeof LeakageGuardrailOutputTiming
77
+ > = z.nativeEnum(LeakageGuardrailOutputTiming);
78
+ /** @internal */
79
+ export const LeakageGuardrailOutputTiming$outboundSchema: z.ZodNativeEnum<
80
+ typeof LeakageGuardrailOutputTiming
81
+ > = LeakageGuardrailOutputTiming$inboundSchema;
82
+
45
83
  /** @internal */
46
84
  export const LeakageGuardrail$inboundSchema: z.ZodType<
47
85
  LeakageGuardrail,
@@ -51,11 +89,15 @@ export const LeakageGuardrail$inboundSchema: z.ZodType<
51
89
  mode: z.literal("leakage"),
52
90
  enabled: z.boolean().default(true),
53
91
  check_output: z.boolean().optional(),
92
+ output_timing: LeakageGuardrailOutputTiming$inboundSchema.optional(),
93
+ output_window: OutputWindow$inboundSchema.optional(),
54
94
  input_sources: z.array(GuardrailInputSource$inboundSchema).optional(),
55
95
  config: LeakageConfig$inboundSchema.optional(),
56
96
  }).transform((v) => {
57
97
  return remap$(v, {
58
98
  "check_output": "checkOutput",
99
+ "output_timing": "outputTiming",
100
+ "output_window": "outputWindow",
59
101
  "input_sources": "inputSources",
60
102
  });
61
103
  });
@@ -64,6 +106,8 @@ export type LeakageGuardrail$Outbound = {
64
106
  mode: "leakage";
65
107
  enabled: boolean;
66
108
  check_output?: boolean | undefined;
109
+ output_timing?: string | undefined;
110
+ output_window?: OutputWindow$Outbound | undefined;
67
111
  input_sources?: Array<string> | undefined;
68
112
  config?: LeakageConfig$Outbound | undefined;
69
113
  };
@@ -77,11 +121,15 @@ export const LeakageGuardrail$outboundSchema: z.ZodType<
77
121
  mode: z.literal("leakage"),
78
122
  enabled: z.boolean().default(true),
79
123
  checkOutput: z.boolean().optional(),
124
+ outputTiming: LeakageGuardrailOutputTiming$outboundSchema.optional(),
125
+ outputWindow: OutputWindow$outboundSchema.optional(),
80
126
  inputSources: z.array(GuardrailInputSource$outboundSchema).optional(),
81
127
  config: LeakageConfig$outboundSchema.optional(),
82
128
  }).transform((v) => {
83
129
  return remap$(v, {
84
130
  checkOutput: "check_output",
131
+ outputTiming: "output_timing",
132
+ outputWindow: "output_window",
85
133
  inputSources: "input_sources",
86
134
  });
87
135
  });
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * When a streaming output check runs: whichever of max_chars and max_ms fills first
13
+ */
14
+ export type OutputWindow = {
15
+ /**
16
+ * Check once this many characters of unchecked text have accumulated
17
+ */
18
+ maxChars?: number | undefined;
19
+ /**
20
+ * Check once the oldest unchecked text has been held this many milliseconds
21
+ */
22
+ maxMs?: number | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const OutputWindow$inboundSchema: z.ZodType<
27
+ OutputWindow,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ max_chars: z.number().int().optional(),
32
+ max_ms: z.number().int().optional(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "max_chars": "maxChars",
36
+ "max_ms": "maxMs",
37
+ });
38
+ });
39
+ /** @internal */
40
+ export type OutputWindow$Outbound = {
41
+ max_chars?: number | undefined;
42
+ max_ms?: number | undefined;
43
+ };
44
+
45
+ /** @internal */
46
+ export const OutputWindow$outboundSchema: z.ZodType<
47
+ OutputWindow$Outbound,
48
+ z.ZodTypeDef,
49
+ OutputWindow
50
+ > = z.object({
51
+ maxChars: z.number().int().optional(),
52
+ maxMs: z.number().int().optional(),
53
+ }).transform((v) => {
54
+ return remap$(v, {
55
+ maxChars: "max_chars",
56
+ maxMs: "max_ms",
57
+ });
58
+ });
59
+
60
+ export function outputWindowToJSON(outputWindow: OutputWindow): string {
61
+ return JSON.stringify(OutputWindow$outboundSchema.parse(outputWindow));
62
+ }
63
+ export function outputWindowFromJSON(
64
+ jsonString: string,
65
+ ): SafeParseResult<OutputWindow, SDKValidationError> {
66
+ return safeParse(
67
+ jsonString,
68
+ (x) => OutputWindow$inboundSchema.parse(JSON.parse(x)),
69
+ `Failed to parse 'OutputWindow' from JSON`,
70
+ );
71
+ }
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
@@ -12,6 +13,12 @@ import {
12
13
  GuardrailInputSource$inboundSchema,
13
14
  GuardrailInputSource$outboundSchema,
14
15
  } from "./guardrailinputsource.js";
16
+ import {
17
+ OutputWindow,
18
+ OutputWindow$inboundSchema,
19
+ OutputWindow$Outbound,
20
+ OutputWindow$outboundSchema,
21
+ } from "./outputwindow.js";
15
22
  import {
16
23
  PromptInjectionConfig,
17
24
  PromptInjectionConfig$inboundSchema,
@@ -19,6 +26,20 @@ import {
19
26
  PromptInjectionConfig$outboundSchema,
20
27
  } from "./promptinjectionconfig.js";
21
28
 
29
+ /**
30
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
31
+ */
32
+ export const PromptInjectionGuardrailOutputTiming = {
33
+ Final: "final",
34
+ Streaming: "streaming",
35
+ } as const;
36
+ /**
37
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
38
+ */
39
+ export type PromptInjectionGuardrailOutputTiming = ClosedEnum<
40
+ typeof PromptInjectionGuardrailOutputTiming
41
+ >;
42
+
22
43
  /**
23
44
  * Prompt injection guardrail
24
45
  */
@@ -32,6 +53,14 @@ export type PromptInjectionGuardrail = {
32
53
  * Also apply this guardrail to model output, not just the request
33
54
  */
34
55
  checkOutput?: boolean | undefined;
56
+ /**
57
+ * When this rule checks model output: final (default) checks the finished text once, after it has streamed; streaming holds streamed text in a window and releases only text this rule has cleared
58
+ */
59
+ outputTiming?: PromptInjectionGuardrailOutputTiming | undefined;
60
+ /**
61
+ * When a streaming output check runs: whichever of max_chars and max_ms fills first
62
+ */
63
+ outputWindow?: OutputWindow | undefined;
35
64
  /**
36
65
  * Request sources this guardrail checks before they reach the model. Omit to use the mode's default: every source for classifier; every source except system for ban_words, since instructions often name the terms they forbid; only what the user sends for prompt_injection and leakage, whose keyword patterns match ordinary instructions, replies and documents. An empty list checks no input, so the rule only checks output when check_output is set. Rules saved before this field existed were set to user messages only.
37
66
  */
@@ -42,6 +71,16 @@ export type PromptInjectionGuardrail = {
42
71
  config?: PromptInjectionConfig | undefined;
43
72
  };
44
73
 
74
+ /** @internal */
75
+ export const PromptInjectionGuardrailOutputTiming$inboundSchema:
76
+ z.ZodNativeEnum<typeof PromptInjectionGuardrailOutputTiming> = z.nativeEnum(
77
+ PromptInjectionGuardrailOutputTiming,
78
+ );
79
+ /** @internal */
80
+ export const PromptInjectionGuardrailOutputTiming$outboundSchema:
81
+ z.ZodNativeEnum<typeof PromptInjectionGuardrailOutputTiming> =
82
+ PromptInjectionGuardrailOutputTiming$inboundSchema;
83
+
45
84
  /** @internal */
46
85
  export const PromptInjectionGuardrail$inboundSchema: z.ZodType<
47
86
  PromptInjectionGuardrail,
@@ -51,11 +90,15 @@ export const PromptInjectionGuardrail$inboundSchema: z.ZodType<
51
90
  mode: z.literal("prompt_injection"),
52
91
  enabled: z.boolean().default(true),
53
92
  check_output: z.boolean().optional(),
93
+ output_timing: PromptInjectionGuardrailOutputTiming$inboundSchema.optional(),
94
+ output_window: OutputWindow$inboundSchema.optional(),
54
95
  input_sources: z.array(GuardrailInputSource$inboundSchema).optional(),
55
96
  config: PromptInjectionConfig$inboundSchema.optional(),
56
97
  }).transform((v) => {
57
98
  return remap$(v, {
58
99
  "check_output": "checkOutput",
100
+ "output_timing": "outputTiming",
101
+ "output_window": "outputWindow",
59
102
  "input_sources": "inputSources",
60
103
  });
61
104
  });
@@ -64,6 +107,8 @@ export type PromptInjectionGuardrail$Outbound = {
64
107
  mode: "prompt_injection";
65
108
  enabled: boolean;
66
109
  check_output?: boolean | undefined;
110
+ output_timing?: string | undefined;
111
+ output_window?: OutputWindow$Outbound | undefined;
67
112
  input_sources?: Array<string> | undefined;
68
113
  config?: PromptInjectionConfig$Outbound | undefined;
69
114
  };
@@ -77,11 +122,15 @@ export const PromptInjectionGuardrail$outboundSchema: z.ZodType<
77
122
  mode: z.literal("prompt_injection"),
78
123
  enabled: z.boolean().default(true),
79
124
  checkOutput: z.boolean().optional(),
125
+ outputTiming: PromptInjectionGuardrailOutputTiming$outboundSchema.optional(),
126
+ outputWindow: OutputWindow$outboundSchema.optional(),
80
127
  inputSources: z.array(GuardrailInputSource$outboundSchema).optional(),
81
128
  config: PromptInjectionConfig$outboundSchema.optional(),
82
129
  }).transform((v) => {
83
130
  return remap$(v, {
84
131
  checkOutput: "check_output",
132
+ outputTiming: "output_timing",
133
+ outputWindow: "output_window",
85
134
  inputSources: "input_sources",
86
135
  });
87
136
  });
@@ -120,7 +120,7 @@ export const ToolDefinition9Type = {
120
120
  export type ToolDefinition9Type = ClosedEnum<typeof ToolDefinition9Type>;
121
121
 
122
122
  /**
123
- * Another saved agent of the same team, called as a tool. mkllm-gateway starts a run of that agent and returns its answer.
123
+ * Another saved agent of the same team, called as a tool. The Responses API starts a run of that agent and returns its answer.
124
124
  */
125
125
  export type Nine = {
126
126
  type: ToolDefinition9Type;
@@ -88,7 +88,7 @@ export type VectorStore = {
88
88
  */
89
89
  embeddingModel: string | null;
90
90
  /**
91
- * The number of dimensions for the embedding vectors in this vector store. Null for legacy vector stores.
91
+ * The number of dimensions for the embedding vectors in this vector store. Null for legacy vector stores. If the embedding model's declared dimensions stop including this size, or the model returns embeddings of another width, search fails with 412 and new files fail to ingest.
92
92
  */
93
93
  embeddingDimensions: number | null;
94
94
  /**
@@ -160,7 +160,7 @@ export type GetModelResponseBody = {
160
160
  */
161
161
  outputModalities: Array<string>;
162
162
  /**
163
- * Context window in tokens, mirroring the registry's `contextWindow`. For an LLM it is the input plus output tokens one request can span: the Responses API trims the oldest conversation items to fit it, reserving nothing for the output, unless the request sets `truncation` to `disabled`, which rejects an oversized request instead; a separate request-size limit in bytes applies the same way. Chat completions forwards requests unchanged. For an embeddings model `/embeddings` derives its per-input character cap from it, which `GET /embeddings/models` reports as `max_input_length`; a gateway-wide per-input ceiling also applies. On other model types the gateway does not read it, so a recorded value is informational only and not enforced. Null when the registry does not record one.
163
+ * Context window in tokens, mirroring the registry's `contextWindow`. For an LLM it is the input plus output tokens one request can span: the Responses API trims the oldest conversation items to fit it, reserving nothing for the output, unless the request sets `truncation` to `disabled`, which rejects an oversized request instead; a separate request-size limit in bytes applies the same way. Chat completions forwards requests unchanged. For an embeddings model `/embeddings` derives a per-input character cap from it, alongside a gateway-wide per-input ceiling; `GET /embeddings/models` reports whichever binds first as `max_input_length`. On other model types the gateway does not read it, so a recorded value is informational only and not enforced. Null when the registry does not record one.
164
164
  */
165
165
  contextWindow: number | null;
166
166
  /**
@@ -172,7 +172,7 @@ export type GetModelResponseBody = {
172
172
  */
173
173
  minImageResolution: MinImageResolution | null;
174
174
  /**
175
- * Output vector sizes declared for this model, mirroring the registry's `embeddingLimits.dimensions`, which is normally recorded only on embeddings models. A model with a single fixed size reports it as `min`, `max` and `default` alike, so when `min` equals `max` the size is fixed and a request should omit `dimensions`. Vector stores reject a size outside the range. `/embeddings` does not check it: it drops a requested `dimensions` for a fixed-size model and otherwise forwards it to the upstream. Null when the registry does not record dimensions; a vector store using such a model must then be created with an explicit size (`embedding_dimensions` on `POST /vector_stores`). Distinct from the vector store's own `embedding_dimensions`, which is a single size.
175
+ * Output vector sizes declared for this model, mirroring the registry's `embeddingLimits.dimensions`, which is normally recorded only on embeddings models. When `min` equals `max` the size is fixed: `/embeddings` ignores a requested `dimensions` and returns that size, and vector stores accept only that size. Otherwise a requested size must lie within the range: `/embeddings` and vector stores reject one outside it with 400. Null when the registry does not record dimensions; a vector store using such a model must then be created with an explicit size (`embedding_dimensions` on `POST /vector_stores`). Distinct from the vector store's own `embedding_dimensions`, which is a single size.
176
176
  */
177
177
  embeddingDimensionRange: EmbeddingDimensionRange | null;
178
178
  /**