OpenRouterError
OpenRouter error metadata augmentation.
Provides OpenRouter-specific metadata fields for AI error types through module augmentation, enabling typed access to OpenRouter error details.
Models
OpenRouterErrorMetadata type
Added in v4.0.0
Source
Signature
type OpenRouterErrorMetadata = {
readonly errorCode: string | number | null;
readonly errorType: string | null;
readonly requestId: string | null;
};OpenRouterRateLimitMetadata type
Added in v4.0.0
Source
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;
};
OpenRouter-specific error metadata fields.