@daocloud-proto/hydra 0.18.0-dev-37 → 0.18.0-dev-41
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.
|
@@ -38,6 +38,8 @@ export enum LoadBalanceStrategy {
|
|
|
38
38
|
LOAD_BALANCE_STRATEGY_ROUND_ROBIN = "LOAD_BALANCE_STRATEGY_ROUND_ROBIN",
|
|
39
39
|
LOAD_BALANCE_STRATEGY_RANDOM = "LOAD_BALANCE_STRATEGY_RANDOM",
|
|
40
40
|
LOAD_BALANCE_STRATEGY_WEIGHTED = "LOAD_BALANCE_STRATEGY_WEIGHTED",
|
|
41
|
+
LOAD_BALANCE_STRATEGY_HASH = "LOAD_BALANCE_STRATEGY_HASH",
|
|
42
|
+
LOAD_BALANCE_STRATEGY_WEIGHTED_HASH = "LOAD_BALANCE_STRATEGY_WEIGHTED_HASH",
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export enum RateLimitBaseOn {
|
|
@@ -142,6 +144,7 @@ type BaseCreateMAASModelRequest = {
|
|
|
142
144
|
tokenWeight?: string
|
|
143
145
|
workspaceVisibility?: MAASWorkspaceVisibility
|
|
144
146
|
capabilityRoutes?: MAASCapabilityRoute[]
|
|
147
|
+
fallbackModel?: UpstreamModel
|
|
145
148
|
modelRatelimitConfig?: ModelRatelimitConfig
|
|
146
149
|
}
|
|
147
150
|
|
|
@@ -173,6 +176,7 @@ type BaseMAASModel = {
|
|
|
173
176
|
capabilityRoutes?: MAASCapabilityRoute[]
|
|
174
177
|
healthStatus?: MAASModelHealthStatus
|
|
175
178
|
clusterStatus?: HydraManagement_apiWorkspaceV1alpha1Workspace.ClusterStatus
|
|
179
|
+
fallbackModel?: UpstreamModel
|
|
176
180
|
modelRatelimitConfig?: ModelRatelimitConfig
|
|
177
181
|
}
|
|
178
182
|
|
|
@@ -182,7 +186,6 @@ export type MAASModel = BaseMAASModel
|
|
|
182
186
|
|
|
183
187
|
export type LoadBalanceConfig = {
|
|
184
188
|
strategy?: LoadBalanceStrategy
|
|
185
|
-
weightedConfig?: WeightedLoadBalanceConfig
|
|
186
189
|
}
|
|
187
190
|
|
|
188
191
|
export type WeightedLoadBalanceConfig = {
|
|
@@ -232,6 +235,7 @@ type BaseUpstreamModel = {
|
|
|
232
235
|
status?: UpstreamModelStatus
|
|
233
236
|
healthCheck?: HealthCheck
|
|
234
237
|
healthMessage?: string
|
|
238
|
+
weight?: number
|
|
235
239
|
}
|
|
236
240
|
|
|
237
241
|
export type UpstreamModel = BaseUpstreamModel
|
|
@@ -263,6 +267,7 @@ type BaseUpdateMAASModelRequest = {
|
|
|
263
267
|
tokenWeight?: string
|
|
264
268
|
workspaceVisibility?: MAASWorkspaceVisibility
|
|
265
269
|
capabilityRoutes?: MAASCapabilityRoute[]
|
|
270
|
+
fallbackModel?: UpstreamModel
|
|
266
271
|
modelRatelimitConfig?: ModelRatelimitConfig
|
|
267
272
|
}
|
|
268
273
|
|
|
@@ -289,6 +294,7 @@ export type ModelRateLimitPolicy = {
|
|
|
289
294
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
290
295
|
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
291
296
|
generation?: string
|
|
297
|
+
description?: string
|
|
292
298
|
}
|
|
293
299
|
|
|
294
300
|
export type RateLimitValue = {
|
|
@@ -372,6 +378,7 @@ export type ModelRateLimitPolicyListItem = {
|
|
|
372
378
|
ruleCounts?: ModelRateLimitPolicyRuleCount[]
|
|
373
379
|
enabled?: boolean
|
|
374
380
|
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
381
|
+
description?: string
|
|
375
382
|
}
|
|
376
383
|
|
|
377
384
|
export type CreateModelRateLimitPolicyRequest = {
|
|
@@ -381,6 +388,7 @@ export type CreateModelRateLimitPolicyRequest = {
|
|
|
381
388
|
paths?: string[]
|
|
382
389
|
matchStrategy?: RateLimitMatchStrategy
|
|
383
390
|
rules?: ModelRateLimitPolicyRule[]
|
|
391
|
+
description?: string
|
|
384
392
|
}
|
|
385
393
|
|
|
386
394
|
export type GetModelRateLimitPolicyRequest = {
|
|
@@ -403,6 +411,7 @@ export type UpdateModelRateLimitPolicyRequest = {
|
|
|
403
411
|
paths?: string[]
|
|
404
412
|
matchStrategy?: RateLimitMatchStrategy
|
|
405
413
|
rules?: ModelRateLimitPolicyRule[]
|
|
414
|
+
description?: string
|
|
406
415
|
}
|
|
407
416
|
|
|
408
417
|
export type UpdateModelRateLimitPolicyStatusRequest = {
|
|
@@ -355,6 +355,15 @@ export type UpdateWSModelServingReplicasRequest = {
|
|
|
355
355
|
replicas?: number
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
+
export type UpdateWSModelServingRuntimeRequest = {
|
|
359
|
+
workspace?: number
|
|
360
|
+
cluster?: string
|
|
361
|
+
namespace?: string
|
|
362
|
+
id?: string
|
|
363
|
+
runtimeConfig?: RuntimeConfig
|
|
364
|
+
resourceConfig?: ResourceConfig
|
|
365
|
+
}
|
|
366
|
+
|
|
358
367
|
export type ModelServingActionRequest = {
|
|
359
368
|
id?: string
|
|
360
369
|
action?: ModelServingActionRequestAction
|
|
@@ -456,6 +465,9 @@ export class WSModelServingManagement {
|
|
|
456
465
|
static UpdateWSModelServingReplicas(req: UpdateWSModelServingReplicasRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
457
466
|
return fm.fetchReq<UpdateWSModelServingReplicasRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["id"]}/replicas`, {...initReq, method: "PATCH", body: JSON.stringify(req, fm.replacer)})
|
|
458
467
|
}
|
|
468
|
+
static UpdateWSModelServingRuntime(req: UpdateWSModelServingRuntimeRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
469
|
+
return fm.fetchReq<UpdateWSModelServingRuntimeRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["id"]}/runtime-config`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
470
|
+
}
|
|
459
471
|
static DoModelWSServingAction(req: WSModelServingActionRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
460
472
|
return fm.fetchReq<WSModelServingActionRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["id"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
461
473
|
}
|