cmind/modelmanager/v1/external_model_service.proto
Package: cmind.modelmanager.v1
Enums
ExternalModelProvider
| Value | Number | Description |
|---|---|---|
EXTERNAL_MODEL_PROVIDER_UNSPECIFIED | 0 | |
EXTERNAL_MODEL_PROVIDER_OPENAI | 1 | |
EXTERNAL_MODEL_PROVIDER_AZURE | 2 | |
EXTERNAL_MODEL_PROVIDER_CUSTOM_OPENAI | 3 |
Messages
ExternalModel
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | name is the resource name (metadata.name in K8s) |
provider | ExternalModelProvider | 2 | provider identifies the type of external service |
providerModelId | string | 3 | provider_model_id is the provider's model identifier, sent on the wire to the external provider on every request (e.g. "gpt-4o"). Not required to be unique — multiple connectors may target the same provider model. The unique, client-facing identifier is public_model_id. |
apiKey | string | 5 | api_key is the credential for authenticating with the provider |
baseUrl | string | 6 | base_url is the endpoint URL for custom_openai or azure providers |
apiVersion | string | 7 | api_version is the API version for Azure OpenAI |
sharing | Sharing | 8 | sharing reflects current sharing state. Read-only on Create/Update — mutate via UpdateExternalModelSharing. |
publicModelId | string | 9 | public_model_id is the client-facing model identifier. Clients send this exact string in the OpenAI model field to invoke this external model. 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._/-]. |
displayName | string | 10 | display_name is the human-facing label rendered in pickers and admin UIs. Mutable; not required to be unique. |
capabilities | ModelCapabilities | 11 | capabilities describes what this external model can do (task type + input modalities). Mirrors the CRD spec.capabilities. External models have no preset, so the type defaults to text-generation. |
CreateExternalModelRequest
| Field | Type | Number | Description |
|---|---|---|---|
externalModel | ExternalModel | 1 |
CreateExternalModelResponse
| Field | Type | Number | Description |
|---|---|---|---|
externalModel | ExternalModel | 1 |
CreateTenantExternalModelRequest
| Field | Type | Number | Description |
|---|---|---|---|
externalModel | ExternalModel | 1 | |
tenantId | string | 2 | Tenant that owns the model |
CreateTenantExternalModelResponse
| Field | Type | Number | Description |
|---|---|---|---|
externalModel | ExternalModel | 1 |
GetExternalModelRequest
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 |
GetExternalModelResponse
| Field | Type | Number | Description |
|---|---|---|---|
externalModel | ExternalModel | 1 |
UpdateExternalModelRequest
| Field | Type | Number | Description |
|---|---|---|---|
externalModel | ExternalModel | 1 |
UpdateExternalModelResponse
| Field | Type | Number | Description |
|---|---|---|---|
externalModel | ExternalModel | 1 |
UpdateExternalModelSharingRequest
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | |
sharing | Sharing | 2 |
UpdateExternalModelSharingResponse
| Field | Type | Number | Description |
|---|---|---|---|
sharing | Sharing | 1 |
DeleteExternalModelRequest
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 |
DeleteExternalModelResponse
ListExternalModelsRequest
ExternalModelSummary
ExternalModelSummary is the slim shape returned by ListExternalModels. Connection detail (base_url, api_version) is omitted because the list endpoint is reachable by any tenant member with can_invoke; api_key has always been stripped on read but base_url would leak provider hostnames. Callers needing detail use GetExternalModel (can_admin). share_to_all mirrors ModelDeploymentSummary — pickers need it, shared_with stays admin-only.
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | |
displayName | string | 2 | |
publicModelId | string | 3 | |
providerModelId | string | 4 | |
provider | ExternalModelProvider | 5 | |
shareToAll | bool | 6 | |
capabilities | ModelCapabilities | 7 | capabilities lets pickers filter the list to a context without a per-item GetExternalModel round-trip. See ModelCapabilities. |
tenantId | string | 8 | Owning tenant; empty means platform-owned (cluster-wide) |
ListExternalModelsResponse
| Field | Type | Number | Description |
|---|---|---|---|
externalModels | repeated ExternalModelSummary | 1 |
ListExternalModelPermissionsRequest
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | |
subjectType | optional cmind.permissions.v1.SubjectType | 2 | |
role | optional cmind.permissions.v1.DeploymentRole | 3 |
ListExternalModelPermissionsResponse
| Field | Type | Number | Description |
|---|---|---|---|
permissions | repeated cmind.permissions.v1.DeploymentPermission | 1 |
AddExternalModelPermissionRequest
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | |
subject | cmind.permissions.v1.Subject | 2 | |
role | cmind.permissions.v1.DeploymentRole | 3 |
AddExternalModelPermissionResponse
RemoveExternalModelPermissionRequest
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | |
subject | cmind.permissions.v1.Subject | 2 | |
role | cmind.permissions.v1.DeploymentRole | 3 |
RemoveExternalModelPermissionResponse
GetExternalModelMetricsRequest
| Field | Type | Number | Description |
|---|---|---|---|
name | string | 1 | |
startTime | uint32 | 2 | |
endTime | uint32 | 3 | |
step | MetricsStep | 4 |
GetExternalModelMetricsResponse
| Field | Type | Number | Description |
|---|---|---|---|
timeRange | MetricsTimeRange | 1 | |
metrics | ExternalModelMetrics | 2 |
ExternalModelMetrics
ExternalModelMetrics carries only token-usage series. Request counts, latency percentiles, and error rates are intentionally absent: those derive from in-cluster request logs, which external (proxied) models do not emit.
| Field | Type | Number | Description |
|---|---|---|---|
totalPromptTokens | repeated MetricPoint | 1 | |
totalCompletionTokens | repeated MetricPoint | 2 | |
totalEmbeddingTokens | repeated MetricPoint | 3 | |
totalRerankTokens | repeated MetricPoint | 4 | |
totalTokens | repeated MetricPoint | 5 |
Services
ExternalModelService
CreateExternalModel
Request: CreateExternalModelRequest
Response: CreateExternalModelResponse
CreateTenantExternalModel
Creates a tenant-owned external model (parent_tenant = tenant_id). Mirrors CreateExternalModel but scopes the model to a tenant; CreateExternalModel remains the platform-scoped create.
Request: CreateTenantExternalModelRequest
Response: CreateTenantExternalModelResponse
GetExternalModel
Request: GetExternalModelRequest
Response: GetExternalModelResponse
UpdateExternalModel
Request: UpdateExternalModelRequest
Response: UpdateExternalModelResponse
UpdateExternalModelSharing
UpdateExternalModelSharing replaces the model's Sharing struct atomically (PUT semantics). The full desired state must be supplied; omitted fields are cleared. Sharing is not mutated by UpdateExternalModel — this is the only write path for it.
Request: UpdateExternalModelSharingRequest
Response: UpdateExternalModelSharingResponse
DeleteExternalModel
Request: DeleteExternalModelRequest
Response: DeleteExternalModelResponse
ListExternalModels
Handler filters per-item by can_invoke; gate here is just "logged in".
Request: ListExternalModelsRequest
Response: ListExternalModelsResponse
ListExternalModelPermissions
Request: ListExternalModelPermissionsRequest
Response: ListExternalModelPermissionsResponse
AddExternalModelPermission
Request: AddExternalModelPermissionRequest
Response: AddExternalModelPermissionResponse
RemoveExternalModelPermission
Request: RemoveExternalModelPermissionRequest
Response: RemoveExternalModelPermissionResponse
GetExternalModelMetrics
GetExternalModelMetrics returns token-usage time series for an external model. Only token metrics are available: request counts, latency, and error rates require in-cluster request logs, which proxied external models do not produce.
Request: GetExternalModelMetricsRequest
Response: GetExternalModelMetricsResponse