@orq-ai/node 3.8.0-rc.3 → 3.8.0-rc.30

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 (238) hide show
  1. package/FUNCTIONS.md +3 -5
  2. package/README.md +91 -95
  3. package/bin/mcp-server.js +1866 -461
  4. package/bin/mcp-server.js.map +68 -62
  5. package/docs/sdks/contacts/README.md +30 -2
  6. package/docs/sdks/knowledge/README.md +1 -1
  7. package/docs/sdks/orq/README.md +138 -0
  8. package/funcs/filesCreate.d.ts.map +1 -1
  9. package/funcs/filesCreate.js +7 -3
  10. package/funcs/filesCreate.js.map +1 -1
  11. package/funcs/getV2ModelsLitellmModels.d.ts +17 -0
  12. package/funcs/getV2ModelsLitellmModels.d.ts.map +1 -0
  13. package/funcs/getV2ModelsLitellmModels.js +105 -0
  14. package/funcs/getV2ModelsLitellmModels.js.map +1 -0
  15. package/funcs/knowledgeCreateChunks.d.ts +1 -1
  16. package/funcs/knowledgeCreateChunks.d.ts.map +1 -1
  17. package/funcs/knowledgeCreateChunks.js +1 -1
  18. package/funcs/knowledgeCreateChunks.js.map +1 -1
  19. package/funcs/postV2ModelsLitellmImport.d.ts +17 -0
  20. package/funcs/postV2ModelsLitellmImport.d.ts.map +1 -0
  21. package/funcs/postV2ModelsLitellmImport.js +117 -0
  22. package/funcs/postV2ModelsLitellmImport.js.map +1 -0
  23. package/jsr.json +1 -1
  24. package/lib/config.d.ts +3 -3
  25. package/lib/config.js +3 -3
  26. package/lib/config.js.map +1 -1
  27. package/lib/files.d.ts +5 -0
  28. package/lib/files.d.ts.map +1 -1
  29. package/lib/files.js +41 -0
  30. package/lib/files.js.map +1 -1
  31. package/lib/security.d.ts +2 -2
  32. package/lib/security.d.ts.map +1 -1
  33. package/mcp-server/mcp-server.js +1 -1
  34. package/mcp-server/mcp-server.js.map +1 -1
  35. package/mcp-server/server.d.ts.map +1 -1
  36. package/mcp-server/server.js +5 -1
  37. package/mcp-server/server.js.map +1 -1
  38. package/mcp-server/tools/getV2ModelsLitellmModels.d.ts +3 -0
  39. package/mcp-server/tools/getV2ModelsLitellmModels.d.ts.map +1 -0
  40. package/mcp-server/tools/getV2ModelsLitellmModels.js +26 -0
  41. package/mcp-server/tools/getV2ModelsLitellmModels.js.map +1 -0
  42. package/mcp-server/tools/postV2ModelsLitellmImport.d.ts +9 -0
  43. package/mcp-server/tools/postV2ModelsLitellmImport.d.ts.map +1 -0
  44. package/mcp-server/tools/postV2ModelsLitellmImport.js +65 -0
  45. package/mcp-server/tools/postV2ModelsLitellmImport.js.map +1 -0
  46. package/models/operations/createchunk.d.ts +28 -28
  47. package/models/operations/createchunk.d.ts.map +1 -1
  48. package/models/operations/createchunk.js +35 -33
  49. package/models/operations/createchunk.js.map +1 -1
  50. package/models/operations/createcontact.js +2 -2
  51. package/models/operations/createdataset.js +2 -2
  52. package/models/operations/createdatasetitem.js +2 -2
  53. package/models/operations/createdatasource.js +2 -2
  54. package/models/operations/createeval.js +16 -16
  55. package/models/operations/createfeedback.d.ts +8 -8
  56. package/models/operations/createfeedback.d.ts.map +1 -1
  57. package/models/operations/createfeedback.js +8 -8
  58. package/models/operations/createfeedback.js.map +1 -1
  59. package/models/operations/createprompt.d.ts +16 -10
  60. package/models/operations/createprompt.d.ts.map +1 -1
  61. package/models/operations/createprompt.js +12 -10
  62. package/models/operations/createprompt.js.map +1 -1
  63. package/models/operations/deploymentgetconfig.d.ts +17 -17
  64. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  65. package/models/operations/deploymentgetconfig.js +20 -20
  66. package/models/operations/deploymentgetconfig.js.map +1 -1
  67. package/models/operations/deploymentinvoke.d.ts +3 -0
  68. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  69. package/models/operations/deploymentinvoke.js +1 -0
  70. package/models/operations/deploymentinvoke.js.map +1 -1
  71. package/models/operations/deployments.d.ts +5 -2
  72. package/models/operations/deployments.d.ts.map +1 -1
  73. package/models/operations/deployments.js +3 -2
  74. package/models/operations/deployments.js.map +1 -1
  75. package/models/operations/evalsageappropriate.d.ts +2 -2
  76. package/models/operations/evalsageappropriate.js +2 -2
  77. package/models/operations/evalsfactcheckingknowledgebase.d.ts +2 -2
  78. package/models/operations/evalsfactcheckingknowledgebase.js +2 -2
  79. package/models/operations/evalsgrammar.d.ts +2 -2
  80. package/models/operations/evalsgrammar.js +2 -2
  81. package/models/operations/evalslocalization.d.ts +2 -2
  82. package/models/operations/evalslocalization.js +2 -2
  83. package/models/operations/evalspii.d.ts +2 -2
  84. package/models/operations/evalspii.js +2 -2
  85. package/models/operations/evalsragascoherence.d.ts +2 -2
  86. package/models/operations/evalsragascoherence.js +2 -2
  87. package/models/operations/evalsragasconciseness.d.ts +2 -2
  88. package/models/operations/evalsragasconciseness.js +2 -2
  89. package/models/operations/evalsragascontextprecision.d.ts +2 -2
  90. package/models/operations/evalsragascontextprecision.js +2 -2
  91. package/models/operations/evalsragascorrectness.d.ts +2 -2
  92. package/models/operations/evalsragascorrectness.js +2 -2
  93. package/models/operations/evalsragasfaithfulness.d.ts +2 -2
  94. package/models/operations/evalsragasfaithfulness.js +2 -2
  95. package/models/operations/evalsragasharmfulness.d.ts +2 -2
  96. package/models/operations/evalsragasharmfulness.js +2 -2
  97. package/models/operations/evalsragasmaliciousness.d.ts +2 -2
  98. package/models/operations/evalsragasmaliciousness.js +2 -2
  99. package/models/operations/evalsragasresponserelevancy.d.ts +2 -2
  100. package/models/operations/evalsragasresponserelevancy.js +2 -2
  101. package/models/operations/evalssentimentclassification.d.ts +2 -2
  102. package/models/operations/evalssentimentclassification.js +2 -2
  103. package/models/operations/evalssummarization.d.ts +2 -2
  104. package/models/operations/evalssummarization.js +2 -2
  105. package/models/operations/evalstoneofvoice.d.ts +2 -2
  106. package/models/operations/evalstoneofvoice.js +2 -2
  107. package/models/operations/evalstranslation.d.ts +2 -2
  108. package/models/operations/evalstranslation.js +2 -2
  109. package/models/operations/fileget.js +2 -2
  110. package/models/operations/filelist.js +2 -2
  111. package/models/operations/fileupload.js +2 -2
  112. package/models/operations/getallprompts.d.ts +9 -6
  113. package/models/operations/getallprompts.d.ts.map +1 -1
  114. package/models/operations/getallprompts.js +7 -6
  115. package/models/operations/getallprompts.js.map +1 -1
  116. package/models/operations/getevals.d.ts +56 -56
  117. package/models/operations/getevals.d.ts.map +1 -1
  118. package/models/operations/getevals.js +111 -106
  119. package/models/operations/getevals.js.map +1 -1
  120. package/models/operations/getoneprompt.d.ts +9 -6
  121. package/models/operations/getoneprompt.d.ts.map +1 -1
  122. package/models/operations/getoneprompt.js +7 -6
  123. package/models/operations/getoneprompt.js.map +1 -1
  124. package/models/operations/getpromptversion.d.ts +9 -6
  125. package/models/operations/getpromptversion.d.ts.map +1 -1
  126. package/models/operations/getpromptversion.js +7 -6
  127. package/models/operations/getpromptversion.js.map +1 -1
  128. package/models/operations/getv2modelslitellmmodels.d.ts +185 -0
  129. package/models/operations/getv2modelslitellmmodels.d.ts.map +1 -0
  130. package/models/operations/getv2modelslitellmmodels.js +349 -0
  131. package/models/operations/getv2modelslitellmmodels.js.map +1 -0
  132. package/models/operations/index.d.ts +2 -0
  133. package/models/operations/index.d.ts.map +1 -1
  134. package/models/operations/index.js +2 -0
  135. package/models/operations/index.js.map +1 -1
  136. package/models/operations/invokeeval.d.ts +108 -108
  137. package/models/operations/invokeeval.d.ts.map +1 -1
  138. package/models/operations/invokeeval.js +141 -144
  139. package/models/operations/invokeeval.js.map +1 -1
  140. package/models/operations/listcontacts.js +2 -2
  141. package/models/operations/listdatasetdatapoints.js +2 -2
  142. package/models/operations/listdatasets.js +2 -2
  143. package/models/operations/listdatasources.js +2 -2
  144. package/models/operations/listpromptversions.d.ts +9 -6
  145. package/models/operations/listpromptversions.d.ts.map +1 -1
  146. package/models/operations/listpromptversions.js +7 -6
  147. package/models/operations/listpromptversions.js.map +1 -1
  148. package/models/operations/postv2modelslitellmimport.d.ts +1333 -0
  149. package/models/operations/postv2modelslitellmimport.d.ts.map +1 -0
  150. package/models/operations/postv2modelslitellmimport.js +1400 -0
  151. package/models/operations/postv2modelslitellmimport.js.map +1 -0
  152. package/models/operations/retrievecontact.js +2 -2
  153. package/models/operations/retrievedatapoint.js +2 -2
  154. package/models/operations/retrievedataset.js +2 -2
  155. package/models/operations/retrievedatasource.js +2 -2
  156. package/models/operations/updatecontact.js +2 -2
  157. package/models/operations/updatedatapoint.js +2 -2
  158. package/models/operations/updatedataset.js +2 -2
  159. package/models/operations/updatedatasource.js +2 -2
  160. package/models/operations/updateeval.js +16 -16
  161. package/models/operations/updateprompt.d.ts +25 -78
  162. package/models/operations/updateprompt.d.ts.map +1 -1
  163. package/models/operations/updateprompt.js +33 -56
  164. package/models/operations/updateprompt.js.map +1 -1
  165. package/package.json +1 -1
  166. package/sdk/knowledge.d.ts +1 -1
  167. package/sdk/knowledge.d.ts.map +1 -1
  168. package/sdk/sdk.d.ts +16 -1
  169. package/sdk/sdk.d.ts.map +1 -1
  170. package/sdk/sdk.js +21 -0
  171. package/sdk/sdk.js.map +1 -1
  172. package/src/funcs/filesCreate.ts +11 -4
  173. package/src/funcs/getV2ModelsLitellmModels.ts +143 -0
  174. package/src/funcs/knowledgeCreateChunks.ts +4 -4
  175. package/src/funcs/postV2ModelsLitellmImport.ts +167 -0
  176. package/src/lib/config.ts +3 -3
  177. package/src/lib/files.ts +42 -0
  178. package/src/lib/security.ts +2 -2
  179. package/src/mcp-server/mcp-server.ts +1 -1
  180. package/src/mcp-server/server.ts +5 -1
  181. package/src/mcp-server/tools/getV2ModelsLitellmModels.ts +30 -0
  182. package/src/mcp-server/tools/postV2ModelsLitellmImport.ts +38 -0
  183. package/src/models/operations/createchunk.ts +54 -44
  184. package/src/models/operations/createcontact.ts +2 -2
  185. package/src/models/operations/createdataset.ts +2 -2
  186. package/src/models/operations/createdatasetitem.ts +2 -2
  187. package/src/models/operations/createdatasource.ts +2 -2
  188. package/src/models/operations/createeval.ts +16 -16
  189. package/src/models/operations/createfeedback.ts +16 -16
  190. package/src/models/operations/createprompt.ts +22 -20
  191. package/src/models/operations/deploymentgetconfig.ts +34 -28
  192. package/src/models/operations/deploymentinvoke.ts +1 -0
  193. package/src/models/operations/deployments.ts +5 -4
  194. package/src/models/operations/evalsageappropriate.ts +4 -4
  195. package/src/models/operations/evalsfactcheckingknowledgebase.ts +4 -4
  196. package/src/models/operations/evalsgrammar.ts +4 -4
  197. package/src/models/operations/evalslocalization.ts +4 -4
  198. package/src/models/operations/evalspii.ts +4 -4
  199. package/src/models/operations/evalsragascoherence.ts +4 -4
  200. package/src/models/operations/evalsragasconciseness.ts +4 -4
  201. package/src/models/operations/evalsragascontextprecision.ts +4 -4
  202. package/src/models/operations/evalsragascorrectness.ts +4 -4
  203. package/src/models/operations/evalsragasfaithfulness.ts +4 -4
  204. package/src/models/operations/evalsragasharmfulness.ts +4 -4
  205. package/src/models/operations/evalsragasmaliciousness.ts +4 -4
  206. package/src/models/operations/evalsragasresponserelevancy.ts +4 -4
  207. package/src/models/operations/evalssentimentclassification.ts +4 -4
  208. package/src/models/operations/evalssummarization.ts +4 -4
  209. package/src/models/operations/evalstoneofvoice.ts +4 -4
  210. package/src/models/operations/evalstranslation.ts +4 -4
  211. package/src/models/operations/fileget.ts +2 -2
  212. package/src/models/operations/filelist.ts +2 -2
  213. package/src/models/operations/fileupload.ts +2 -2
  214. package/src/models/operations/getallprompts.ts +13 -12
  215. package/src/models/operations/getevals.ts +155 -180
  216. package/src/models/operations/getoneprompt.ts +13 -12
  217. package/src/models/operations/getpromptversion.ts +13 -12
  218. package/src/models/operations/getv2modelslitellmmodels.ts +530 -0
  219. package/src/models/operations/index.ts +2 -0
  220. package/src/models/operations/invokeeval.ts +251 -223
  221. package/src/models/operations/listcontacts.ts +2 -2
  222. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  223. package/src/models/operations/listdatasets.ts +2 -2
  224. package/src/models/operations/listdatasources.ts +2 -2
  225. package/src/models/operations/listpromptversions.ts +13 -12
  226. package/src/models/operations/postv2modelslitellmimport.ts +2408 -0
  227. package/src/models/operations/retrievecontact.ts +2 -2
  228. package/src/models/operations/retrievedatapoint.ts +2 -2
  229. package/src/models/operations/retrievedataset.ts +2 -2
  230. package/src/models/operations/retrievedatasource.ts +2 -2
  231. package/src/models/operations/updatecontact.ts +2 -2
  232. package/src/models/operations/updatedatapoint.ts +2 -2
  233. package/src/models/operations/updatedataset.ts +2 -2
  234. package/src/models/operations/updatedatasource.ts +2 -2
  235. package/src/models/operations/updateeval.ts +16 -16
  236. package/src/models/operations/updateprompt.ts +43 -86
  237. package/src/sdk/knowledge.ts +1 -1
  238. package/src/sdk/sdk.ts +37 -1
@@ -0,0 +1,167 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { OrqCore } from "../core.js";
7
+ import { encodeJSON } from "../lib/encodings.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { OrqError } from "../models/errors/orqerror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Import models from LiteLLM
30
+ *
31
+ * @remarks
32
+ * Imports selected models from LiteLLM instance into the model garden
33
+ */
34
+ export function postV2ModelsLitellmImport(
35
+ client: OrqCore,
36
+ request?: Array<operations.RequestBody> | undefined,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ Array<operations.PostV2ModelsLitellmImportResponseBody>,
41
+ | OrqError
42
+ | ResponseValidationError
43
+ | ConnectionError
44
+ | RequestAbortedError
45
+ | RequestTimeoutError
46
+ | InvalidRequestError
47
+ | UnexpectedClientError
48
+ | SDKValidationError
49
+ >
50
+ > {
51
+ return new APIPromise($do(
52
+ client,
53
+ request,
54
+ options,
55
+ ));
56
+ }
57
+
58
+ async function $do(
59
+ client: OrqCore,
60
+ request?: Array<operations.RequestBody> | undefined,
61
+ options?: RequestOptions,
62
+ ): Promise<
63
+ [
64
+ Result<
65
+ Array<operations.PostV2ModelsLitellmImportResponseBody>,
66
+ | OrqError
67
+ | ResponseValidationError
68
+ | ConnectionError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | InvalidRequestError
72
+ | UnexpectedClientError
73
+ | SDKValidationError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) =>
81
+ z.array(operations.RequestBody$outboundSchema).optional().parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = payload === undefined
89
+ ? null
90
+ : encodeJSON("body", payload, { explode: true });
91
+
92
+ const path = pathToFunc("/v2/models/litellm/import")();
93
+
94
+ const headers = new Headers(compactMap({
95
+ "Content-Type": "application/json",
96
+ Accept: "application/json",
97
+ }));
98
+
99
+ const secConfig = await extractSecurity(client._options.apiKey);
100
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
101
+ const requestSecurity = resolveGlobalSecurity(securityInput);
102
+
103
+ const context = {
104
+ options: client._options,
105
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
106
+ operationID: "post_/v2/models/litellm/import",
107
+ oAuth2Scopes: [],
108
+
109
+ resolvedSecurity: requestSecurity,
110
+
111
+ securitySource: client._options.apiKey,
112
+ retryConfig: options?.retries
113
+ || client._options.retryConfig
114
+ || { strategy: "none" },
115
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
116
+ };
117
+
118
+ const requestRes = client._createRequest(context, {
119
+ security: requestSecurity,
120
+ method: "POST",
121
+ baseURL: options?.serverURL,
122
+ path: path,
123
+ headers: headers,
124
+ body: body,
125
+ userAgent: client._options.userAgent,
126
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
127
+ }, options);
128
+ if (!requestRes.ok) {
129
+ return [requestRes, { status: "invalid" }];
130
+ }
131
+ const req = requestRes.value;
132
+
133
+ const doResult = await client._do(req, {
134
+ context,
135
+ errorCodes: ["4XX", "5XX"],
136
+ retryConfig: context.retryConfig,
137
+ retryCodes: context.retryCodes,
138
+ });
139
+ if (!doResult.ok) {
140
+ return [doResult, { status: "request-error", request: req }];
141
+ }
142
+ const response = doResult.value;
143
+
144
+ const [result] = await M.match<
145
+ Array<operations.PostV2ModelsLitellmImportResponseBody>,
146
+ | OrqError
147
+ | ResponseValidationError
148
+ | ConnectionError
149
+ | RequestAbortedError
150
+ | RequestTimeoutError
151
+ | InvalidRequestError
152
+ | UnexpectedClientError
153
+ | SDKValidationError
154
+ >(
155
+ M.json(
156
+ 200,
157
+ z.array(operations.PostV2ModelsLitellmImportResponseBody$inboundSchema),
158
+ ),
159
+ M.fail("4XX"),
160
+ M.fail("5XX"),
161
+ )(response, req);
162
+ if (!result.ok) {
163
+ return [result, { status: "complete", request: req, response }];
164
+ }
165
+
166
+ return [result, { status: "complete", request: req, response }];
167
+ }
package/src/lib/config.ts CHANGED
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
70
  openapiDocVersion: "2.0",
71
- sdkVersion: "3.8.0-rc.3",
72
- genVersion: "2.623.0",
73
- userAgent: "speakeasy-sdk/typescript 3.8.0-rc.3 2.623.0 2.0 @orq-ai/node",
71
+ sdkVersion: "3.8.0-rc.30",
72
+ genVersion: "2.629.2",
73
+ userAgent: "speakeasy-sdk/typescript 3.8.0-rc.30 2.629.2 2.0 @orq-ai/node",
74
74
  } as const;
package/src/lib/files.ts CHANGED
@@ -38,3 +38,45 @@ export async function readableStreamToArrayBuffer(
38
38
 
39
39
  return concatenatedChunks.buffer as ArrayBuffer;
40
40
  }
41
+
42
+ /**
43
+ * Determines the MIME content type based on a file's extension.
44
+ * Returns null if the extension is not recognized.
45
+ */
46
+ export function getContentTypeFromFileName(fileName: string): string | null {
47
+ if (!fileName) return null;
48
+
49
+ const ext = fileName.toLowerCase().split(".").pop();
50
+ if (!ext) return null;
51
+
52
+ const mimeTypes: Record<string, string> = {
53
+ json: "application/json",
54
+ xml: "application/xml",
55
+ html: "text/html",
56
+ htm: "text/html",
57
+ txt: "text/plain",
58
+ csv: "text/csv",
59
+ pdf: "application/pdf",
60
+ png: "image/png",
61
+ jpg: "image/jpeg",
62
+ jpeg: "image/jpeg",
63
+ gif: "image/gif",
64
+ svg: "image/svg+xml",
65
+ js: "application/javascript",
66
+ css: "text/css",
67
+ zip: "application/zip",
68
+ tar: "application/x-tar",
69
+ gz: "application/gzip",
70
+ mp4: "video/mp4",
71
+ mp3: "audio/mpeg",
72
+ wav: "audio/wav",
73
+ webp: "image/webp",
74
+ ico: "image/x-icon",
75
+ woff: "font/woff",
76
+ woff2: "font/woff2",
77
+ ttf: "font/ttf",
78
+ otf: "font/otf",
79
+ };
80
+
81
+ return mimeTypes[ext] || null;
82
+ }
@@ -7,8 +7,8 @@ import { env } from "./env.js";
7
7
 
8
8
  type OAuth2PasswordFlow = {
9
9
  username: string;
10
- password?: string | undefined;
11
- clientID: string;
10
+ password: string;
11
+ clientID?: string | undefined;
12
12
  clientSecret?: string | undefined;
13
13
  tokenURL: string;
14
14
  };
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "3.8.0-rc.3",
22
+ currentVersion: "3.8.0-rc.30",
23
23
  },
24
24
  });
25
25
 
@@ -80,6 +80,7 @@ import { tool$filesCreate } from "./tools/filesCreate.js";
80
80
  import { tool$filesDelete } from "./tools/filesDelete.js";
81
81
  import { tool$filesGet } from "./tools/filesGet.js";
82
82
  import { tool$filesList } from "./tools/filesList.js";
83
+ import { tool$getV2ModelsLitellmModels } from "./tools/getV2ModelsLitellmModels.js";
83
84
  import { tool$knowledgeCreate } from "./tools/knowledgeCreate.js";
84
85
  import { tool$knowledgeCreateChunks } from "./tools/knowledgeCreateChunks.js";
85
86
  import { tool$knowledgeCreateDatasource } from "./tools/knowledgeCreateDatasource.js";
@@ -97,6 +98,7 @@ import { tool$knowledgeUpdate } from "./tools/knowledgeUpdate.js";
97
98
  import { tool$knowledgeUpdateChunk } from "./tools/knowledgeUpdateChunk.js";
98
99
  import { tool$knowledgeUpdateDatasource } from "./tools/knowledgeUpdateDatasource.js";
99
100
  import { tool$modelsList } from "./tools/modelsList.js";
101
+ import { tool$postV2ModelsLitellmImport } from "./tools/postV2ModelsLitellmImport.js";
100
102
  import { tool$promptsCreate } from "./tools/promptsCreate.js";
101
103
  import { tool$promptsDelete } from "./tools/promptsDelete.js";
102
104
  import { tool$promptsGetVersion } from "./tools/promptsGetVersion.js";
@@ -118,7 +120,7 @@ export function createMCPServer(deps: {
118
120
  }) {
119
121
  const server = new McpServer({
120
122
  name: "Orq",
121
- version: "3.8.0-rc.3",
123
+ version: "3.8.0-rc.30",
122
124
  });
123
125
 
124
126
  const client = new OrqCore({
@@ -150,6 +152,8 @@ export function createMCPServer(deps: {
150
152
  const register = { tool, resource, resourceTemplate, prompt };
151
153
  void register; // suppress unused warnings
152
154
 
155
+ tool(tool$getV2ModelsLitellmModels);
156
+ tool(tool$postV2ModelsLitellmImport);
153
157
  tool(tool$contactsCreate);
154
158
  tool(tool$contactsList);
155
159
  tool(tool$contactsRetrieve);
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { getV2ModelsLitellmModels } from "../../funcs/getV2ModelsLitellmModels.js";
6
+ import { formatResult, ToolDefinition } from "../tools.js";
7
+
8
+ export const tool$getV2ModelsLitellmModels: ToolDefinition = {
9
+ name: "get-v2-models-litellm-models",
10
+ description: `Get available models from LiteLLM
11
+
12
+ Fetches all available models from the configured LiteLLM instance`,
13
+ tool: async (client, ctx) => {
14
+ const [result, apiCall] = await getV2ModelsLitellmModels(
15
+ client,
16
+ { fetchOptions: { signal: ctx.signal } },
17
+ ).$inspect();
18
+
19
+ if (!result.ok) {
20
+ return {
21
+ content: [{ type: "text", text: result.error.message }],
22
+ isError: true,
23
+ };
24
+ }
25
+
26
+ const value = result.value;
27
+
28
+ return formatResult(value, apiCall);
29
+ },
30
+ };
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { postV2ModelsLitellmImport } from "../../funcs/postV2ModelsLitellmImport.js";
7
+ import * as operations from "../../models/operations/index.js";
8
+ import { formatResult, ToolDefinition } from "../tools.js";
9
+
10
+ const args = {
11
+ request: z.array(operations.RequestBody$inboundSchema).optional(),
12
+ };
13
+
14
+ export const tool$postV2ModelsLitellmImport: ToolDefinition<typeof args> = {
15
+ name: "post-v2-models-litellm-import",
16
+ description: `Import models from LiteLLM
17
+
18
+ Imports selected models from LiteLLM instance into the model garden`,
19
+ args,
20
+ tool: async (client, args, ctx) => {
21
+ const [result, apiCall] = await postV2ModelsLitellmImport(
22
+ client,
23
+ args.request,
24
+ { fetchOptions: { signal: ctx.signal } },
25
+ ).$inspect();
26
+
27
+ if (!result.ok) {
28
+ return {
29
+ content: [{ type: "text", text: result.error.message }],
30
+ isError: true,
31
+ };
32
+ }
33
+
34
+ const value = result.value;
35
+
36
+ return formatResult(value, apiCall);
37
+ },
38
+ };
@@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type CreateChunkMetadata = string | number | boolean;
13
13
 
14
- export type RequestBody = {
14
+ export type CreateChunkRequestBody = {
15
15
  /**
16
16
  * The text content of the chunk
17
17
  */
@@ -35,7 +35,7 @@ export type CreateChunkRequest = {
35
35
  * Unique identifier of the datasource
36
36
  */
37
37
  datasourceId: string;
38
- requestBody?: Array<RequestBody> | undefined;
38
+ requestBody?: Array<CreateChunkRequestBody> | undefined;
39
39
  };
40
40
 
41
41
  export type CreateChunkKnowledgeMetadata = string | number | boolean;
@@ -55,7 +55,7 @@ export const CreateChunkStatus = {
55
55
  */
56
56
  export type CreateChunkStatus = ClosedEnum<typeof CreateChunkStatus>;
57
57
 
58
- export type ResponseBody = {
58
+ export type CreateChunkResponseBody = {
59
59
  /**
60
60
  * The unique identifier of the chunk
61
61
  */
@@ -143,8 +143,8 @@ export function createChunkMetadataFromJSON(
143
143
  }
144
144
 
145
145
  /** @internal */
146
- export const RequestBody$inboundSchema: z.ZodType<
147
- RequestBody,
146
+ export const CreateChunkRequestBody$inboundSchema: z.ZodType<
147
+ CreateChunkRequestBody,
148
148
  z.ZodTypeDef,
149
149
  unknown
150
150
  > = z.object({
@@ -154,17 +154,17 @@ export const RequestBody$inboundSchema: z.ZodType<
154
154
  });
155
155
 
156
156
  /** @internal */
157
- export type RequestBody$Outbound = {
157
+ export type CreateChunkRequestBody$Outbound = {
158
158
  text: string;
159
159
  embedding?: Array<number> | undefined;
160
160
  metadata?: { [k: string]: string | number | boolean } | undefined;
161
161
  };
162
162
 
163
163
  /** @internal */
164
- export const RequestBody$outboundSchema: z.ZodType<
165
- RequestBody$Outbound,
164
+ export const CreateChunkRequestBody$outboundSchema: z.ZodType<
165
+ CreateChunkRequestBody$Outbound,
166
166
  z.ZodTypeDef,
167
- RequestBody
167
+ CreateChunkRequestBody
168
168
  > = z.object({
169
169
  text: z.string(),
170
170
  embedding: z.array(z.number()).optional(),
@@ -175,26 +175,30 @@ export const RequestBody$outboundSchema: z.ZodType<
175
175
  * @internal
176
176
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
177
177
  */
178
- export namespace RequestBody$ {
179
- /** @deprecated use `RequestBody$inboundSchema` instead. */
180
- export const inboundSchema = RequestBody$inboundSchema;
181
- /** @deprecated use `RequestBody$outboundSchema` instead. */
182
- export const outboundSchema = RequestBody$outboundSchema;
183
- /** @deprecated use `RequestBody$Outbound` instead. */
184
- export type Outbound = RequestBody$Outbound;
178
+ export namespace CreateChunkRequestBody$ {
179
+ /** @deprecated use `CreateChunkRequestBody$inboundSchema` instead. */
180
+ export const inboundSchema = CreateChunkRequestBody$inboundSchema;
181
+ /** @deprecated use `CreateChunkRequestBody$outboundSchema` instead. */
182
+ export const outboundSchema = CreateChunkRequestBody$outboundSchema;
183
+ /** @deprecated use `CreateChunkRequestBody$Outbound` instead. */
184
+ export type Outbound = CreateChunkRequestBody$Outbound;
185
185
  }
186
186
 
187
- export function requestBodyToJSON(requestBody: RequestBody): string {
188
- return JSON.stringify(RequestBody$outboundSchema.parse(requestBody));
187
+ export function createChunkRequestBodyToJSON(
188
+ createChunkRequestBody: CreateChunkRequestBody,
189
+ ): string {
190
+ return JSON.stringify(
191
+ CreateChunkRequestBody$outboundSchema.parse(createChunkRequestBody),
192
+ );
189
193
  }
190
194
 
191
- export function requestBodyFromJSON(
195
+ export function createChunkRequestBodyFromJSON(
192
196
  jsonString: string,
193
- ): SafeParseResult<RequestBody, SDKValidationError> {
197
+ ): SafeParseResult<CreateChunkRequestBody, SDKValidationError> {
194
198
  return safeParse(
195
199
  jsonString,
196
- (x) => RequestBody$inboundSchema.parse(JSON.parse(x)),
197
- `Failed to parse 'RequestBody' from JSON`,
200
+ (x) => CreateChunkRequestBody$inboundSchema.parse(JSON.parse(x)),
201
+ `Failed to parse 'CreateChunkRequestBody' from JSON`,
198
202
  );
199
203
  }
200
204
 
@@ -206,7 +210,8 @@ export const CreateChunkRequest$inboundSchema: z.ZodType<
206
210
  > = z.object({
207
211
  knowledge_id: z.string(),
208
212
  datasource_id: z.string(),
209
- RequestBody: z.array(z.lazy(() => RequestBody$inboundSchema)).optional(),
213
+ RequestBody: z.array(z.lazy(() => CreateChunkRequestBody$inboundSchema))
214
+ .optional(),
210
215
  }).transform((v) => {
211
216
  return remap$(v, {
212
217
  "knowledge_id": "knowledgeId",
@@ -219,7 +224,7 @@ export const CreateChunkRequest$inboundSchema: z.ZodType<
219
224
  export type CreateChunkRequest$Outbound = {
220
225
  knowledge_id: string;
221
226
  datasource_id: string;
222
- RequestBody?: Array<RequestBody$Outbound> | undefined;
227
+ RequestBody?: Array<CreateChunkRequestBody$Outbound> | undefined;
223
228
  };
224
229
 
225
230
  /** @internal */
@@ -230,7 +235,8 @@ export const CreateChunkRequest$outboundSchema: z.ZodType<
230
235
  > = z.object({
231
236
  knowledgeId: z.string(),
232
237
  datasourceId: z.string(),
233
- requestBody: z.array(z.lazy(() => RequestBody$outboundSchema)).optional(),
238
+ requestBody: z.array(z.lazy(() => CreateChunkRequestBody$outboundSchema))
239
+ .optional(),
234
240
  }).transform((v) => {
235
241
  return remap$(v, {
236
242
  knowledgeId: "knowledge_id",
@@ -342,8 +348,8 @@ export namespace CreateChunkStatus$ {
342
348
  }
343
349
 
344
350
  /** @internal */
345
- export const ResponseBody$inboundSchema: z.ZodType<
346
- ResponseBody,
351
+ export const CreateChunkResponseBody$inboundSchema: z.ZodType<
352
+ CreateChunkResponseBody,
347
353
  z.ZodTypeDef,
348
354
  unknown
349
355
  > = z.object({
@@ -365,7 +371,7 @@ export const ResponseBody$inboundSchema: z.ZodType<
365
371
  });
366
372
 
367
373
  /** @internal */
368
- export type ResponseBody$Outbound = {
374
+ export type CreateChunkResponseBody$Outbound = {
369
375
  _id: string;
370
376
  text: string;
371
377
  metadata?: { [k: string]: string | number | boolean } | undefined;
@@ -378,10 +384,10 @@ export type ResponseBody$Outbound = {
378
384
  };
379
385
 
380
386
  /** @internal */
381
- export const ResponseBody$outboundSchema: z.ZodType<
382
- ResponseBody$Outbound,
387
+ export const CreateChunkResponseBody$outboundSchema: z.ZodType<
388
+ CreateChunkResponseBody$Outbound,
383
389
  z.ZodTypeDef,
384
- ResponseBody
390
+ CreateChunkResponseBody
385
391
  > = z.object({
386
392
  id: z.string(),
387
393
  text: z.string(),
@@ -404,25 +410,29 @@ export const ResponseBody$outboundSchema: z.ZodType<
404
410
  * @internal
405
411
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
406
412
  */
407
- export namespace ResponseBody$ {
408
- /** @deprecated use `ResponseBody$inboundSchema` instead. */
409
- export const inboundSchema = ResponseBody$inboundSchema;
410
- /** @deprecated use `ResponseBody$outboundSchema` instead. */
411
- export const outboundSchema = ResponseBody$outboundSchema;
412
- /** @deprecated use `ResponseBody$Outbound` instead. */
413
- export type Outbound = ResponseBody$Outbound;
413
+ export namespace CreateChunkResponseBody$ {
414
+ /** @deprecated use `CreateChunkResponseBody$inboundSchema` instead. */
415
+ export const inboundSchema = CreateChunkResponseBody$inboundSchema;
416
+ /** @deprecated use `CreateChunkResponseBody$outboundSchema` instead. */
417
+ export const outboundSchema = CreateChunkResponseBody$outboundSchema;
418
+ /** @deprecated use `CreateChunkResponseBody$Outbound` instead. */
419
+ export type Outbound = CreateChunkResponseBody$Outbound;
414
420
  }
415
421
 
416
- export function responseBodyToJSON(responseBody: ResponseBody): string {
417
- return JSON.stringify(ResponseBody$outboundSchema.parse(responseBody));
422
+ export function createChunkResponseBodyToJSON(
423
+ createChunkResponseBody: CreateChunkResponseBody,
424
+ ): string {
425
+ return JSON.stringify(
426
+ CreateChunkResponseBody$outboundSchema.parse(createChunkResponseBody),
427
+ );
418
428
  }
419
429
 
420
- export function responseBodyFromJSON(
430
+ export function createChunkResponseBodyFromJSON(
421
431
  jsonString: string,
422
- ): SafeParseResult<ResponseBody, SDKValidationError> {
432
+ ): SafeParseResult<CreateChunkResponseBody, SDKValidationError> {
423
433
  return safeParse(
424
434
  jsonString,
425
- (x) => ResponseBody$inboundSchema.parse(JSON.parse(x)),
426
- `Failed to parse 'ResponseBody' from JSON`,
435
+ (x) => CreateChunkResponseBody$inboundSchema.parse(JSON.parse(x)),
436
+ `Failed to parse 'CreateChunkResponseBody' from JSON`,
427
437
  );
428
438
  }
@@ -182,7 +182,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
182
182
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
183
183
  .optional(),
184
184
  updated: z.string().datetime({ offset: true }).default(
185
- "2025-06-06T07:26:58.868Z",
185
+ "2025-06-16T13:25:07.062Z",
186
186
  ).transform(v => new Date(v)),
187
187
  }).transform((v) => {
188
188
  return remap$(v, {
@@ -223,7 +223,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
223
223
  tags: z.array(z.string()).optional(),
224
224
  metadata: z.record(z.any()).optional(),
225
225
  created: z.date().transform(v => v.toISOString()).optional(),
226
- updated: z.date().default(() => new Date("2025-06-06T07:26:58.868Z"))
226
+ updated: z.date().default(() => new Date("2025-06-16T13:25:07.062Z"))
227
227
  .transform(v => v.toISOString()),
228
228
  }).transform((v) => {
229
229
  return remap$(v, {
@@ -211,7 +211,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
211
211
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
212
212
  .optional(),
213
213
  updated: z.string().datetime({ offset: true }).default(
214
- "2025-06-06T07:26:58.868Z",
214
+ "2025-06-16T13:25:07.062Z",
215
215
  ).transform(v => new Date(v)),
216
216
  }).transform((v) => {
217
217
  return remap$(v, {
@@ -251,7 +251,7 @@ export const CreateDatasetResponseBody$outboundSchema: z.ZodType<
251
251
  updatedById: z.string().optional(),
252
252
  metadata: z.lazy(() => CreateDatasetMetadata$outboundSchema),
253
253
  created: z.date().transform(v => v.toISOString()).optional(),
254
- updated: z.date().default(() => new Date("2025-06-06T07:26:58.868Z"))
254
+ updated: z.date().default(() => new Date("2025-06-16T13:25:07.062Z"))
255
255
  .transform(v => v.toISOString()),
256
256
  }).transform((v) => {
257
257
  return remap$(v, {
@@ -5111,7 +5111,7 @@ export const CreateDatasetItemResponseBody$inboundSchema: z.ZodType<
5111
5111
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
5112
5112
  .optional(),
5113
5113
  updated: z.string().datetime({ offset: true }).default(
5114
- "2025-06-06T07:26:58.868Z",
5114
+ "2025-06-16T13:25:07.062Z",
5115
5115
  ).transform(v => new Date(v)),
5116
5116
  }).transform((v) => {
5117
5117
  return remap$(v, {
@@ -5175,7 +5175,7 @@ export const CreateDatasetItemResponseBody$outboundSchema: z.ZodType<
5175
5175
  createdById: z.string().optional(),
5176
5176
  updatedById: z.string().optional(),
5177
5177
  created: z.date().transform(v => v.toISOString()).optional(),
5178
- updated: z.date().default(() => new Date("2025-06-06T07:26:58.868Z"))
5178
+ updated: z.date().default(() => new Date("2025-06-16T13:25:07.062Z"))
5179
5179
  .transform(v => v.toISOString()),
5180
5180
  }).transform((v) => {
5181
5181
  return remap$(v, {
@@ -751,7 +751,7 @@ export const CreateDatasourceResponseBody$inboundSchema: z.ZodType<
751
751
  z.ZodTypeDef,
752
752
  unknown
753
753
  > = z.object({
754
- _id: z.string().default("01JX225RQV7K6RRPKMCCAFPK1M"),
754
+ _id: z.string().default("01JXWEMQ3RX1JSF4JPZY41PYG3"),
755
755
  display_name: z.string(),
756
756
  description: z.string().optional(),
757
757
  status: CreateDatasourceStatus$inboundSchema,
@@ -795,7 +795,7 @@ export const CreateDatasourceResponseBody$outboundSchema: z.ZodType<
795
795
  z.ZodTypeDef,
796
796
  CreateDatasourceResponseBody
797
797
  > = z.object({
798
- id: z.string().default("01JX225RQV7K6RRPKMCCAFPK1M"),
798
+ id: z.string().default("01JXWEMQ3RX1JSF4JPZY41PYG3"),
799
799
  displayName: z.string(),
800
800
  description: z.string().optional(),
801
801
  status: CreateDatasourceStatus$outboundSchema,