@daocloud-proto/hydra 0.16.0-dev-10 → 0.16.0-dev-12

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.
@@ -28,6 +28,12 @@ export enum RateLimitBaseOn {
28
28
  RATE_LIMIT_BASE_ON_WS = "RATE_LIMIT_BASE_ON_WS",
29
29
  }
30
30
 
31
+ export enum MAASBackendStatus {
32
+ MAAS_BACKEND_STATUS_UNSPECIFIED = "MAAS_BACKEND_STATUS_UNSPECIFIED",
33
+ MAAS_BACKEND_STATUS_HEALTHY = "MAAS_BACKEND_STATUS_HEALTHY",
34
+ MAAS_BACKEND_STATUS_FAILED = "MAAS_BACKEND_STATUS_FAILED",
35
+ }
36
+
31
37
  export enum MAASModelGatewayStatus {
32
38
  GATEWAY_STATUS_UNSPECIFIED = "GATEWAY_STATUS_UNSPECIFIED",
33
39
  GATEWAY_STATUS_HEALTHY = "GATEWAY_STATUS_HEALTHY",
@@ -53,6 +59,7 @@ export type CreateMAASModelRequest = {
53
59
  loadBalanceConfig?: LoadBalanceConfig
54
60
  tokenWeight?: string
55
61
  workspaceVisibility?: MAASWorkspaceVisibility
62
+ capabilityRoutes?: MAASCapabilityRoute[]
56
63
  }
57
64
 
58
65
  export type MAASModel = {
@@ -66,6 +73,7 @@ export type MAASModel = {
66
73
  enabled?: boolean
67
74
  tokenWeight?: string
68
75
  workspaceVisibility?: MAASWorkspaceVisibility
76
+ capabilityRoutes?: MAASCapabilityRoute[]
69
77
  }
70
78
 
71
79
  export type LoadBalanceConfig = {
@@ -95,6 +103,19 @@ export type RateLimitRule = {
95
103
  apiKey?: string
96
104
  }
97
105
 
106
+ export type MAASCapabilityRoute = {
107
+ capabilities?: string[]
108
+ upstreams?: MAASCapabilityUpstream[]
109
+ }
110
+
111
+ export type MAASCapabilityUpstream = {
112
+ modelId?: string
113
+ baseUrl?: string
114
+ capabilityPaths?: {[key: string]: string}
115
+ apiKey?: string
116
+ status?: MAASBackendStatus
117
+ }
118
+
98
119
  export type UpstreamModel = {
99
120
  modelId?: string
100
121
  apiKey?: string
@@ -118,6 +139,7 @@ export type UpdateMAASModelRequest = {
118
139
  upstreamModels?: UpstreamModel[]
119
140
  tokenWeight?: string
120
141
  workspaceVisibility?: MAASWorkspaceVisibility
142
+ capabilityRoutes?: MAASCapabilityRoute[]
121
143
  }
122
144
 
123
145
  export type UpdateMAASModelStatusRequest = {
@@ -9,6 +9,15 @@ import * as fm from "../../../fetch.pb"
9
9
  import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
10
10
  import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
11
11
 
12
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
13
+ type OneOf<T> =
14
+ | { [k in keyof T]?: undefined }
15
+ | (
16
+ keyof T extends infer K ?
17
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
18
+ : never)
19
+ : never);
20
+
12
21
  export enum ModelSupportFeature {
13
22
  MODEL_SUPPORT_TYPE_UNSPECIFIED = "MODEL_SUPPORT_TYPE_UNSPECIFIED",
14
23
  TEXT_GENERATION = "TEXT_GENERATION",
@@ -148,6 +157,9 @@ export type DeployTemplate = {
148
157
  runtimeCommand?: string
149
158
  templateName?: string
150
159
  templateDescription?: string
160
+ workerCommand?: string
161
+ workerEnv?: EnvVar[]
162
+ distributed?: boolean
151
163
  }
152
164
 
153
165
  export type EnvVar = {
@@ -251,13 +263,17 @@ export type DeleteModelTemplateRequest = {
251
263
  modelId?: string
252
264
  }
253
265
 
254
- export type ListModelTemplatesRequest = {
266
+
267
+ /* hydra modified */ export type BaseListModelTemplatesRequest = {
255
268
  workspace?: number
256
269
  modelId?: string
257
270
  inferenceRuntime?: string
258
271
  page?: HydraCommonCommon.Pagination
259
272
  }
260
273
 
274
+ export type ListModelTemplatesRequest = BaseListModelTemplatesRequest
275
+ & OneOf<{ distributed: boolean }>
276
+
261
277
  export type ListModelTemplatesResponse = {
262
278
  items?: ModelTemplate[]
263
279
  page?: HydraCommonCommon.Pagination
@@ -65,6 +65,13 @@ export enum DeployDetectConditionType {
65
65
  MODEL_IMAGE_DOWNLOADED = "MODEL_IMAGE_DOWNLOADED",
66
66
  }
67
67
 
68
+ export enum BuiltinEnvVarScope {
69
+ SCOPE_ALL = "SCOPE_ALL",
70
+ SCOPE_DISTRIBUTED = "SCOPE_DISTRIBUTED",
71
+ SCOPE_LEADER = "SCOPE_LEADER",
72
+ SCOPE_WORKER = "SCOPE_WORKER",
73
+ }
74
+
68
75
  export enum ModelServingActionRequestAction {
69
76
  MODEL_SERVING_ACTION_UNSPECIFIED = "MODEL_SERVING_ACTION_UNSPECIFIED",
70
77
  START = "START",
@@ -157,6 +164,8 @@ export type RuntimeConfig = {
157
164
  imagePullSecretName?: string[]
158
165
  runtimeCommand?: string
159
166
  env?: EnvVar[]
167
+ workerCommand?: string
168
+ workerEnv?: EnvVar[]
160
169
  }
161
170
 
162
171
  export type CreateModelServingRequest = {
@@ -349,7 +358,9 @@ export type BuiltinEnvVar = {
349
358
  }
350
359
 
351
360
  export type ListBuiltinEnvVarsResponse = {
352
- items?: BuiltinEnvVar[]
361
+ single?: BuiltinEnvVar[]
362
+ leader?: BuiltinEnvVar[]
363
+ worker?: BuiltinEnvVar[]
353
364
  }
354
365
 
355
366
  export class ModelServingManagement {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.16.0-dev-10",
3
+ "version": "v0.16.0-dev-12",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"