Function: noRetry()
@providerprotocol/ai / @providerprotocol/ai / noRetry
Function: noRetry()
Section titled “Function: noRetry()”noRetry():
RetryStrategyFactory
Defined in: src/http/retry.ts:188
Creates a no-retry strategy that fails immediately on any error.
Use this strategy when:
- Retries are handled at a higher level in your application
- You want immediate failure feedback
- The operation is not idempotent
- Time sensitivity requires fast failure
Returns
Section titled “Returns”RetryStrategyFactory
A factory that creates no-retry strategy instances
Example
Section titled “Example”// Disable retries for time-sensitive operationsconst provider = createOpenAI({ retryStrategy: noRetry()});