Skip to main content

cmind/cluster/metering/v1/internal_usage_service.proto

Package: cmind.cluster.metering.v1

Enums

UsageType

ValueNumberDescription
USAGE_TYPE_UNSPECIFIED0
USAGE_TYPE_INPUT_TOKENS1
USAGE_TYPE_OUTPUT_TOKENS2
USAGE_TYPE_EMBEDDING_TOKENS3
USAGE_TYPE_RERANK_TOKENS4

Messages

UsageEntry

FieldTypeNumberDescription
originIdoptional string1origin_id attributes usage to a non-user, non-key origin — e.g. a rag_deployment running an autonomous connector ingestion, which has neither a user nor an api_key to bill against. It satisfies the at-least-one-identity rule on its own.
targetIdstring2
timestampgoogle.protobuf.Timestamp3
userIdoptional string4
apiKeyIdoptional string5
traceIdstring6
typeUsageType7
valueuint648
tenantIdstring9
agentIdoptional string10agent_id is the preset agent's logical, human-readable name. It is an added dimension: target_id stays the base model deployment. Absent for direct model invocations. A name can be reused after delete/recreate, so use agent_uid plus agent_generation for durable revision identity.
agentGenerationoptional int6411agent_generation is the invoked PresetAgent's metadata.generation, so usage rows can be correlated with the revision inside one object incarnation.
agentUidoptional string12agent_uid is the invoked PresetAgent's immutable Kubernetes metadata.uid. Together with agent_generation it identifies the exact serving revision, even when an agent name is deleted and recreated.

ReportUsageRequest

FieldTypeNumberDescription
entriesrepeated UsageEntry1

ReportUsageResponse

Services

InternalUsageService

ReportUsage

POST /cmind.cluster.metering.v1.InternalUsageService/ReportUsage

Request: ReportUsageRequest

Response: ReportUsageResponse