@orq-ai/node 4.10.26 → 4.10.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.
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/event-streams.d.ts +7 -2
- package/lib/event-streams.d.ts.map +1 -1
- package/lib/event-streams.js +2 -1
- package/lib/event-streams.js.map +1 -1
- package/models/components/azurefoundrydeployment.d.ts +3 -0
- package/models/components/azurefoundrydeployment.d.ts.map +1 -1
- package/models/components/azurefoundrydeployment.js +4 -0
- package/models/components/azurefoundrydeployment.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/modelcreateawsbedrock.d.ts +4 -0
- package/models/operations/modelcreateawsbedrock.d.ts.map +1 -1
- package/models/operations/modelcreateawsbedrock.js +4 -0
- package/models/operations/modelcreateawsbedrock.js.map +1 -1
- package/models/operations/modelupdateawsbedrock.d.ts +4 -2
- package/models/operations/modelupdateawsbedrock.d.ts.map +1 -1
- package/models/operations/modelupdateawsbedrock.js +4 -2
- package/models/operations/modelupdateawsbedrock.js.map +1 -1
- package/models/operations/modelvalidateawsbedrock.d.ts +2 -0
- package/models/operations/modelvalidateawsbedrock.d.ts.map +1 -1
- package/models/operations/modelvalidateawsbedrock.js +2 -0
- package/models/operations/modelvalidateawsbedrock.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updatetool.js +7 -7
- package/package.json +3 -3
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +2 -2
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +8 -5
- package/packages/orq-rc/src/funcs/agentsStream.ts +2 -2
- package/packages/orq-rc/src/funcs/annotationsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/annotationsDelete.ts +1 -1
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +4 -4
- package/packages/orq-rc/src/funcs/promptsCreate.ts +4 -3
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/event-streams.ts +15 -7
- package/packages/orq-rc/src/models/components/agentresponserequest.ts +565 -0
- package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +55 -43
- package/packages/orq-rc/src/models/components/budget.ts +12 -0
- package/packages/orq-rc/src/models/components/budgetlimits.ts +12 -4
- package/packages/orq-rc/src/models/components/budgetusage.ts +54 -0
- package/packages/orq-rc/src/models/components/getbudgetconsumptionresponse.ts +7 -3
- package/packages/orq-rc/src/models/components/index.ts +3 -4
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3457 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +24 -14
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +4 -550
- package/packages/orq-rc/src/models/operations/createannotation.ts +110 -16
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +335 -19
- package/packages/orq-rc/src/models/operations/createdatasource.ts +4 -1
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/createprompt.ts +13 -9
- package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
- package/packages/orq-rc/src/models/operations/deleteannotation.ts +46 -3
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +1156 -1606
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +221 -3675
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -1
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +244 -286
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -1
- package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
- package/packages/orq-rc/src/models/operations/getevals.ts +16 -16
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/invokeagent.ts +90 -116
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +378 -19
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -1
- package/packages/orq-rc/src/models/operations/modelcreateawsbedrock.ts +8 -0
- package/packages/orq-rc/src/models/operations/modelupdateawsbedrock.ts +8 -4
- package/packages/orq-rc/src/models/operations/modelvalidateawsbedrock.ts +4 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +42 -18
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +363 -19
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamagent.ts +16 -11
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +366 -19
- package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/updateprompt.ts +17 -12
- package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/sdk/agents.ts +2 -2
- package/packages/orq-rc/src/sdk/annotations.ts +2 -2
- package/packages/orq-rc/src/sdk/deployments.ts +2 -1
- package/packages/orq-rc/src/sdk/feedback.ts +1 -4
- package/packages/orq-rc/src/sdk/models.ts +0 -35
- package/packages/orq-rc/src/sdk/orqresponses.ts +2 -2
- package/packages/orq-rc/src/sdk/prompts.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +15 -7
- package/src/models/components/azurefoundrydeployment.ts +7 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/modelcreateawsbedrock.ts +8 -0
- package/src/models/operations/modelupdateawsbedrock.ts +8 -4
- package/src/models/operations/modelvalidateawsbedrock.ts +4 -0
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/funcs/modelsImportLitellm.ts +0 -166
- package/packages/orq-rc/src/funcs/modelsListLitellm.ts +0 -144
- package/packages/orq-rc/src/models/components/litellmmodel.ts +0 -50
- package/packages/orq-rc/src/models/components/litellmmodelinfo.ts +0 -97
- package/packages/orq-rc/src/models/components/litellmparams.ts +0 -43
- package/packages/orq-rc/src/models/components/modeldocument.ts +0 -112
|
@@ -1553,8 +1553,8 @@ export const ResponseBodyTypescript$inboundSchema: z.ZodType<
|
|
|
1553
1553
|
> = z.object({
|
|
1554
1554
|
_id: z.string(),
|
|
1555
1555
|
description: z.string(),
|
|
1556
|
-
created: z.string().default("2026-06-
|
|
1557
|
-
updated: z.string().default("2026-06-
|
|
1556
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
1557
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
1558
1558
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
1559
1559
|
guardrail_config: z.nullable(
|
|
1560
1560
|
z.union([
|
|
@@ -1749,8 +1749,8 @@ export const ResponseBodyRagas$inboundSchema: z.ZodType<
|
|
|
1749
1749
|
> = z.object({
|
|
1750
1750
|
_id: z.string(),
|
|
1751
1751
|
description: z.string(),
|
|
1752
|
-
created: z.string().default("2026-06-
|
|
1753
|
-
updated: z.string().default("2026-06-
|
|
1752
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
1753
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
1754
1754
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
1755
1755
|
guardrail_config: z.nullable(
|
|
1756
1756
|
z.union([
|
|
@@ -2608,8 +2608,8 @@ export const ResponseBodyFunction$inboundSchema: z.ZodType<
|
|
|
2608
2608
|
> = z.object({
|
|
2609
2609
|
_id: z.string(),
|
|
2610
2610
|
description: z.string(),
|
|
2611
|
-
created: z.string().default("2026-06-
|
|
2612
|
-
updated: z.string().default("2026-06-
|
|
2611
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
2612
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
2613
2613
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
2614
2614
|
guardrail_config: z.nullable(
|
|
2615
2615
|
z.union([
|
|
@@ -2827,8 +2827,8 @@ export const UpdateEvalResponseBodyPython$inboundSchema: z.ZodType<
|
|
|
2827
2827
|
> = z.object({
|
|
2828
2828
|
_id: z.string(),
|
|
2829
2829
|
description: z.string(),
|
|
2830
|
-
created: z.string().default("2026-06-
|
|
2831
|
-
updated: z.string().default("2026-06-
|
|
2830
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
2831
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
2832
2832
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
2833
2833
|
guardrail_config: z.nullable(
|
|
2834
2834
|
z.union([
|
|
@@ -2996,8 +2996,8 @@ export const ResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
|
2996
2996
|
> = z.object({
|
|
2997
2997
|
_id: z.string(),
|
|
2998
2998
|
description: z.string(),
|
|
2999
|
-
created: z.string().default("2026-06-
|
|
3000
|
-
updated: z.string().default("2026-06-
|
|
2999
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3000
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3001
3001
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3002
3002
|
guardrail_config: z.nullable(
|
|
3003
3003
|
z.union([
|
|
@@ -3150,8 +3150,8 @@ export const ResponseBodyJSON$inboundSchema: z.ZodType<
|
|
|
3150
3150
|
> = z.object({
|
|
3151
3151
|
_id: z.string(),
|
|
3152
3152
|
description: z.string(),
|
|
3153
|
-
created: z.string().default("2026-06-
|
|
3154
|
-
updated: z.string().default("2026-06-
|
|
3153
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3154
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3155
3155
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3156
3156
|
guardrail_config: z.nullable(
|
|
3157
3157
|
z.union([
|
|
@@ -3513,8 +3513,8 @@ export const UpdateEvalLlm2$inboundSchema: z.ZodType<
|
|
|
3513
3513
|
> = z.object({
|
|
3514
3514
|
_id: z.string(),
|
|
3515
3515
|
description: z.string(),
|
|
3516
|
-
created: z.string().default("2026-06-
|
|
3517
|
-
updated: z.string().default("2026-06-
|
|
3516
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3517
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3518
3518
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3519
3519
|
guardrail_config: z.nullable(
|
|
3520
3520
|
z.union([
|
|
@@ -3726,8 +3726,8 @@ export const UpdateEvalLlm1$inboundSchema: z.ZodType<
|
|
|
3726
3726
|
> = z.object({
|
|
3727
3727
|
_id: z.string(),
|
|
3728
3728
|
description: z.string(),
|
|
3729
|
-
created: z.string().default("2026-06-
|
|
3730
|
-
updated: z.string().default("2026-06-
|
|
3729
|
+
created: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3730
|
+
updated: z.string().default("2026-06-21T22:05:24.014Z"),
|
|
3731
3731
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3732
3732
|
guardrail_config: z.nullable(
|
|
3733
3733
|
z.union([
|
|
@@ -1472,7 +1472,7 @@ export const RequestBodyTools$outboundSchema: z.ZodType<
|
|
|
1472
1472
|
z.ZodTypeDef,
|
|
1473
1473
|
RequestBodyTools
|
|
1474
1474
|
> = z.object({
|
|
1475
|
-
id: z.string().default("
|
|
1475
|
+
id: z.string().default("01KVP3FXQSE3KC416HQ2ZFXVCN"),
|
|
1476
1476
|
name: z.string(),
|
|
1477
1477
|
description: z.string().optional(),
|
|
1478
1478
|
schema: z.lazy(() => UpdateToolRequestBodyToolsSchema$outboundSchema),
|
|
@@ -2193,7 +2193,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
2193
2193
|
z.ZodTypeDef,
|
|
2194
2194
|
unknown
|
|
2195
2195
|
> = z.object({
|
|
2196
|
-
_id: z.string().default("
|
|
2196
|
+
_id: z.string().default("tool_01KVP3FXQDAK8ZB2AXRHV3AGXE"),
|
|
2197
2197
|
path: z.string(),
|
|
2198
2198
|
key: z.string(),
|
|
2199
2199
|
display_name: z.string().optional(),
|
|
@@ -2296,7 +2296,7 @@ export const UpdateToolResponseBodyTools$inboundSchema: z.ZodType<
|
|
|
2296
2296
|
z.ZodTypeDef,
|
|
2297
2297
|
unknown
|
|
2298
2298
|
> = z.object({
|
|
2299
|
-
id: z.string().default("
|
|
2299
|
+
id: z.string().default("01KVP3FXQB2T3QNHNPSBA3N17Z"),
|
|
2300
2300
|
name: z.string(),
|
|
2301
2301
|
description: z.string().optional(),
|
|
2302
2302
|
schema: z.lazy(() => UpdateToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -2354,7 +2354,7 @@ export const UpdateToolResponseBodyMCPTool$inboundSchema: z.ZodType<
|
|
|
2354
2354
|
z.ZodTypeDef,
|
|
2355
2355
|
unknown
|
|
2356
2356
|
> = z.object({
|
|
2357
|
-
_id: z.string().default("
|
|
2357
|
+
_id: z.string().default("tool_01KVP3FXQ9C9HA27G1ZDTQ1W9F"),
|
|
2358
2358
|
path: z.string(),
|
|
2359
2359
|
key: z.string(),
|
|
2360
2360
|
display_name: z.string().optional(),
|
|
@@ -2543,7 +2543,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
2543
2543
|
z.ZodTypeDef,
|
|
2544
2544
|
unknown
|
|
2545
2545
|
> = z.object({
|
|
2546
|
-
_id: z.string().default("
|
|
2546
|
+
_id: z.string().default("tool_01KVP3FXQ688C5P7N3TQNZB2ZJ"),
|
|
2547
2547
|
path: z.string(),
|
|
2548
2548
|
key: z.string(),
|
|
2549
2549
|
display_name: z.string().optional(),
|
|
@@ -2638,7 +2638,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
2638
2638
|
z.ZodTypeDef,
|
|
2639
2639
|
unknown
|
|
2640
2640
|
> = z.object({
|
|
2641
|
-
_id: z.string().default("
|
|
2641
|
+
_id: z.string().default("tool_01KVP3FXQ4XBHE3KPCN0RSSE5C"),
|
|
2642
2642
|
path: z.string(),
|
|
2643
2643
|
key: z.string(),
|
|
2644
2644
|
display_name: z.string().optional(),
|
|
@@ -2741,7 +2741,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
2741
2741
|
z.ZodTypeDef,
|
|
2742
2742
|
unknown
|
|
2743
2743
|
> = z.object({
|
|
2744
|
-
_id: z.string().default("
|
|
2744
|
+
_id: z.string().default("tool_01KVP3FXQ14YX02V9AS9BVKZ7C"),
|
|
2745
2745
|
path: z.string(),
|
|
2746
2746
|
key: z.string(),
|
|
2747
2747
|
display_name: z.string().optional(),
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { OrqCore } from "../core.js";
|
|
7
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
8
|
-
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
-
import * as M from "../lib/matchers.js";
|
|
10
|
-
import { compactMap } from "../lib/primitives.js";
|
|
11
|
-
import { safeParse } from "../lib/schemas.js";
|
|
12
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
-
import { pathToFunc } from "../lib/url.js";
|
|
15
|
-
import * as components from "../models/components/index.js";
|
|
16
|
-
import {
|
|
17
|
-
ConnectionError,
|
|
18
|
-
InvalidRequestError,
|
|
19
|
-
RequestAbortedError,
|
|
20
|
-
RequestTimeoutError,
|
|
21
|
-
UnexpectedClientError,
|
|
22
|
-
} from "../models/errors/httpclienterrors.js";
|
|
23
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
24
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Import models from LiteLLM
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Bulk-imports a list of LiteLLM model definitions into the workspace model garden.
|
|
34
|
-
*/
|
|
35
|
-
export function modelsImportLitellm(
|
|
36
|
-
client: OrqCore,
|
|
37
|
-
request: Array<components.LiteLLMModel> | null,
|
|
38
|
-
options?: RequestOptions,
|
|
39
|
-
): APIPromise<
|
|
40
|
-
Result<
|
|
41
|
-
Array<components.ModelDocument>,
|
|
42
|
-
| OrqError
|
|
43
|
-
| ResponseValidationError
|
|
44
|
-
| ConnectionError
|
|
45
|
-
| RequestAbortedError
|
|
46
|
-
| RequestTimeoutError
|
|
47
|
-
| InvalidRequestError
|
|
48
|
-
| UnexpectedClientError
|
|
49
|
-
| SDKValidationError
|
|
50
|
-
>
|
|
51
|
-
> {
|
|
52
|
-
return new APIPromise($do(
|
|
53
|
-
client,
|
|
54
|
-
request,
|
|
55
|
-
options,
|
|
56
|
-
));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function $do(
|
|
60
|
-
client: OrqCore,
|
|
61
|
-
request: Array<components.LiteLLMModel> | null,
|
|
62
|
-
options?: RequestOptions,
|
|
63
|
-
): Promise<
|
|
64
|
-
[
|
|
65
|
-
Result<
|
|
66
|
-
Array<components.ModelDocument>,
|
|
67
|
-
| OrqError
|
|
68
|
-
| ResponseValidationError
|
|
69
|
-
| ConnectionError
|
|
70
|
-
| RequestAbortedError
|
|
71
|
-
| RequestTimeoutError
|
|
72
|
-
| InvalidRequestError
|
|
73
|
-
| UnexpectedClientError
|
|
74
|
-
| SDKValidationError
|
|
75
|
-
>,
|
|
76
|
-
APICall,
|
|
77
|
-
]
|
|
78
|
-
> {
|
|
79
|
-
const parsed = safeParse(
|
|
80
|
-
request,
|
|
81
|
-
(value) =>
|
|
82
|
-
z.nullable(z.array(components.LiteLLMModel$outboundSchema)).parse(value),
|
|
83
|
-
"Input validation failed",
|
|
84
|
-
);
|
|
85
|
-
if (!parsed.ok) {
|
|
86
|
-
return [parsed, { status: "invalid" }];
|
|
87
|
-
}
|
|
88
|
-
const payload = parsed.value;
|
|
89
|
-
const body = payload === undefined
|
|
90
|
-
? null
|
|
91
|
-
: encodeJSON("body", payload, { explode: true });
|
|
92
|
-
|
|
93
|
-
const path = pathToFunc("/v2/models/litellm/import")();
|
|
94
|
-
|
|
95
|
-
const headers = new Headers(compactMap({
|
|
96
|
-
"Content-Type": "application/json",
|
|
97
|
-
Accept: "application/json",
|
|
98
|
-
}));
|
|
99
|
-
|
|
100
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
101
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
|
-
|
|
104
|
-
const context = {
|
|
105
|
-
options: client._options,
|
|
106
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
107
|
-
operationID: "ModelLiteLLMImport",
|
|
108
|
-
oAuth2Scopes: null,
|
|
109
|
-
|
|
110
|
-
resolvedSecurity: requestSecurity,
|
|
111
|
-
|
|
112
|
-
securitySource: client._options.apiKey,
|
|
113
|
-
retryConfig: options?.retries
|
|
114
|
-
|| client._options.retryConfig
|
|
115
|
-
|| { strategy: "none" },
|
|
116
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
const requestRes = client._createRequest(context, {
|
|
120
|
-
security: requestSecurity,
|
|
121
|
-
method: "POST",
|
|
122
|
-
baseURL: options?.serverURL,
|
|
123
|
-
path: path,
|
|
124
|
-
headers: headers,
|
|
125
|
-
body: body,
|
|
126
|
-
userAgent: client._options.userAgent,
|
|
127
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
128
|
-
}, options);
|
|
129
|
-
if (!requestRes.ok) {
|
|
130
|
-
return [requestRes, { status: "invalid" }];
|
|
131
|
-
}
|
|
132
|
-
const req = requestRes.value;
|
|
133
|
-
|
|
134
|
-
const doResult = await client._do(req, {
|
|
135
|
-
context,
|
|
136
|
-
isErrorStatusCode: (statusCode: number) =>
|
|
137
|
-
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
138
|
-
retryConfig: context.retryConfig,
|
|
139
|
-
retryCodes: context.retryCodes,
|
|
140
|
-
});
|
|
141
|
-
if (!doResult.ok) {
|
|
142
|
-
return [doResult, { status: "request-error", request: req }];
|
|
143
|
-
}
|
|
144
|
-
const response = doResult.value;
|
|
145
|
-
|
|
146
|
-
const [result] = await M.match<
|
|
147
|
-
Array<components.ModelDocument>,
|
|
148
|
-
| OrqError
|
|
149
|
-
| ResponseValidationError
|
|
150
|
-
| ConnectionError
|
|
151
|
-
| RequestAbortedError
|
|
152
|
-
| RequestTimeoutError
|
|
153
|
-
| InvalidRequestError
|
|
154
|
-
| UnexpectedClientError
|
|
155
|
-
| SDKValidationError
|
|
156
|
-
>(
|
|
157
|
-
M.json(200, z.array(components.ModelDocument$inboundSchema)),
|
|
158
|
-
M.fail([400, 404, "4XX"]),
|
|
159
|
-
M.fail("5XX"),
|
|
160
|
-
)(response, req);
|
|
161
|
-
if (!result.ok) {
|
|
162
|
-
return [result, { status: "complete", request: req, response }];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return [result, { status: "complete", request: req, response }];
|
|
166
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { OrqCore } from "../core.js";
|
|
7
|
-
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
21
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
-
import { Result } from "../types/fp.js";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* List models from configured LiteLLM instance
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Fetches the list of models from the LiteLLM instance configured for the workspace. Requires a stored LiteLLM integration.
|
|
31
|
-
*/
|
|
32
|
-
export function modelsListLitellm(
|
|
33
|
-
client: OrqCore,
|
|
34
|
-
options?: RequestOptions,
|
|
35
|
-
): APIPromise<
|
|
36
|
-
Result<
|
|
37
|
-
Array<{ [k: string]: any }>,
|
|
38
|
-
| OrqError
|
|
39
|
-
| ResponseValidationError
|
|
40
|
-
| ConnectionError
|
|
41
|
-
| RequestAbortedError
|
|
42
|
-
| RequestTimeoutError
|
|
43
|
-
| InvalidRequestError
|
|
44
|
-
| UnexpectedClientError
|
|
45
|
-
| SDKValidationError
|
|
46
|
-
>
|
|
47
|
-
> {
|
|
48
|
-
return new APIPromise($do(
|
|
49
|
-
client,
|
|
50
|
-
options,
|
|
51
|
-
));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async function $do(
|
|
55
|
-
client: OrqCore,
|
|
56
|
-
options?: RequestOptions,
|
|
57
|
-
): Promise<
|
|
58
|
-
[
|
|
59
|
-
Result<
|
|
60
|
-
Array<{ [k: string]: any }>,
|
|
61
|
-
| OrqError
|
|
62
|
-
| ResponseValidationError
|
|
63
|
-
| ConnectionError
|
|
64
|
-
| RequestAbortedError
|
|
65
|
-
| RequestTimeoutError
|
|
66
|
-
| InvalidRequestError
|
|
67
|
-
| UnexpectedClientError
|
|
68
|
-
| SDKValidationError
|
|
69
|
-
>,
|
|
70
|
-
APICall,
|
|
71
|
-
]
|
|
72
|
-
> {
|
|
73
|
-
const path = pathToFunc("/v2/models/litellm/models")();
|
|
74
|
-
|
|
75
|
-
const headers = new Headers(compactMap({
|
|
76
|
-
Accept: "application/json",
|
|
77
|
-
}));
|
|
78
|
-
|
|
79
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
80
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
81
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
-
|
|
83
|
-
const context = {
|
|
84
|
-
options: client._options,
|
|
85
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
86
|
-
operationID: "ModelListLitellm",
|
|
87
|
-
oAuth2Scopes: null,
|
|
88
|
-
|
|
89
|
-
resolvedSecurity: requestSecurity,
|
|
90
|
-
|
|
91
|
-
securitySource: client._options.apiKey,
|
|
92
|
-
retryConfig: options?.retries
|
|
93
|
-
|| client._options.retryConfig
|
|
94
|
-
|| { strategy: "none" },
|
|
95
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const requestRes = client._createRequest(context, {
|
|
99
|
-
security: requestSecurity,
|
|
100
|
-
method: "GET",
|
|
101
|
-
baseURL: options?.serverURL,
|
|
102
|
-
path: path,
|
|
103
|
-
headers: headers,
|
|
104
|
-
userAgent: client._options.userAgent,
|
|
105
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
106
|
-
}, options);
|
|
107
|
-
if (!requestRes.ok) {
|
|
108
|
-
return [requestRes, { status: "invalid" }];
|
|
109
|
-
}
|
|
110
|
-
const req = requestRes.value;
|
|
111
|
-
|
|
112
|
-
const doResult = await client._do(req, {
|
|
113
|
-
context,
|
|
114
|
-
isErrorStatusCode: (statusCode: number) =>
|
|
115
|
-
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
116
|
-
retryConfig: context.retryConfig,
|
|
117
|
-
retryCodes: context.retryCodes,
|
|
118
|
-
});
|
|
119
|
-
if (!doResult.ok) {
|
|
120
|
-
return [doResult, { status: "request-error", request: req }];
|
|
121
|
-
}
|
|
122
|
-
const response = doResult.value;
|
|
123
|
-
|
|
124
|
-
const [result] = await M.match<
|
|
125
|
-
Array<{ [k: string]: any }>,
|
|
126
|
-
| OrqError
|
|
127
|
-
| ResponseValidationError
|
|
128
|
-
| ConnectionError
|
|
129
|
-
| RequestAbortedError
|
|
130
|
-
| RequestTimeoutError
|
|
131
|
-
| InvalidRequestError
|
|
132
|
-
| UnexpectedClientError
|
|
133
|
-
| SDKValidationError
|
|
134
|
-
>(
|
|
135
|
-
M.json(200, z.array(z.record(z.any()))),
|
|
136
|
-
M.fail([404, "4XX"]),
|
|
137
|
-
M.fail([500, "5XX"]),
|
|
138
|
-
)(response, req);
|
|
139
|
-
if (!result.ok) {
|
|
140
|
-
return [result, { status: "complete", request: req, response }];
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return [result, { status: "complete", request: req, response }];
|
|
144
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
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 {
|
|
8
|
-
LiteLLMModelInfo,
|
|
9
|
-
LiteLLMModelInfo$Outbound,
|
|
10
|
-
LiteLLMModelInfo$outboundSchema,
|
|
11
|
-
} from "./litellmmodelinfo.js";
|
|
12
|
-
import {
|
|
13
|
-
LiteLLMParams,
|
|
14
|
-
LiteLLMParams$Outbound,
|
|
15
|
-
LiteLLMParams$outboundSchema,
|
|
16
|
-
} from "./litellmparams.js";
|
|
17
|
-
|
|
18
|
-
export type LiteLLMModel = {
|
|
19
|
-
litellmParams: LiteLLMParams;
|
|
20
|
-
modelInfo: LiteLLMModelInfo;
|
|
21
|
-
modelName: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/** @internal */
|
|
25
|
-
export type LiteLLMModel$Outbound = {
|
|
26
|
-
litellm_params: LiteLLMParams$Outbound;
|
|
27
|
-
model_info: LiteLLMModelInfo$Outbound;
|
|
28
|
-
model_name: string;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const LiteLLMModel$outboundSchema: z.ZodType<
|
|
33
|
-
LiteLLMModel$Outbound,
|
|
34
|
-
z.ZodTypeDef,
|
|
35
|
-
LiteLLMModel
|
|
36
|
-
> = z.object({
|
|
37
|
-
litellmParams: LiteLLMParams$outboundSchema,
|
|
38
|
-
modelInfo: LiteLLMModelInfo$outboundSchema,
|
|
39
|
-
modelName: z.string(),
|
|
40
|
-
}).transform((v) => {
|
|
41
|
-
return remap$(v, {
|
|
42
|
-
litellmParams: "litellm_params",
|
|
43
|
-
modelInfo: "model_info",
|
|
44
|
-
modelName: "model_name",
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export function liteLLMModelToJSON(liteLLMModel: LiteLLMModel): string {
|
|
49
|
-
return JSON.stringify(LiteLLMModel$outboundSchema.parse(liteLLMModel));
|
|
50
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
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
|
-
|
|
8
|
-
export type LiteLLMModelInfo = {
|
|
9
|
-
dbModel: boolean | null;
|
|
10
|
-
id: string | null;
|
|
11
|
-
inputCostPerToken?: number | undefined;
|
|
12
|
-
key: string | null;
|
|
13
|
-
litellmProvider: string | null;
|
|
14
|
-
maxInputTokens?: number | undefined;
|
|
15
|
-
maxOutputTokens?: number | undefined;
|
|
16
|
-
mode: string | null;
|
|
17
|
-
outputCostPerToken?: number | undefined;
|
|
18
|
-
supportedOpenaiParams?: Array<string> | null | undefined;
|
|
19
|
-
supportsFunctionCalling?: boolean | undefined;
|
|
20
|
-
supportsNativeStreaming?: boolean | undefined;
|
|
21
|
-
supportsReasoning?: boolean | undefined;
|
|
22
|
-
supportsResponseSchema?: boolean | undefined;
|
|
23
|
-
supportsSystemMessages?: boolean | undefined;
|
|
24
|
-
supportsToolChoice?: boolean | undefined;
|
|
25
|
-
supportsVision?: boolean | undefined;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/** @internal */
|
|
29
|
-
export type LiteLLMModelInfo$Outbound = {
|
|
30
|
-
db_model: boolean | null;
|
|
31
|
-
id: string | null;
|
|
32
|
-
input_cost_per_token?: number | undefined;
|
|
33
|
-
key: string | null;
|
|
34
|
-
litellm_provider: string | null;
|
|
35
|
-
max_input_tokens?: number | undefined;
|
|
36
|
-
max_output_tokens?: number | undefined;
|
|
37
|
-
mode: string | null;
|
|
38
|
-
output_cost_per_token?: number | undefined;
|
|
39
|
-
supported_openai_params?: Array<string> | null | undefined;
|
|
40
|
-
supports_function_calling?: boolean | undefined;
|
|
41
|
-
supports_native_streaming?: boolean | undefined;
|
|
42
|
-
supports_reasoning?: boolean | undefined;
|
|
43
|
-
supports_response_schema?: boolean | undefined;
|
|
44
|
-
supports_system_messages?: boolean | undefined;
|
|
45
|
-
supports_tool_choice?: boolean | undefined;
|
|
46
|
-
supports_vision?: boolean | undefined;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/** @internal */
|
|
50
|
-
export const LiteLLMModelInfo$outboundSchema: z.ZodType<
|
|
51
|
-
LiteLLMModelInfo$Outbound,
|
|
52
|
-
z.ZodTypeDef,
|
|
53
|
-
LiteLLMModelInfo
|
|
54
|
-
> = z.object({
|
|
55
|
-
dbModel: z.nullable(z.boolean()),
|
|
56
|
-
id: z.nullable(z.string()),
|
|
57
|
-
inputCostPerToken: z.number().optional(),
|
|
58
|
-
key: z.nullable(z.string()),
|
|
59
|
-
litellmProvider: z.nullable(z.string()),
|
|
60
|
-
maxInputTokens: z.number().int().optional(),
|
|
61
|
-
maxOutputTokens: z.number().int().optional(),
|
|
62
|
-
mode: z.nullable(z.string()),
|
|
63
|
-
outputCostPerToken: z.number().optional(),
|
|
64
|
-
supportedOpenaiParams: z.nullable(z.array(z.string())).optional(),
|
|
65
|
-
supportsFunctionCalling: z.boolean().optional(),
|
|
66
|
-
supportsNativeStreaming: z.boolean().optional(),
|
|
67
|
-
supportsReasoning: z.boolean().optional(),
|
|
68
|
-
supportsResponseSchema: z.boolean().optional(),
|
|
69
|
-
supportsSystemMessages: z.boolean().optional(),
|
|
70
|
-
supportsToolChoice: z.boolean().optional(),
|
|
71
|
-
supportsVision: z.boolean().optional(),
|
|
72
|
-
}).transform((v) => {
|
|
73
|
-
return remap$(v, {
|
|
74
|
-
dbModel: "db_model",
|
|
75
|
-
inputCostPerToken: "input_cost_per_token",
|
|
76
|
-
litellmProvider: "litellm_provider",
|
|
77
|
-
maxInputTokens: "max_input_tokens",
|
|
78
|
-
maxOutputTokens: "max_output_tokens",
|
|
79
|
-
outputCostPerToken: "output_cost_per_token",
|
|
80
|
-
supportedOpenaiParams: "supported_openai_params",
|
|
81
|
-
supportsFunctionCalling: "supports_function_calling",
|
|
82
|
-
supportsNativeStreaming: "supports_native_streaming",
|
|
83
|
-
supportsReasoning: "supports_reasoning",
|
|
84
|
-
supportsResponseSchema: "supports_response_schema",
|
|
85
|
-
supportsSystemMessages: "supports_system_messages",
|
|
86
|
-
supportsToolChoice: "supports_tool_choice",
|
|
87
|
-
supportsVision: "supports_vision",
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
export function liteLLMModelInfoToJSON(
|
|
92
|
-
liteLLMModelInfo: LiteLLMModelInfo,
|
|
93
|
-
): string {
|
|
94
|
-
return JSON.stringify(
|
|
95
|
-
LiteLLMModelInfo$outboundSchema.parse(liteLLMModelInfo),
|
|
96
|
-
);
|
|
97
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
|
|
8
|
-
export type LiteLLMParams = {
|
|
9
|
-
mergeReasoningContentInChoices: boolean;
|
|
10
|
-
model: string;
|
|
11
|
-
useInPassThrough: boolean;
|
|
12
|
-
useLitellmProxy: boolean;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export type LiteLLMParams$Outbound = {
|
|
17
|
-
merge_reasoning_content_in_choices: boolean;
|
|
18
|
-
model: string;
|
|
19
|
-
use_in_pass_through: boolean;
|
|
20
|
-
use_litellm_proxy: boolean;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export const LiteLLMParams$outboundSchema: z.ZodType<
|
|
25
|
-
LiteLLMParams$Outbound,
|
|
26
|
-
z.ZodTypeDef,
|
|
27
|
-
LiteLLMParams
|
|
28
|
-
> = z.object({
|
|
29
|
-
mergeReasoningContentInChoices: z.boolean(),
|
|
30
|
-
model: z.string(),
|
|
31
|
-
useInPassThrough: z.boolean(),
|
|
32
|
-
useLitellmProxy: z.boolean(),
|
|
33
|
-
}).transform((v) => {
|
|
34
|
-
return remap$(v, {
|
|
35
|
-
mergeReasoningContentInChoices: "merge_reasoning_content_in_choices",
|
|
36
|
-
useInPassThrough: "use_in_pass_through",
|
|
37
|
-
useLitellmProxy: "use_litellm_proxy",
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export function liteLLMParamsToJSON(liteLLMParams: LiteLLMParams): string {
|
|
42
|
-
return JSON.stringify(LiteLLMParams$outboundSchema.parse(liteLLMParams));
|
|
43
|
-
}
|