Skip to main content

Interface: LateAttemptUsage

Defined in: packages/agentos/src/api/runtime/completionGateway.ts:191

Usage a provider reported for an attempt after the caller's signal ended it. The attempt ends at once, and a provider stream that had started is read in the background until it ends (for a bounded number of chunks), where a provider that bills the request may still report the bill: OpenRouter ends its stream with an abort chunk carrying the usage line it was reading (the one a held content-filter decline or a held error was waiting for, or the one that follows a normal finish). Neither the attempt's outcome nor its chunks carry this usage.

Properties​

hop​

hop: number

Defined in: packages/agentos/src/api/runtime/completionGateway.ts:194


modelId​

modelId: string

Defined in: packages/agentos/src/api/runtime/completionGateway.ts:193


providerId​

providerId: string

Defined in: packages/agentos/src/api/runtime/completionGateway.ts:192


usage​

usage: ModelUsage

Defined in: packages/agentos/src/api/runtime/completionGateway.ts:196

The usage beyond what the attempt reported before it ended (providers report a request's running total).