@daocloud-proto/infery 0.0.0-dev-5f1c0a44 → 0.0.0-dev-c6ffc97d

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.
@@ -17,11 +17,6 @@ type OneOf<T> =
17
17
  : never)
18
18
  : never);
19
19
 
20
- export enum ConfigurationFormat {
21
- CONFIGURATION_FORMAT_UNSPECIFIED = "CONFIGURATION_FORMAT_UNSPECIFIED",
22
- CONFIGURATION_FORMAT_HELM_VALUES_YAML = "CONFIGURATION_FORMAT_HELM_VALUES_YAML",
23
- }
24
-
25
20
  export enum RoleType {
26
21
  ROLE_TYPE_UNSPECIFIED = "ROLE_TYPE_UNSPECIFIED",
27
22
  ROLE_TYPE_LLM_D_PREFILL = "ROLE_TYPE_LLM_D_PREFILL",
@@ -78,50 +73,12 @@ export enum AvailabilityStatus {
78
73
 
79
74
  export enum ModelServingOriginType {
80
75
  MODEL_SERVING_ORIGIN_TYPE_UNSPECIFIED = "MODEL_SERVING_ORIGIN_TYPE_UNSPECIFIED",
81
- MODEL_SERVING_ORIGIN_TYPE_STRUCTURED = "MODEL_SERVING_ORIGIN_TYPE_STRUCTURED",
82
- MODEL_SERVING_ORIGIN_TYPE_INFERENCE_TEMPLATE = "MODEL_SERVING_ORIGIN_TYPE_INFERENCE_TEMPLATE",
83
- MODEL_SERVING_ORIGIN_TYPE_CUSTOM_CONFIGURATION = "MODEL_SERVING_ORIGIN_TYPE_CUSTOM_CONFIGURATION",
76
+ MODEL_SERVING_ORIGIN_TYPE_OPTIMIZED_TEMPLATE = "MODEL_SERVING_ORIGIN_TYPE_OPTIMIZED_TEMPLATE",
77
+ MODEL_SERVING_ORIGIN_TYPE_GENERIC_TEMPLATE = "MODEL_SERVING_ORIGIN_TYPE_GENERIC_TEMPLATE",
78
+ MODEL_SERVING_ORIGIN_TYPE_CUSTOM_DEPLOYMENT = "MODEL_SERVING_ORIGIN_TYPE_CUSTOM_DEPLOYMENT",
84
79
  MODEL_SERVING_ORIGIN_TYPE_EXTERNAL = "MODEL_SERVING_ORIGIN_TYPE_EXTERNAL",
85
80
  }
86
81
 
87
- export enum ModelServingAction {
88
- MODEL_SERVING_ACTION_UNSPECIFIED = "MODEL_SERVING_ACTION_UNSPECIFIED",
89
- MODEL_SERVING_ACTION_START = "MODEL_SERVING_ACTION_START",
90
- MODEL_SERVING_ACTION_STOP = "MODEL_SERVING_ACTION_STOP",
91
- MODEL_SERVING_ACTION_SYNC = "MODEL_SERVING_ACTION_SYNC",
92
- MODEL_SERVING_ACTION_PAUSE_UPDATE = "MODEL_SERVING_ACTION_PAUSE_UPDATE",
93
- MODEL_SERVING_ACTION_RESUME_UPDATE = "MODEL_SERVING_ACTION_RESUME_UPDATE",
94
- }
95
-
96
- export enum ValidationIssueSeverity {
97
- SEVERITY_UNSPECIFIED = "SEVERITY_UNSPECIFIED",
98
- SEVERITY_ERROR = "SEVERITY_ERROR",
99
- SEVERITY_WARNING = "SEVERITY_WARNING",
100
- }
101
-
102
- export type Configuration = {
103
- format?: ConfigurationFormat
104
- content?: string
105
- }
106
-
107
- export type GetModelServingConfigurationResponse = {
108
- configuration?: Configuration
109
- revision?: string
110
- }
111
-
112
- export type ValidationIssue = {
113
- severity?: ValidationIssueSeverity
114
- fieldPath?: string
115
- code?: string
116
- message?: string
117
- }
118
-
119
- export type ConfigurationPreview = {
120
- valid?: boolean
121
- normalized?: Configuration
122
- issues?: ValidationIssue[]
123
- }
124
-
125
82
  export type PVCModelSource = {
126
83
  claimName?: string
127
84
  subPath?: string
@@ -159,10 +116,6 @@ export type InferenceTemplateReference = {
159
116
  name?: string
160
117
  }
161
118
 
162
- export type InferenceTemplateDeployment = {
163
- inferenceTemplateName?: string
164
- }
165
-
166
119
  export type ModelServingStatusSummary = {
167
120
  phase?: OperationPhase
168
121
  syncStatus?: SyncStatus
@@ -210,17 +163,17 @@ type BasePreviewModelServingRequest = {
210
163
  alias?: string
211
164
  cluster?: string
212
165
  namespace?: string
213
- accelerator?: AcceleratorSummary
214
166
  modelConfiguration?: ModelConfiguration
167
+ origin?: ModelServingOrigin
215
168
  }
216
169
 
217
170
  export type PreviewModelServingRequest = BasePreviewModelServingRequest
218
- & OneOf<{ inferenceTemplate: InferenceTemplateDeployment; configuration: Configuration }>
171
+ & OneOf<{ form: string; helmValues: string }>
172
+ & OneOf<{ formVersion: string }>
219
173
 
220
174
  export type PreviewModelServingResponse = {
221
- configuration?: ConfigurationPreview
222
- resolvedTemplate?: InferenceTemplateReference
223
- origin?: ModelServingOrigin
175
+ helmValues?: string
176
+ message?: string
224
177
  }
225
178
 
226
179
  export type CreateModelServingRequest = {
@@ -229,7 +182,9 @@ export type CreateModelServingRequest = {
229
182
  alias?: string
230
183
  cluster?: string
231
184
  namespace?: string
232
- configuration?: Configuration
185
+ modelConfiguration?: ModelConfiguration
186
+ formVersion?: string
187
+ form?: string
233
188
  origin?: ModelServingOrigin
234
189
  }
235
190
 
@@ -357,7 +312,7 @@ type BaseModelServingResource = {
357
312
  kind?: string
358
313
  namespace?: string
359
314
  name?: string
360
- status?: string
315
+ status?: HealthStatus
361
316
  message?: string
362
317
  }
363
318
 
@@ -391,22 +346,33 @@ export type GetModelServingResourceManifestResponse = {
391
346
  manifest?: string
392
347
  }
393
348
 
394
- export type UpdateModelServingRequest = {
349
+
350
+ type BaseUpdateModelServingRequest = {
395
351
  workspace?: number
396
352
  name?: string
397
353
  alias?: string
398
354
  resourceVersion?: string
355
+ modelConfiguration?: ModelConfiguration
399
356
  }
400
357
 
358
+ export type UpdateModelServingRequest = BaseUpdateModelServingRequest
359
+ & OneOf<{ form: string }>
360
+ & OneOf<{ formVersion: string }>
361
+
401
362
  export type DeleteModelServingRequest = {
402
363
  workspace?: number
403
364
  name?: string
404
365
  }
405
366
 
406
- export type ModelServingActionRequest = {
367
+ export type SyncModelServingRequest = {
368
+ workspace?: number
369
+ name?: string
370
+ resourceVersion?: string
371
+ }
372
+
373
+ export type TerminateModelServingOperationRequest = {
407
374
  workspace?: number
408
375
  name?: string
409
- action?: ModelServingAction
410
376
  resourceVersion?: string
411
377
  }
412
378
 
@@ -424,33 +390,101 @@ export type DeleteModelServingResponse = {
424
390
  updateTime?: GoogleProtobufTimestamp.Timestamp
425
391
  }
426
392
 
427
- export type ModelServingActionResponse = {
393
+ export type SyncModelServingResponse = {
428
394
  name?: string
429
395
  phase?: OperationPhase
430
396
  resourceVersion?: string
431
397
  updateTime?: GoogleProtobufTimestamp.Timestamp
432
398
  }
433
399
 
434
- export type UpdateModelServingConfigurationResponse = {
400
+ export type TerminateModelServingOperationResponse = {
435
401
  name?: string
436
402
  phase?: OperationPhase
437
403
  resourceVersion?: string
438
404
  updateTime?: GoogleProtobufTimestamp.Timestamp
439
405
  }
440
406
 
441
- export type GetModelServingConfigurationRequest = {
407
+ export type CreateModelServingJSONRequest = {
442
408
  workspace?: number
443
409
  name?: string
410
+ alias?: string
411
+ cluster?: string
412
+ namespace?: string
413
+ helmValues?: string
414
+ }
415
+
416
+ export type GetModelServingJSONRequest = {
417
+ workspace?: number
418
+ name?: string
419
+ }
420
+
421
+ export type GetModelServingJSONResponse = {
422
+ helmValues?: string
423
+ revision?: string
444
424
  }
445
425
 
446
- export type UpdateModelServingConfigurationRequest = {
426
+ export type UpdateModelServingJSONRequest = {
447
427
  workspace?: number
448
428
  name?: string
449
- configuration?: Configuration
429
+ helmValues?: string
450
430
  baseRevision?: string
451
431
  }
452
432
 
433
+ export type UpdateModelServingJSONResponse = {
434
+ name?: string
435
+ phase?: OperationPhase
436
+ resourceVersion?: string
437
+ updateTime?: GoogleProtobufTimestamp.Timestamp
438
+ }
439
+
440
+ export type GetModelServingFormUIRequest = {
441
+ workspace?: number
442
+ stack?: InferyCommonCommon.InferenceStack
443
+ disaggregationMode?: InferyCommonCommon.DisaggregationMode
444
+ version?: string
445
+ }
446
+
447
+ export type GetModelServingFormUIResponse = {
448
+ uiConfig?: string
449
+ version?: string
450
+ }
451
+
452
+
453
+ type BaseGetModelServingFormRequest = {
454
+ workspace?: number
455
+ stack?: InferyCommonCommon.InferenceStack
456
+ disaggregationMode?: InferyCommonCommon.DisaggregationMode
457
+ version?: string
458
+ }
459
+
460
+ export type GetModelServingFormRequest = BaseGetModelServingFormRequest
461
+ & OneOf<{ inferenceTemplateName: string; modelServingName: string }>
462
+
463
+ export type ModelServingFormInstance = {
464
+ modelConfiguration?: ModelConfiguration
465
+ name?: string
466
+ workspace?: number
467
+ alias?: string
468
+ cluster?: string
469
+ namespace?: string
470
+ resourceVersion?: string
471
+ origin?: ModelServingOrigin
472
+ }
473
+
474
+ export type GetModelServingFormResponse = {
475
+ form?: string
476
+ stack?: InferyCommonCommon.InferenceStack
477
+ disaggregationMode?: InferyCommonCommon.DisaggregationMode
478
+ version?: string
479
+ }
480
+
453
481
  export class ModelServingManagement {
482
+ static GetModelServingFormUI(req: GetModelServingFormUIRequest, initReq?: fm.InitReq): Promise<GetModelServingFormUIResponse> {
483
+ return fm.fetchReq<GetModelServingFormUIRequest, GetModelServingFormUIResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving-form?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
484
+ }
485
+ static GetModelServingForm(req: GetModelServingFormRequest, initReq?: fm.InitReq): Promise<GetModelServingFormResponse> {
486
+ return fm.fetchReq<GetModelServingFormRequest, GetModelServingFormResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving-form:values?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
487
+ }
454
488
  static PreviewModelServing(req: PreviewModelServingRequest, initReq?: fm.InitReq): Promise<PreviewModelServingResponse> {
455
489
  return fm.fetchReq<PreviewModelServingRequest, PreviewModelServingResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/preview`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
456
490
  }
@@ -475,13 +509,19 @@ export class ModelServingManagement {
475
509
  static DeleteModelServing(req: DeleteModelServingRequest, initReq?: fm.InitReq): Promise<DeleteModelServingResponse> {
476
510
  return fm.fetchReq<DeleteModelServingRequest, DeleteModelServingResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}`, {...initReq, method: "DELETE"})
477
511
  }
478
- static DoModelServingAction(req: ModelServingActionRequest, initReq?: fm.InitReq): Promise<ModelServingActionResponse> {
479
- return fm.fetchReq<ModelServingActionRequest, ModelServingActionResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
512
+ static SyncModelServing(req: SyncModelServingRequest, initReq?: fm.InitReq): Promise<SyncModelServingResponse> {
513
+ return fm.fetchReq<SyncModelServingRequest, SyncModelServingResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/sync`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
514
+ }
515
+ static TerminateModelServingOperation(req: TerminateModelServingOperationRequest, initReq?: fm.InitReq): Promise<TerminateModelServingOperationResponse> {
516
+ return fm.fetchReq<TerminateModelServingOperationRequest, TerminateModelServingOperationResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/operation?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "DELETE"})
517
+ }
518
+ static CreateModelServingJSON(req: CreateModelServingJSONRequest, initReq?: fm.InitReq): Promise<CreateModelServingResponse> {
519
+ return fm.fetchReq<CreateModelServingJSONRequest, CreateModelServingResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving:json`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
480
520
  }
481
- static GetModelServingConfiguration(req: GetModelServingConfigurationRequest, initReq?: fm.InitReq): Promise<GetModelServingConfigurationResponse> {
482
- return fm.fetchReq<GetModelServingConfigurationRequest, GetModelServingConfigurationResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/configuration?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
521
+ static GetModelServingJSON(req: GetModelServingJSONRequest, initReq?: fm.InitReq): Promise<GetModelServingJSONResponse> {
522
+ return fm.fetchReq<GetModelServingJSONRequest, GetModelServingJSONResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/json?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
483
523
  }
484
- static UpdateModelServingConfiguration(req: UpdateModelServingConfigurationRequest, initReq?: fm.InitReq): Promise<UpdateModelServingConfigurationResponse> {
485
- return fm.fetchReq<UpdateModelServingConfigurationRequest, UpdateModelServingConfigurationResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/configuration`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
524
+ static UpdateModelServingJSON(req: UpdateModelServingJSONRequest, initReq?: fm.InitReq): Promise<UpdateModelServingJSONResponse> {
525
+ return fm.fetchReq<UpdateModelServingJSONRequest, UpdateModelServingJSONResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/json`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
486
526
  }
487
527
  }
@@ -6,6 +6,15 @@
6
6
 
7
7
  import * as InferyCommonCommon from "../../../common/common.pb"
8
8
  import * as fm from "../../../fetch.pb"
9
+
10
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
+ type OneOf<T> =
12
+ | { [k in keyof T]?: undefined }
13
+ | (
14
+ keyof T extends infer K ?
15
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
16
+ : never)
17
+ : never);
9
18
  export type ListWorkspaceRequest = {
10
19
  cluster?: string
11
20
  }
@@ -21,12 +30,18 @@ export type ListWorkspacesResponse = {
21
30
 
22
31
  export type ListClusterRequest = {
23
32
  workspace?: number
33
+ inferenceTemplate?: string
24
34
  }
25
35
 
26
- export type Cluster = {
36
+
37
+ type BaseCluster = {
27
38
  name?: string
28
39
  }
29
40
 
41
+ export type Cluster = BaseCluster
42
+ & OneOf<{ gpuVendorMatched: boolean }>
43
+ & OneOf<{ gpuModelMatched: boolean }>
44
+
30
45
  export type ListClustersResponse = {
31
46
  items?: Cluster[]
32
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/infery",
3
- "version": "v0.0.0-dev-5f1c0a44",
3
+ "version": "v0.0.0-dev-c6ffc97d",
4
4
  "description": "Infery frontend protobuf SDK",
5
5
  "license": "ISC"
6
6
  }