Interface: IUsageCall
Defined in: internal/usage-guard/types.ts:118
The factors of one model call, the same on check and addUsage.
Everything the gateway knows about who calls which model for what; the adapter decides with it.
Extended by
Properties
kind
kind:
ETraceKind
Defined in: internal/usage-guard/types.ts:130
What the call is for: the answer, a run step, a guardrail judge, a query rewrite, an embedding, a memory update.
modelId
modelId:
string
Defined in: internal/usage-guard/types.ts:128
The model that answers: the profile's main or cheap model, or the embedding model.
profileId?
optionalprofileId?:string
Defined in: internal/usage-guard/types.ts:126
The profile the call runs on. Absent for system jobs (e.g. KB ingestion).
runId?
optionalrunId?:string
Defined in: internal/usage-guard/types.ts:134
The run the call is a step of; absent outside a run.
tenantId
tenantId:
string
Defined in: internal/usage-guard/types.ts:122
The tenant that pays: every limit of the app is at least per tenant.
threadId?
optionalthreadId?:string
Defined in: internal/usage-guard/types.ts:132
The thread of the call; absent for a call outside a thread (an embedding, a KB ingestion).
traceId
traceId:
string
Defined in: internal/usage-guard/types.ts:120
The id of the call's trace entry: links a report to the trace and pairs a check with its addUsage.
userId?
optionaluserId?:string
Defined in: internal/usage-guard/types.ts:124
Absent for system jobs (e.g. KB ingestion).