Class AiGatewayRateLimitInstanceAttributes

One counter of a template rate limit and its live usage.

Hierarchy

  • AiGatewayRateLimitInstanceAttributes

Constructors

Properties

additionalProperties?: {
    [key: string]: any;
}

A container for additional, undeclared properties. This is a holder for any undeclared properties as specified with the 'additionalProperties' keyword in the OAS document.

Type declaration

  • [key: string]: any
costMicrocents?: number

Priced spend, in microcents, counted in the rolling one-minute window. The value is 0 when the rate limit doesn't limit cost.

costMicrocentsPerMinute?: number

The rate limit's per-counter spend limit, in microcents. Null when the rate limit doesn't limit cost.

firstSeen: Date

When the gateway first recorded a request for this counter.

inputTokens: number

Input tokens counted in the rolling one-minute window.

inputTokensPerMinute?: number

The rate limit's per-counter input token limit. Null when it doesn't limit input tokens.

instanceKey: string

Opaque canonical key identifying the counter.

lastSeen: Date

When the gateway last recorded this counter as hot, meaning it was at 80% or more of a limit, or it limited or would have limited a request. This value can lag live traffic by a few minutes.

limitedRequests: number

Requests this counter rejected in the last 15 minutes (ENFORCE).

outputTokens: number

Output tokens counted in the rolling one-minute window.

outputTokensPerMinute?: number

The rate limit's per-counter output token limit. Null when it doesn't limit output tokens.

rateLimitId: string

Rate limit UUID.

requests: number

Requests counted in the rolling one-minute window.

requestsPerMinute?: number

The rate limit's per-counter request limit. Null when it doesn't limit requests.

splitDims: {
    [key: string]: string;
}

The counter's value for each per-value dimension. user_id and team_id values are raw UUIDs.

Type declaration

  • [key: string]: string
usageKnown: boolean

False when this counter's usage wasn't read because the request already read the most counters it may. Its usage then reads as zero.

utilization: number

The fullest of the rate limit's limits in the rolling window, as a fraction. 1 or more means the counter is at its limit.

wouldLimitRequests: number

Requests this counter would have rejected in the last 15 minutes (ALERT).

Generated using TypeDoc