Skip to content

Commit 26cd543

Browse files
feat(api): manual updates
Manually updated max_retries param
1 parent f95b625 commit 26cd543

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 33
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-ea6ec4b34f6b7fdecc564f59b2e31482eee05830bf8dc1f389461b158de1548e.yml
33
openapi_spec_hash: ea89c1faed473908be2740efe6da255f
4-
config_hash: 781efc49d819495a2ef4aeedc8088a6a
4+
config_hash: 247c2ce23a36ef7446d356308329c87b

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,9 @@ Error codes are as follows:
383383

384384
### Retries
385385

386-
The library automatically retries certain errors two times by default, with a short exponential backoff.
387-
Connection errors (for example, due to a network connectivity problem), `408 Request Timeout`, `409 Conflict`,
388-
`429 Rate Limit`, and `>=500 Internal errors` are all retried by default.
386+
Certain errors are automatically retried 7 times by default, with a short exponential backoff.
387+
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
388+
429 Rate Limit, and >=500 Internal errors are all retried by default.
389389

390390
You can use the `max_retries` option to configure or disable retry settings:
391391

src/writerai/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# default timeout is 3 minutes
99
DEFAULT_TIMEOUT = httpx.Timeout(timeout=180, connect=5.0)
10-
DEFAULT_MAX_RETRIES = 2
10+
DEFAULT_MAX_RETRIES = 7
1111
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
1212

1313
INITIAL_RETRY_DELAY = 1.0

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_copy_default_options(self, client: Writer) -> None:
9292
# options that have a default are overridden correctly
9393
copied = client.copy(max_retries=7)
9494
assert copied.max_retries == 7
95-
assert client.max_retries == 2
95+
assert client.max_retries == 7
9696

9797
copied2 = copied.copy(max_retries=6)
9898
assert copied2.max_retries == 6
@@ -922,7 +922,7 @@ def test_copy_default_options(self, async_client: AsyncWriter) -> None:
922922
# options that have a default are overridden correctly
923923
copied = async_client.copy(max_retries=7)
924924
assert copied.max_retries == 7
925-
assert async_client.max_retries == 2
925+
assert async_client.max_retries == 7
926926

927927
copied2 = copied.copy(max_retries=6)
928928
assert copied2.max_retries == 6

0 commit comments

Comments
 (0)