@meetkai/mka1 0.51.2 → 0.51.3
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/bin/mcp-server.js +140 -23
- package/bin/mcp-server.js.map +22 -19
- package/dist/commonjs/funcs/servingDeploymentsCreate.js +1 -1
- package/dist/commonjs/funcs/servingDeploymentsCreate.js.map +1 -1
- package/dist/commonjs/funcs/servingDeploymentsDelete.js +1 -1
- package/dist/commonjs/funcs/servingDeploymentsDelete.js.map +1 -1
- package/dist/commonjs/funcs/servingDeploymentsGet.js +1 -1
- package/dist/commonjs/funcs/servingDeploymentsGet.js.map +1 -1
- package/dist/commonjs/funcs/servingDeploymentsList.js +1 -1
- package/dist/commonjs/funcs/servingDeploymentsList.js.map +1 -1
- package/dist/commonjs/funcs/servingDeploymentsListRevisions.js +1 -1
- package/dist/commonjs/funcs/servingDeploymentsListRevisions.js.map +1 -1
- package/dist/commonjs/funcs/servingDeploymentsUpdate.js +1 -1
- package/dist/commonjs/funcs/servingDeploymentsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/servingDeploymentsUpdateScaling.js +3 -1
- package/dist/commonjs/funcs/servingDeploymentsUpdateScaling.js.map +1 -1
- package/dist/commonjs/funcs/servingModelsDelete.js +1 -1
- package/dist/commonjs/funcs/servingModelsDelete.js.map +1 -1
- package/dist/commonjs/funcs/servingSecretsDelete.js +1 -1
- package/dist/commonjs/funcs/servingSecretsDelete.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/deploymentapiformat.d.ts +22 -0
- package/dist/commonjs/models/components/deploymentapiformat.d.ts.map +1 -0
- package/dist/commonjs/models/components/deploymentapiformat.js +56 -0
- package/dist/commonjs/models/components/deploymentapiformat.js.map +1 -0
- package/dist/commonjs/models/components/deploymentcreate.d.ts +26 -5
- package/dist/commonjs/models/components/deploymentcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/deploymentcreate.js +16 -3
- package/dist/commonjs/models/components/deploymentcreate.js.map +1 -1
- package/dist/commonjs/models/components/deploymentscalingcreate.d.ts +31 -0
- package/dist/commonjs/models/components/deploymentscalingcreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/deploymentscalingcreate.js +83 -0
- package/dist/commonjs/models/components/deploymentscalingcreate.js.map +1 -0
- package/dist/commonjs/models/components/deploymentscalingupdate.d.ts +28 -0
- package/dist/commonjs/models/components/deploymentscalingupdate.d.ts.map +1 -0
- package/dist/commonjs/models/components/deploymentscalingupdate.js +83 -0
- package/dist/commonjs/models/components/deploymentscalingupdate.js.map +1 -0
- package/dist/commonjs/models/components/deploymentupdate.d.ts +7 -0
- package/dist/commonjs/models/components/deploymentupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/deploymentupdate.js +9 -0
- package/dist/commonjs/models/components/deploymentupdate.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +3 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +3 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/updatescaling.d.ts +2 -2
- package/dist/commonjs/models/operations/updatescaling.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatescaling.js +4 -4
- package/dist/commonjs/models/operations/updatescaling.js.map +1 -1
- package/dist/esm/funcs/servingDeploymentsCreate.js +1 -1
- package/dist/esm/funcs/servingDeploymentsCreate.js.map +1 -1
- package/dist/esm/funcs/servingDeploymentsDelete.js +1 -1
- package/dist/esm/funcs/servingDeploymentsDelete.js.map +1 -1
- package/dist/esm/funcs/servingDeploymentsGet.js +1 -1
- package/dist/esm/funcs/servingDeploymentsGet.js.map +1 -1
- package/dist/esm/funcs/servingDeploymentsList.js +1 -1
- package/dist/esm/funcs/servingDeploymentsList.js.map +1 -1
- package/dist/esm/funcs/servingDeploymentsListRevisions.js +1 -1
- package/dist/esm/funcs/servingDeploymentsListRevisions.js.map +1 -1
- package/dist/esm/funcs/servingDeploymentsUpdate.js +1 -1
- package/dist/esm/funcs/servingDeploymentsUpdate.js.map +1 -1
- package/dist/esm/funcs/servingDeploymentsUpdateScaling.js +3 -1
- package/dist/esm/funcs/servingDeploymentsUpdateScaling.js.map +1 -1
- package/dist/esm/funcs/servingModelsDelete.js +1 -1
- package/dist/esm/funcs/servingModelsDelete.js.map +1 -1
- package/dist/esm/funcs/servingSecretsDelete.js +1 -1
- package/dist/esm/funcs/servingSecretsDelete.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/deploymentapiformat.d.ts +22 -0
- package/dist/esm/models/components/deploymentapiformat.d.ts.map +1 -0
- package/dist/esm/models/components/deploymentapiformat.js +20 -0
- package/dist/esm/models/components/deploymentapiformat.js.map +1 -0
- package/dist/esm/models/components/deploymentcreate.d.ts +26 -5
- package/dist/esm/models/components/deploymentcreate.d.ts.map +1 -1
- package/dist/esm/models/components/deploymentcreate.js +16 -3
- package/dist/esm/models/components/deploymentcreate.js.map +1 -1
- package/dist/esm/models/components/deploymentscalingcreate.d.ts +31 -0
- package/dist/esm/models/components/deploymentscalingcreate.d.ts.map +1 -0
- package/dist/esm/models/components/deploymentscalingcreate.js +45 -0
- package/dist/esm/models/components/deploymentscalingcreate.js.map +1 -0
- package/dist/esm/models/components/deploymentscalingupdate.d.ts +28 -0
- package/dist/esm/models/components/deploymentscalingupdate.d.ts.map +1 -0
- package/dist/esm/models/components/deploymentscalingupdate.js +45 -0
- package/dist/esm/models/components/deploymentscalingupdate.js.map +1 -0
- package/dist/esm/models/components/deploymentupdate.d.ts +7 -0
- package/dist/esm/models/components/deploymentupdate.d.ts.map +1 -1
- package/dist/esm/models/components/deploymentupdate.js +9 -0
- package/dist/esm/models/components/deploymentupdate.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +3 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +3 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/updatescaling.d.ts +2 -2
- package/dist/esm/models/operations/updatescaling.d.ts.map +1 -1
- package/dist/esm/models/operations/updatescaling.js +4 -4
- package/dist/esm/models/operations/updatescaling.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/servingDeploymentsCreate.ts +3 -2
- package/src/funcs/servingDeploymentsDelete.ts +3 -2
- package/src/funcs/servingDeploymentsGet.ts +3 -2
- package/src/funcs/servingDeploymentsList.ts +3 -2
- package/src/funcs/servingDeploymentsListRevisions.ts +3 -2
- package/src/funcs/servingDeploymentsUpdate.ts +3 -2
- package/src/funcs/servingDeploymentsUpdateScaling.ts +3 -1
- package/src/funcs/servingModelsDelete.ts +1 -1
- package/src/funcs/servingSecretsDelete.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/deploymentapiformat.ts +31 -0
- package/src/models/components/deploymentcreate.ts +49 -12
- package/src/models/components/deploymentscalingcreate.ts +90 -0
- package/src/models/components/deploymentscalingupdate.ts +87 -0
- package/src/models/components/deploymentupdate.ts +19 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/operations/updatescaling.ts +6 -6
|
@@ -13,6 +13,17 @@ import {
|
|
|
13
13
|
AcceleratorSpec$Outbound,
|
|
14
14
|
AcceleratorSpec$outboundSchema,
|
|
15
15
|
} from "./acceleratorspec.js";
|
|
16
|
+
import {
|
|
17
|
+
DeploymentAPIFormat,
|
|
18
|
+
DeploymentAPIFormat$inboundSchema,
|
|
19
|
+
DeploymentAPIFormat$outboundSchema,
|
|
20
|
+
} from "./deploymentapiformat.js";
|
|
21
|
+
import {
|
|
22
|
+
DeploymentScalingCreate,
|
|
23
|
+
DeploymentScalingCreate$inboundSchema,
|
|
24
|
+
DeploymentScalingCreate$Outbound,
|
|
25
|
+
DeploymentScalingCreate$outboundSchema,
|
|
26
|
+
} from "./deploymentscalingcreate.js";
|
|
16
27
|
import {
|
|
17
28
|
DeployStrategy,
|
|
18
29
|
DeployStrategy$inboundSchema,
|
|
@@ -23,12 +34,6 @@ import {
|
|
|
23
34
|
Engine$inboundSchema,
|
|
24
35
|
Engine$outboundSchema,
|
|
25
36
|
} from "./engine.js";
|
|
26
|
-
import {
|
|
27
|
-
Scaling,
|
|
28
|
-
Scaling$inboundSchema,
|
|
29
|
-
Scaling$Outbound,
|
|
30
|
-
Scaling$outboundSchema,
|
|
31
|
-
} from "./scaling.js";
|
|
32
37
|
|
|
33
38
|
/**
|
|
34
39
|
* Spin up an inference server.
|
|
@@ -42,6 +47,10 @@ export type DeploymentCreate = {
|
|
|
42
47
|
* Request an accelerator by type and count, with optional fallback types.
|
|
43
48
|
*/
|
|
44
49
|
accelerator: AcceleratorSpec;
|
|
50
|
+
/**
|
|
51
|
+
* Gateway inference surface exposed by the deployment runtime.
|
|
52
|
+
*/
|
|
53
|
+
apiFormat?: DeploymentAPIFormat | undefined;
|
|
45
54
|
/**
|
|
46
55
|
* Require an endpoint key (separate from the model's own API key)
|
|
47
56
|
*/
|
|
@@ -55,9 +64,13 @@ export type DeploymentCreate = {
|
|
|
55
64
|
*/
|
|
56
65
|
engineArgs?: Array<string> | undefined;
|
|
57
66
|
/**
|
|
58
|
-
*
|
|
67
|
+
* Digest-pinned OCI image for pure BYO mode; absent or null selects managed mode
|
|
59
68
|
*/
|
|
60
69
|
image?: string | null | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Hard aggregate hourly spend ceiling for all replicas and rollout overlap
|
|
72
|
+
*/
|
|
73
|
+
maxUsdHr: number;
|
|
61
74
|
/**
|
|
62
75
|
* ID of a registered model (see Serving Models)
|
|
63
76
|
*/
|
|
@@ -67,9 +80,17 @@ export type DeploymentCreate = {
|
|
|
67
80
|
*/
|
|
68
81
|
name: string;
|
|
69
82
|
/**
|
|
70
|
-
*
|
|
83
|
+
* Container serving port required for pure BYO mode
|
|
84
|
+
*/
|
|
85
|
+
port?: number | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Managed runtime recipe key; omitted to resolve uniquely from model metadata
|
|
88
|
+
*/
|
|
89
|
+
runtime?: string | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Create-time scaling. Omitted min_containers defaults to one; explicit zero is preserved.
|
|
71
92
|
*/
|
|
72
|
-
scaling?:
|
|
93
|
+
scaling?: DeploymentScalingCreate | undefined;
|
|
73
94
|
secrets?: Array<string> | undefined;
|
|
74
95
|
/**
|
|
75
96
|
* How a config change or rollback is rolled out.
|
|
@@ -88,32 +109,42 @@ export const DeploymentCreate$inboundSchema: z.ZodType<
|
|
|
88
109
|
unknown
|
|
89
110
|
> = z.object({
|
|
90
111
|
accelerator: AcceleratorSpec$inboundSchema,
|
|
112
|
+
api_format: DeploymentAPIFormat$inboundSchema.optional(),
|
|
91
113
|
endpoint_auth: z.boolean().default(true),
|
|
92
114
|
engine: Engine$inboundSchema.optional(),
|
|
93
115
|
engine_args: z.array(z.string()).optional(),
|
|
94
116
|
image: z.nullable(z.string()).optional(),
|
|
117
|
+
max_usd_hr: z.number(),
|
|
95
118
|
model: z.string(),
|
|
96
119
|
name: z.string(),
|
|
97
|
-
|
|
120
|
+
port: z.number().int().optional(),
|
|
121
|
+
runtime: z.string().optional(),
|
|
122
|
+
scaling: DeploymentScalingCreate$inboundSchema.optional(),
|
|
98
123
|
secrets: z.array(z.string()).optional(),
|
|
99
124
|
strategy: DeployStrategy$inboundSchema.optional(),
|
|
100
125
|
volume: z.nullable(z.string()).optional(),
|
|
101
126
|
}).transform((v) => {
|
|
102
127
|
return remap$(v, {
|
|
128
|
+
"api_format": "apiFormat",
|
|
103
129
|
"endpoint_auth": "endpointAuth",
|
|
104
130
|
"engine_args": "engineArgs",
|
|
131
|
+
"max_usd_hr": "maxUsdHr",
|
|
105
132
|
});
|
|
106
133
|
});
|
|
107
134
|
/** @internal */
|
|
108
135
|
export type DeploymentCreate$Outbound = {
|
|
109
136
|
accelerator: AcceleratorSpec$Outbound;
|
|
137
|
+
api_format?: string | undefined;
|
|
110
138
|
endpoint_auth: boolean;
|
|
111
139
|
engine?: string | undefined;
|
|
112
140
|
engine_args?: Array<string> | undefined;
|
|
113
141
|
image?: string | null | undefined;
|
|
142
|
+
max_usd_hr: number;
|
|
114
143
|
model: string;
|
|
115
144
|
name: string;
|
|
116
|
-
|
|
145
|
+
port?: number | undefined;
|
|
146
|
+
runtime?: string | undefined;
|
|
147
|
+
scaling?: DeploymentScalingCreate$Outbound | undefined;
|
|
117
148
|
secrets?: Array<string> | undefined;
|
|
118
149
|
strategy?: string | undefined;
|
|
119
150
|
volume?: string | null | undefined;
|
|
@@ -126,20 +157,26 @@ export const DeploymentCreate$outboundSchema: z.ZodType<
|
|
|
126
157
|
DeploymentCreate
|
|
127
158
|
> = z.object({
|
|
128
159
|
accelerator: AcceleratorSpec$outboundSchema,
|
|
160
|
+
apiFormat: DeploymentAPIFormat$outboundSchema.optional(),
|
|
129
161
|
endpointAuth: z.boolean().default(true),
|
|
130
162
|
engine: Engine$outboundSchema.optional(),
|
|
131
163
|
engineArgs: z.array(z.string()).optional(),
|
|
132
164
|
image: z.nullable(z.string()).optional(),
|
|
165
|
+
maxUsdHr: z.number(),
|
|
133
166
|
model: z.string(),
|
|
134
167
|
name: z.string(),
|
|
135
|
-
|
|
168
|
+
port: z.number().int().optional(),
|
|
169
|
+
runtime: z.string().optional(),
|
|
170
|
+
scaling: DeploymentScalingCreate$outboundSchema.optional(),
|
|
136
171
|
secrets: z.array(z.string()).optional(),
|
|
137
172
|
strategy: DeployStrategy$outboundSchema.optional(),
|
|
138
173
|
volume: z.nullable(z.string()).optional(),
|
|
139
174
|
}).transform((v) => {
|
|
140
175
|
return remap$(v, {
|
|
176
|
+
apiFormat: "api_format",
|
|
141
177
|
endpointAuth: "endpoint_auth",
|
|
142
178
|
engineArgs: "engine_args",
|
|
179
|
+
maxUsdHr: "max_usd_hr",
|
|
143
180
|
});
|
|
144
181
|
});
|
|
145
182
|
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
* Create-time scaling. Omitted min_containers defaults to one; explicit zero is preserved.
|
|
13
|
+
*/
|
|
14
|
+
export type DeploymentScalingCreate = {
|
|
15
|
+
bufferContainers?: number | undefined;
|
|
16
|
+
maxConcurrentInputs?: number | undefined;
|
|
17
|
+
maxContainers?: number | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Desired warm replicas; omitted defaults to one and explicit zero creates a stopped deployment
|
|
20
|
+
*/
|
|
21
|
+
minContainers?: number | undefined;
|
|
22
|
+
scaledownWindowS?: number | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const DeploymentScalingCreate$inboundSchema: z.ZodType<
|
|
27
|
+
DeploymentScalingCreate,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
buffer_containers: z.number().int().default(0),
|
|
32
|
+
max_concurrent_inputs: z.number().int().default(100),
|
|
33
|
+
max_containers: z.number().int().default(1),
|
|
34
|
+
min_containers: z.number().int().default(1),
|
|
35
|
+
scaledown_window_s: z.number().int().default(300),
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"buffer_containers": "bufferContainers",
|
|
39
|
+
"max_concurrent_inputs": "maxConcurrentInputs",
|
|
40
|
+
"max_containers": "maxContainers",
|
|
41
|
+
"min_containers": "minContainers",
|
|
42
|
+
"scaledown_window_s": "scaledownWindowS",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type DeploymentScalingCreate$Outbound = {
|
|
47
|
+
buffer_containers: number;
|
|
48
|
+
max_concurrent_inputs: number;
|
|
49
|
+
max_containers: number;
|
|
50
|
+
min_containers: number;
|
|
51
|
+
scaledown_window_s: number;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const DeploymentScalingCreate$outboundSchema: z.ZodType<
|
|
56
|
+
DeploymentScalingCreate$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
DeploymentScalingCreate
|
|
59
|
+
> = z.object({
|
|
60
|
+
bufferContainers: z.number().int().default(0),
|
|
61
|
+
maxConcurrentInputs: z.number().int().default(100),
|
|
62
|
+
maxContainers: z.number().int().default(1),
|
|
63
|
+
minContainers: z.number().int().default(1),
|
|
64
|
+
scaledownWindowS: z.number().int().default(300),
|
|
65
|
+
}).transform((v) => {
|
|
66
|
+
return remap$(v, {
|
|
67
|
+
bufferContainers: "buffer_containers",
|
|
68
|
+
maxConcurrentInputs: "max_concurrent_inputs",
|
|
69
|
+
maxContainers: "max_containers",
|
|
70
|
+
minContainers: "min_containers",
|
|
71
|
+
scaledownWindowS: "scaledown_window_s",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function deploymentScalingCreateToJSON(
|
|
76
|
+
deploymentScalingCreate: DeploymentScalingCreate,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
DeploymentScalingCreate$outboundSchema.parse(deploymentScalingCreate),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
export function deploymentScalingCreateFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<DeploymentScalingCreate, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) => DeploymentScalingCreate$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
+
`Failed to parse 'DeploymentScalingCreate' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
* Sparse scaling patch; omitted fields retain their effective values.
|
|
13
|
+
*/
|
|
14
|
+
export type DeploymentScalingUpdate = {
|
|
15
|
+
bufferContainers?: number | undefined;
|
|
16
|
+
maxConcurrentInputs?: number | undefined;
|
|
17
|
+
maxContainers?: number | undefined;
|
|
18
|
+
minContainers?: number | undefined;
|
|
19
|
+
scaledownWindowS?: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const DeploymentScalingUpdate$inboundSchema: z.ZodType<
|
|
24
|
+
DeploymentScalingUpdate,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
buffer_containers: z.number().int().optional(),
|
|
29
|
+
max_concurrent_inputs: z.number().int().optional(),
|
|
30
|
+
max_containers: z.number().int().optional(),
|
|
31
|
+
min_containers: z.number().int().optional(),
|
|
32
|
+
scaledown_window_s: z.number().int().optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"buffer_containers": "bufferContainers",
|
|
36
|
+
"max_concurrent_inputs": "maxConcurrentInputs",
|
|
37
|
+
"max_containers": "maxContainers",
|
|
38
|
+
"min_containers": "minContainers",
|
|
39
|
+
"scaledown_window_s": "scaledownWindowS",
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type DeploymentScalingUpdate$Outbound = {
|
|
44
|
+
buffer_containers?: number | undefined;
|
|
45
|
+
max_concurrent_inputs?: number | undefined;
|
|
46
|
+
max_containers?: number | undefined;
|
|
47
|
+
min_containers?: number | undefined;
|
|
48
|
+
scaledown_window_s?: number | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const DeploymentScalingUpdate$outboundSchema: z.ZodType<
|
|
53
|
+
DeploymentScalingUpdate$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
DeploymentScalingUpdate
|
|
56
|
+
> = z.object({
|
|
57
|
+
bufferContainers: z.number().int().optional(),
|
|
58
|
+
maxConcurrentInputs: z.number().int().optional(),
|
|
59
|
+
maxContainers: z.number().int().optional(),
|
|
60
|
+
minContainers: z.number().int().optional(),
|
|
61
|
+
scaledownWindowS: z.number().int().optional(),
|
|
62
|
+
}).transform((v) => {
|
|
63
|
+
return remap$(v, {
|
|
64
|
+
bufferContainers: "buffer_containers",
|
|
65
|
+
maxConcurrentInputs: "max_concurrent_inputs",
|
|
66
|
+
maxContainers: "max_containers",
|
|
67
|
+
minContainers: "min_containers",
|
|
68
|
+
scaledownWindowS: "scaledown_window_s",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function deploymentScalingUpdateToJSON(
|
|
73
|
+
deploymentScalingUpdate: DeploymentScalingUpdate,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
DeploymentScalingUpdate$outboundSchema.parse(deploymentScalingUpdate),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
export function deploymentScalingUpdateFromJSON(
|
|
80
|
+
jsonString: string,
|
|
81
|
+
): SafeParseResult<DeploymentScalingUpdate, SDKValidationError> {
|
|
82
|
+
return safeParse(
|
|
83
|
+
jsonString,
|
|
84
|
+
(x) => DeploymentScalingUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
+
`Failed to parse 'DeploymentScalingUpdate' from JSON`,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
DeploymentAPIFormat,
|
|
12
|
+
DeploymentAPIFormat$inboundSchema,
|
|
13
|
+
DeploymentAPIFormat$outboundSchema,
|
|
14
|
+
} from "./deploymentapiformat.js";
|
|
10
15
|
import {
|
|
11
16
|
DeployStrategy,
|
|
12
17
|
DeployStrategy$inboundSchema,
|
|
@@ -17,9 +22,12 @@ import {
|
|
|
17
22
|
* Patch a deployment's config. Triggers a new revision (rolling by default).
|
|
18
23
|
*/
|
|
19
24
|
export type DeploymentUpdate = {
|
|
25
|
+
apiFormat?: DeploymentAPIFormat | null | undefined;
|
|
20
26
|
engineArgs?: Array<string> | null | undefined;
|
|
21
27
|
image?: string | null | undefined;
|
|
22
28
|
model?: string | null | undefined;
|
|
29
|
+
port?: number | null | undefined;
|
|
30
|
+
runtime?: string | null | undefined;
|
|
23
31
|
secrets?: Array<string> | null | undefined;
|
|
24
32
|
/**
|
|
25
33
|
* How a config change or rollback is rolled out.
|
|
@@ -33,21 +41,28 @@ export const DeploymentUpdate$inboundSchema: z.ZodType<
|
|
|
33
41
|
z.ZodTypeDef,
|
|
34
42
|
unknown
|
|
35
43
|
> = z.object({
|
|
44
|
+
api_format: z.nullable(DeploymentAPIFormat$inboundSchema).optional(),
|
|
36
45
|
engine_args: z.nullable(z.array(z.string())).optional(),
|
|
37
46
|
image: z.nullable(z.string()).optional(),
|
|
38
47
|
model: z.nullable(z.string()).optional(),
|
|
48
|
+
port: z.nullable(z.number().int()).optional(),
|
|
49
|
+
runtime: z.nullable(z.string()).optional(),
|
|
39
50
|
secrets: z.nullable(z.array(z.string())).optional(),
|
|
40
51
|
strategy: DeployStrategy$inboundSchema.optional(),
|
|
41
52
|
}).transform((v) => {
|
|
42
53
|
return remap$(v, {
|
|
54
|
+
"api_format": "apiFormat",
|
|
43
55
|
"engine_args": "engineArgs",
|
|
44
56
|
});
|
|
45
57
|
});
|
|
46
58
|
/** @internal */
|
|
47
59
|
export type DeploymentUpdate$Outbound = {
|
|
60
|
+
api_format?: string | null | undefined;
|
|
48
61
|
engine_args?: Array<string> | null | undefined;
|
|
49
62
|
image?: string | null | undefined;
|
|
50
63
|
model?: string | null | undefined;
|
|
64
|
+
port?: number | null | undefined;
|
|
65
|
+
runtime?: string | null | undefined;
|
|
51
66
|
secrets?: Array<string> | null | undefined;
|
|
52
67
|
strategy?: string | undefined;
|
|
53
68
|
};
|
|
@@ -58,13 +73,17 @@ export const DeploymentUpdate$outboundSchema: z.ZodType<
|
|
|
58
73
|
z.ZodTypeDef,
|
|
59
74
|
DeploymentUpdate
|
|
60
75
|
> = z.object({
|
|
76
|
+
apiFormat: z.nullable(DeploymentAPIFormat$outboundSchema).optional(),
|
|
61
77
|
engineArgs: z.nullable(z.array(z.string())).optional(),
|
|
62
78
|
image: z.nullable(z.string()).optional(),
|
|
63
79
|
model: z.nullable(z.string()).optional(),
|
|
80
|
+
port: z.nullable(z.number().int()).optional(),
|
|
81
|
+
runtime: z.nullable(z.string()).optional(),
|
|
64
82
|
secrets: z.nullable(z.array(z.string())).optional(),
|
|
65
83
|
strategy: DeployStrategy$outboundSchema.optional(),
|
|
66
84
|
}).transform((v) => {
|
|
67
85
|
return remap$(v, {
|
|
86
|
+
apiFormat: "api_format",
|
|
68
87
|
engineArgs: "engine_args",
|
|
69
88
|
});
|
|
70
89
|
});
|
|
@@ -135,9 +135,12 @@ export * from "./deleteorgautomodelresponse.js";
|
|
|
135
135
|
export * from "./deletepromptresponse.js";
|
|
136
136
|
export * from "./deleteresponseobject.js";
|
|
137
137
|
export * from "./deployment.js";
|
|
138
|
+
export * from "./deploymentapiformat.js";
|
|
138
139
|
export * from "./deploymentcreate.js";
|
|
139
140
|
export * from "./deploymentendpoint.js";
|
|
140
141
|
export * from "./deploymentrollbackrequest.js";
|
|
142
|
+
export * from "./deploymentscalingcreate.js";
|
|
143
|
+
export * from "./deploymentscalingupdate.js";
|
|
141
144
|
export * from "./deploymentupdate.js";
|
|
142
145
|
export * from "./deploystrategy.js";
|
|
143
146
|
export * from "./doubleclickaction.js";
|
|
@@ -15,7 +15,7 @@ export type UpdateScalingRequest = {
|
|
|
15
15
|
* Optional external end-user identifier forwarded by the API gateway.
|
|
16
16
|
*/
|
|
17
17
|
xOnBehalfOf?: string | undefined;
|
|
18
|
-
|
|
18
|
+
deploymentScalingUpdate: components.DeploymentScalingUpdate;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
@@ -26,19 +26,19 @@ export const UpdateScalingRequest$inboundSchema: z.ZodType<
|
|
|
26
26
|
> = z.object({
|
|
27
27
|
deployment_id: z.string(),
|
|
28
28
|
"X-On-Behalf-Of": z.string().optional(),
|
|
29
|
-
|
|
29
|
+
DeploymentScalingUpdate: components.DeploymentScalingUpdate$inboundSchema,
|
|
30
30
|
}).transform((v) => {
|
|
31
31
|
return remap$(v, {
|
|
32
32
|
"deployment_id": "deploymentId",
|
|
33
33
|
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
34
|
-
"
|
|
34
|
+
"DeploymentScalingUpdate": "deploymentScalingUpdate",
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
/** @internal */
|
|
38
38
|
export type UpdateScalingRequest$Outbound = {
|
|
39
39
|
deployment_id: string;
|
|
40
40
|
"X-On-Behalf-Of"?: string | undefined;
|
|
41
|
-
|
|
41
|
+
DeploymentScalingUpdate: components.DeploymentScalingUpdate$Outbound;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
/** @internal */
|
|
@@ -49,12 +49,12 @@ export const UpdateScalingRequest$outboundSchema: z.ZodType<
|
|
|
49
49
|
> = z.object({
|
|
50
50
|
deploymentId: z.string(),
|
|
51
51
|
xOnBehalfOf: z.string().optional(),
|
|
52
|
-
|
|
52
|
+
deploymentScalingUpdate: components.DeploymentScalingUpdate$outboundSchema,
|
|
53
53
|
}).transform((v) => {
|
|
54
54
|
return remap$(v, {
|
|
55
55
|
deploymentId: "deployment_id",
|
|
56
56
|
xOnBehalfOf: "X-On-Behalf-Of",
|
|
57
|
-
|
|
57
|
+
deploymentScalingUpdate: "DeploymentScalingUpdate",
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
|