Skip to content

OpenRouterError

OpenRouter error metadata augmentation.

Provides OpenRouter-specific metadata fields for AI error types through module augmentation, enabling typed access to OpenRouter error details.

2 exports Added in v4.0.0 Source

Models

OpenRouter-specific error metadata fields.

Signature

type OpenRouterErrorMetadata = {
readonly errorCode: string | number | null;
readonly errorType: string | null;
readonly requestId: string | null;
};

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;
};