コンテンツにスキップ

RetryPolicyContext

このコンテンツはまだ日本語訳がありません。

type RetryPolicyContext = object;
attempt: number;

The 1-based number of the failed attempt.


readonly optional conversationId?: string;

The conversation identifier carried by the failed request, when present.


error: unknown;

The error thrown by the failed model attempt.


maxRetries: number;

The configured number of retries allowed after the initial attempt.


normalized: ModelRetryNormalizedError;

Generic normalized facts extracted from the error and provider advice.


readonly optional previousResponseId?: string;

The previous response identifier carried by the failed request, when present.


optional providerAdvice?: ModelRetryAdvice;

Optional provider guidance for the failure.


readonly optional replaySafety?: "safe" | "unsafe" | "unknown";

Stable provider replay classification captured before the policy runs. The runner always supplies this field; it is optional for compatibility with code that constructs policy contexts directly.


readonly optional responseStarted?: boolean;

Stable response-start evidence captured before the policy runs. The runner preserves undefined when the provider supplies no evidence. The field is optional for compatibility with code that constructs policy contexts directly.


readonly optional statefulRequest?: boolean;

Whether the failed request carried a previous response or conversation identifier. The runner always supplies this field; it is optional for compatibility with code that constructs policy contexts directly.


stream: boolean;

Whether the failed request was streaming.