Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Turning retries off in your application does not always stop the SDK client from retrying. In the official OpenAI Python and Node SDK documentation, the default is two retries for certain failures—up to three total attempts when the original request is counted. Whether that explains your case depends on the SDK, version, client configuration, and request path.

What “two retries” means

A retry is another attempt after the initial request fails. So two retries ordinarily means up to three total attempts: the first request plus two more. Some SDKs instead express a limit as total attempts, so check the specific library’s definition before interpreting a setting or log.

Retries are usually limited to particular failures, not every unsuccessful response. OpenAI’s rate-limit guide says official SDKs retry eligible 429 and 503 responses subject to their retry settings: OpenAI API rate limits.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the retry setting for the SDK that sent the request

The title does not identify a language or library, so these examples are diagnostic—not proof that an OpenAI SDK made the requests. Option names and behavior vary by SDK and version.

SDK and source Documented default Setting to disable ordinary retries Documented retry cases
OpenAI Python, official README 2 retries max_retries=0 Connection errors; HTTP 408, 409, 429, and 500-or-higher
OpenAI Node, configuration guide 2 retries maxRetries: 0 Temporary connection errors; HTTP 408, 409, 429, and 500-or-higher
OpenAI Java, version 4.36.0 reference maxRetries default: 2 Not stated in the cited reference Not stated in the cited reference

Sources: OpenAI Python README, OpenAI Node configuration guide, and OpenAI Java ClientOptions 4.36.0 API reference. The Python README and Node guide are current repository documentation, accessed October 7, 2026; the Java reference is specifically for version 4.36.0.

Python

For the cited OpenAI Python SDK, set max_retries=0 on the client instance that makes the request. The official README documents this option for disabling retries. Confirm that the code path uses that configured instance rather than another client.

Node.js

For the cited OpenAI Node SDK, set maxRetries: 0 in the configuration for the client issuing the request. This disables ordinary retries documented by the guide, but does not by itself establish that every separate authentication or middleware path is disabled.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify which configuration actually takes effect

A zero value in one place may not be the effective value used by the request. Check the installed SDK version, the exact client instance, and where the setting is supplied. Configuration precedence is library-specific.

For AWS SDK configuration, the documented order is client configuration over environment variables, then shared configuration, then SDK defaults. AWS also documents max_attempts as counting the initial request: in its standard mode the default is three total attempts, though behavior can depend on SDK and an opt-in setting. Do not apply AWS option names or precedence rules to another SDK without checking that SDK’s documentation: AWS SDK retry behavior reference.

Look for retries outside the ordinary SDK setting

Retry behavior can come from more than one layer. Your application may retry around the SDK call, or middleware or the HTTP transport may make another attempt. If both application-level and SDK-level retries are active, the resulting requests can multiply rather than simply add up.

The OpenAI Node guide also documents a separate workload-identity credential-refresh path: a replayable request that receives HTTP 401 may be retried after credentials are refreshed. That path is distinct from ordinary retries governed by maxRetries. The cited source establishes this behavior for the Node flow it describes, not for every SDK or authentication method.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Trace the requests to find the layer responsible

  1. Identify the caller. Record the language, installed SDK and version, client instance, authentication method, and request path.
  2. Check the option on that client. Use the documented option for the specific SDK, such as max_retries=0 for the cited Python client or maxRetries: 0 for the cited Node client.
  3. Inspect configuration sources. Check client construction, environment variables, shared configuration, and any wrapper that may create or replace the client. Follow the precedence rules documented for your library.
  4. Log each attempt. Compare timestamps, status codes, request identifiers, and SDK or application logs. This helps distinguish a retry inside the SDK from a new call made by application logic or another layer.
  5. Check what failed. Compare the response or connection error with the SDK’s documented retryable failures, and check whether the request body can be replayed if an authentication refresh or transport retry is involved.

Repeated unsuccessful requests can have operational consequences: OpenAI’s rate-limit guide notes that unsuccessful requests count toward per-minute limits. See OpenAI API rate limits.

What can—and cannot—be concluded from the report

Two additional attempts are consistent with the documented defaults for the cited OpenAI Python and Node SDKs, but the report alone does not identify either as the cause. The SDK, version, effective setting, failure status, and authentication flow are all needed to determine whether the repeated requests came from ordinary retries, credential refresh, application code, or another layer.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.