Skip to content

OpenRouterError.ts

OpenRouter-specific error metadata fields.

Since v4.0.0



OpenRouter-specific error metadata fields.

Signature

type OpenRouterErrorMetadata = {
/**
* The error code returned by the API.
*/
readonly errorCode: string | number | null
/**
* The error type returned by the API.
*/
readonly errorType: string | null
/**
* The unique request ID for debugging.
*/
readonly requestId: string | null
}

Source

Since v4.0.0

OpenRouter-specific rate limit metadata fields.

Signature

type OpenRouterRateLimitMetadata = OpenRouterErrorMetadata & {
readonly limit: string | null
readonly remaining: number | null
readonly resetRequests: string | null
readonly resetTokens: string | null
}

Source

Since v4.0.0