콘텐츠로 이동

RetryPolicyContext

이 콘텐츠는 아직 번역되지 않았습니다.

type RetryPolicyContext = object;
attempt: number;

The 1-based number of the failed attempt.


readonly 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 previousResponseId?: string;

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


providerAdvice?: ModelRetryAdvice;

Optional provider guidance for the failure.


readonly 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 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 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.