Skip to main content

cmind/modelmanager/v1/model_deployment_service.proto

Package: cmind.modelmanager.v1

Enums

ModelSource

ValueNumberDescription
MODEL_SOURCE_UNSPECIFIED0
MODEL_SOURCE_HUGGINGFACE1Weights are downloaded from HuggingFace Hub at deploy time.
MODEL_SOURCE_LOCAL_PATH2Weights are already present on the serving nodes (pre-staged) and are served from that path with no download — the air-gapped path. model_url holds the on-node directory. See CON-2389.

ModelDeploymentStage

ValueNumberDescription
MODEL_DEPLOYMENT_STAGE_UNSPECIFIED0
MODEL_DEPLOYMENT_STAGE_UNDEPLOYED1
MODEL_DEPLOYMENT_STAGE_CACHING_MODEL2
MODEL_DEPLOYMENT_STAGE_DEPLOYING3
MODEL_DEPLOYMENT_STAGE_DEPLOYED4
MODEL_DEPLOYMENT_STAGE_ERROR5

ModelDeploymentPresetKind

ValueNumberDescription
MODEL_DEPLOYMENT_PRESET_KIND_UNSPECIFIED0
MODEL_DEPLOYMENT_PRESET_KIND_GENERATION1
MODEL_DEPLOYMENT_PRESET_KIND_EMBEDDING2
MODEL_DEPLOYMENT_PRESET_KIND_RERANKER3

Messages

ModelDeploymentStatus

FieldTypeNumberDescription
stageModelDeploymentStage1
stageProgressuint322
stageProgressMaxuint323
errorMessagestring4
errorCodeint325

ModelDeployment

FieldTypeNumberDescription
namestring1name is the Kubernetes resource name / admin handle for the deployment.
modelCachedModel2model is required on Create (enforced server-side). UpdateModelDeployment may omit it when no model.* paths are listed in update_mask.
presetstring3
deploymentInfoModelDeploymentInfo4
targetInfoDeploymentTargetInfo5
scalingScaling6
modelIdstring7model_id is the backend/canonical model identity used by the serving backend. If omitted on create, manager-go preserves legacy behavior and defaults it from name.
sharingSharing8sharing reflects current sharing state. Read-only on Create/Update — mutate via UpdateModelDeploymentSharing.
publicModelIdstring9public_model_id is the client-facing model identifier. This is the exact string clients send in the OpenAI model field to invoke this deployment. Required, immutable, and unique across ModelDeployment + ExternalModel + ModelAlias within the shared namespace. Validation mirrors the operator CRD: alnum start/end, 2–128 chars, internal chars [A-Za-z0-9._/-].
displayNamestring10display_name is the human-facing label rendered in pickers and admin UIs. Mutable; not required to be unique.
capabilitiesModelCapabilities11capabilities describes what this model can do (task type + input modalities). Mirrors the CRD spec.capabilities. The type is defaulted from the preset kind for preset deploys, else text-generation.
disableTracingbool12disable_tracing stops the model server exporting OpenTelemetry spans for inference. For a custom image built without the OTel packages, which treats the tracing flag as a startup error rather than ignoring it.

CachedModel

FieldTypeNumberDescription
modelUrlstring1model_url is required on Create (enforced server-side) and rejected if empty when listed in UpdateModelDeployment's update_mask. Its meaning depends on source: for HUGGINGFACE it's a repo id (e.g. "Qwen/Qwen2.5-7B-Instruct"); for LOCAL_PATH it's an absolute on-node directory (e.g. "/mnt/models/qwen2.5-7b"). The server applies the matching URI scheme (hf:// or local://) for the serving backend; a value that already carries a scheme is passed through unchanged.
modelCredentialsstring2
sourceModelSource3source selects how the weights are obtained. Defaults to HUGGINGFACE when unspecified, preserving the original behavior. On read it is derived from the stored model_url scheme.

KeyValue

FieldTypeNumberDescription
keystring1
valuestring2

ModelDeploymentInfo

FieldTypeNumberDescription
inferenceServerImagestring1
commandstring2
argsrepeated string3
envsrepeated KeyValue4

DeploymentTargetInfo

FieldTypeNumberDescription
nodeSelectorrepeated KeyValue1
gpuIdsrepeated string2
gpuMemoryUtilizationfloat3

Scaling

FieldTypeNumberDescription
replicasoptional int321

ModelDeploymentPresetConfig

FieldTypeNumberDescription
inferenceServerImagestring1
commandstring2
argsrepeated string3
envsrepeated KeyValue4
runtimePresetstring5
gpuMemoryUtilizationfloat6

ModelDeploymentPreset

FieldTypeNumberDescription
idstring1
displayNamestring2
kindModelDeploymentPresetKind3
modelUrlstring4
defaultDeploymentNamestring5
defaultModelIdstring6
defaultPublicModelIdstring7default_public_model_id is the default value to pre-fill into the ModelDeployment's public_model_id when creating from this preset. Constraints match public_model_id.
defaultPublicModelDisplayNamestring8default_public_model_display_name pairs with default_public_model_id — the default display_name to pre-fill on the deployment.
defaultConfigModelDeploymentPresetConfig9
capabilitiesModelCapabilities10capabilities the deployment gets when created from this preset. The portal forwards these in the create request so a catalog deploy is typed without re-deriving anything client-side. Supersedes kind, which predates the capabilities system.

CreateModelDeploymentRequest

FieldTypeNumberDescription
deploymentModelDeployment1

CreateModelDeploymentResponse

FieldTypeNumberDescription
deploymentModelDeployment1
statusModelDeploymentStatus2

GetModelDeploymentRequest

FieldTypeNumberDescription
namestring1

GetModelDeploymentResponse

FieldTypeNumberDescription
deploymentModelDeployment1
statusModelDeploymentStatus2

UpdateModelDeploymentRequest

FieldTypeNumberDescription
deploymentModelDeployment1
updateMaskgoogle.protobuf.FieldMask2update_mask lists which leaf paths in deployment to write. Paths are relative to ModelDeployment (no deployment. prefix). Required and non-empty — empty/unset → InvalidArgument. Supported paths (leaves only): model.model_url, model.model_credentials, preset, deployment_info.inference_server_image, deployment_info.command, deployment_info.args, deployment_info.envs, target_info.node_selector, target_info.gpu_ids, target_info.gpu_memory_utilization, scaling.replicas, display_name, capabilities, disable_tracing. Parent paths (model, deployment_info, target_info, scaling) are NOT supported — list the leaves you want to write. capabilities is the exception: it is written as a whole message (send the full desired value; unset modality axes are defaulted from the type). Read-only/immutable paths (name, model_id, public_model_id, sharing) are rejected; mutate sharing via UpdateModelDeploymentSharing. display_name is mutable. For listed paths, empty values clear the field — including args, envs, node_selector, gpu_ids (whole-list replacement, not append). Exception: empty model.model_url is rejected. model.model_credentials is write-only: omit the path to leave existing credentials unchanged; include with non-empty value to replace; include with empty value to clear.

UpdateModelDeploymentResponse

FieldTypeNumberDescription
deploymentModelDeployment1
statusModelDeploymentStatus2

UpdateModelDeploymentSharingRequest

FieldTypeNumberDescription
namestring1
sharingSharing2

UpdateModelDeploymentSharingResponse

FieldTypeNumberDescription
sharingSharing1

DeleteModelDeploymentRequest

FieldTypeNumberDescription
namestring1

DeleteModelDeploymentResponse

ListModelDeploymentsRequest

ModelDeploymentSummary

ModelDeploymentSummary is the slim shape returned by ListModelDeployments. Spec detail (model.*, deployment_info, target_info, scaling) is omitted because the list endpoint is reachable by any tenant member with can_invoke; detail fields can carry secrets (env vars, model credentials, private model URLs). Callers must fetch them via GetModelDeployment, which is gated by can_admin. share_to_all is included because pickers need to distinguish public models from tenant-scoped ones. The full Sharing struct (notably shared_with) is admin-only — enumerating other tenants on a public list would be a cross-tenant leak.

FieldTypeNumberDescription
namestring1
displayNamestring2
publicModelIdstring3
modelIdstring4
shareToAllbool5
capabilitiesModelCapabilities6capabilities lets pickers filter the list to a context without a per-item GetModelDeployment round-trip. See ModelCapabilities.

ListModelDeploymentsResponse

FieldTypeNumberDescription
deploymentsrepeated ListModelDeploymentsResponse.Item1

ListModelDeploymentsResponse.Item

FieldTypeNumberDescription
deploymentModelDeploymentSummary1
statusModelDeploymentStatus2

ListModelDeploymentPresetsRequest

ListModelDeploymentPresetsResponse

FieldTypeNumberDescription
presetsrepeated ModelDeploymentPreset1

WatchModelDeploymentStatusRequest

FieldTypeNumberDescription
namesrepeated string1

WatchModelDeploymentStatusResponse

FieldTypeNumberDescription
namestring1
statusModelDeploymentStatus2

ListModelDeploymentPermissionsRequest

FieldTypeNumberDescription
namestring1
subjectTypeoptional cmind.permissions.v1.SubjectType2
roleoptional cmind.permissions.v1.DeploymentRole3

ListModelDeploymentPermissionsResponse

FieldTypeNumberDescription
permissionsrepeated cmind.permissions.v1.DeploymentPermission1

AddModelDeploymentPermissionRequest

FieldTypeNumberDescription
namestring1
subjectcmind.permissions.v1.Subject2
rolecmind.permissions.v1.DeploymentRole3

AddModelDeploymentPermissionResponse

RemoveModelDeploymentPermissionRequest

FieldTypeNumberDescription
namestring1
subjectcmind.permissions.v1.Subject2
rolecmind.permissions.v1.DeploymentRole3

RemoveModelDeploymentPermissionResponse

Services

ModelDeploymentService

CreateModelDeployment

POST /cmind.modelmanager.v1.ModelDeploymentService/CreateModelDeployment

Request: CreateModelDeploymentRequest

Response: CreateModelDeploymentResponse

GetModelDeployment

GET /cmind.modelmanager.v1.ModelDeploymentService/GetModelDeployment

Request: GetModelDeploymentRequest

Response: GetModelDeploymentResponse

UpdateModelDeployment

POST /cmind.modelmanager.v1.ModelDeploymentService/UpdateModelDeployment

Request: UpdateModelDeploymentRequest

Response: UpdateModelDeploymentResponse

UpdateModelDeploymentSharing

POST /cmind.modelmanager.v1.ModelDeploymentService/UpdateModelDeploymentSharing

UpdateModelDeploymentSharing replaces the deployment's Sharing struct atomically (PUT semantics). The full desired state must be supplied; omitted fields are cleared. Sharing is not mutated by UpdateModelDeployment — this is the only write path for it.

Request: UpdateModelDeploymentSharingRequest

Response: UpdateModelDeploymentSharingResponse

DeleteModelDeployment

POST /cmind.modelmanager.v1.ModelDeploymentService/DeleteModelDeployment

Request: DeleteModelDeploymentRequest

Response: DeleteModelDeploymentResponse

ListModelDeployments

GET /cmind.modelmanager.v1.ModelDeploymentService/ListModelDeployments

Handler filters per-item by can_invoke; gate here is just "logged in".

Request: ListModelDeploymentsRequest

Response: ListModelDeploymentsResponse

ListModelDeploymentPresets

GET /cmind.modelmanager.v1.ModelDeploymentService/ListModelDeploymentPresets

Request: ListModelDeploymentPresetsRequest

Response: ListModelDeploymentPresetsResponse

WatchModelDeploymentStatus

POST /cmind.modelmanager.v1.ModelDeploymentService/WatchModelDeploymentStatus

Caller must be admin on every model deployment it asks to watch; the {names[]} template fans the FGA check out across the batch.

Request: WatchModelDeploymentStatusRequest

Response: stream WatchModelDeploymentStatusResponse

ListModelDeploymentPermissions

GET /cmind.modelmanager.v1.ModelDeploymentService/ListModelDeploymentPermissions

Request: ListModelDeploymentPermissionsRequest

Response: ListModelDeploymentPermissionsResponse

AddModelDeploymentPermission

POST /cmind.modelmanager.v1.ModelDeploymentService/AddModelDeploymentPermission

Request: AddModelDeploymentPermissionRequest

Response: AddModelDeploymentPermissionResponse

RemoveModelDeploymentPermission

POST /cmind.modelmanager.v1.ModelDeploymentService/RemoveModelDeploymentPermission

Request: RemoveModelDeploymentPermissionRequest

Response: RemoveModelDeploymentPermissionResponse