cmind/cluster/metering/v1/internal_usage_service.proto
Package: cmind.cluster.metering.v1
Enums
UsageType
| Value | Number | Description |
|---|---|---|
USAGE_TYPE_UNSPECIFIED | 0 | |
USAGE_TYPE_INPUT_TOKENS | 1 | |
USAGE_TYPE_OUTPUT_TOKENS | 2 | |
USAGE_TYPE_EMBEDDING_TOKENS | 3 | |
USAGE_TYPE_RERANK_TOKENS | 4 |
Messages
UsageEntry
| Field | Type | Number | Description |
|---|---|---|---|
originId | optional string | 1 | origin_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. |
targetId | string | 2 | |
timestamp | google.protobuf.Timestamp | 3 | |
userId | optional string | 4 | |
apiKeyId | optional string | 5 | |
traceId | string | 6 | |
type | UsageType | 7 | |
value | uint64 | 8 | |
tenantId | string | 9 | |
agentId | optional string | 10 | agent_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. |
agentGeneration | optional int64 | 11 | agent_generation is the invoked PresetAgent's metadata.generation, so usage rows can be correlated with the revision inside one object incarnation. |
agentUid | optional string | 12 | agent_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
| Field | Type | Number | Description |
|---|---|---|---|
entries | repeated UsageEntry | 1 |
ReportUsageResponse
Services
InternalUsageService
ReportUsage
POST /cmind.cluster.metering.v1.InternalUsageService/ReportUsage
Request: ReportUsageRequest
Response: ReportUsageResponse