Skip to main content

Type Alias: LlmUsageAccountResolver()

LlmUsageAccountResolver = (context) => string | undefined

Defined in: packages/agentos/src/api/observers.ts:178

Names the account of a call whose spend budget names none. Asked for each usage event that is about to reach an observer, so it runs on the LLM call path and returns at once. Returning undefined or an empty string leaves LlmUsageEvent.accountId absent, and so does throwing: the throw is logged by its built-in error type alone and the call goes on. A promise is no account either; one that rejects is handled and logged the same way.

Parameters​

context​

LlmUsageAccountContext

Returns​

string | undefined