OpenAiError.ts
OpenAiError.ts overview
Section titled “OpenAiError.ts overview”OpenAI-specific error metadata fields.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”models
Section titled “models”OpenAiErrorMetadata (type alias)
Section titled “OpenAiErrorMetadata (type alias)”OpenAI-specific error metadata fields.
Signature
type OpenAiErrorMetadata = { /** * The OpenAI error code returned by the API. */ readonly errorCode: string | null /** * The OpenAI error type returned by the API. */ readonly errorType: string | null /** * The unique request ID for debugging with OpenAI support. */ readonly requestId: string | null}Since v4.0.0
OpenAiRateLimitMetadata (type alias)
Section titled “OpenAiRateLimitMetadata (type alias)”OpenAI-specific rate limit metadata fields.
Details
Extends base error metadata with rate limit specific information from OpenAI’s rate limit headers.
Signature
type OpenAiRateLimitMetadata = OpenAiErrorMetadata & { /** * The rate limit type (e.g. "requests", "tokens"). */ readonly limit: string | null /** * Number of remaining requests in the current window. */ readonly remaining: number | null /** * Time until the request rate limit resets. */ readonly resetRequests: string | null /** * Time until the token rate limit resets. */ readonly resetTokens: string | null}Since v4.0.0