Skip to content

Interface: JobUsage ​

Defined in: glide-mq/src/types.ts:653

AI-specific usage metadata reported by a job processor.

Properties ​

cached? ​

ts
optional cached?: boolean;

Defined in: glide-mq/src/types.ts:677

Whether the response came from a cache hit.


costs? ​

ts
optional costs?: Record<string, number>;

Defined in: glide-mq/src/types.ts:669

Cost breakdown by category. Values are in whatever unit costUnit specifies. Any string key is accepted.


costUnit? ​

ts
optional costUnit?: string;

Defined in: glide-mq/src/types.ts:673

Unit for cost values (e.g. 'usd', 'credits', 'ils'). Informational only.


latencyMs? ​

ts
optional latencyMs?: number;

Defined in: glide-mq/src/types.ts:675

Inference latency in milliseconds (not including queue wait time).


model? ​

ts
optional model?: string;

Defined in: glide-mq/src/types.ts:655

Model identifier (e.g. 'gpt-5.4', 'claude-sonnet-4-20250514').


provider? ​

ts
optional provider?: string;

Defined in: glide-mq/src/types.ts:657

Provider identifier (e.g. 'openai', 'anthropic').


tokens? ​

ts
optional tokens?: Record<string, number>;

Defined in: glide-mq/src/types.ts:662

Token counts by category. Any string key is accepted. Well-known keys: input, output, reasoning, cachedInput, cachedOutput.


totalCost? ​

ts
optional totalCost?: number;

Defined in: glide-mq/src/types.ts:671

Total cost (auto-computed as sum of all values in costs if not provided).


totalTokens? ​

ts
optional totalTokens?: number;

Defined in: glide-mq/src/types.ts:664

Total tokens (auto-computed as sum of all values in tokens if not provided).

Released under the Apache-2.0 License.