Skip to content

Commit 01b01d4

Browse files
feat(api): api update
1 parent c06841b commit 01b01d4

4 files changed

Lines changed: 8 additions & 8 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: 92
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-75c0dc94dd629772c98b3e6f763d8b3a1bdb732aa3eb92d49a59fb446fb2410d.yml
33
openapi_spec_hash: 12286e648ea1156bfa23020ed0c7598b
4-
config_hash: 5a04741d17a98f68dc474a29c516d3f8
4+
config_hash: 60681f589a9e641fdb7f19af2021a033

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Error codes are as follows:
245245

246246
### Retries
247247

248-
Certain errors are automatically retried 3 times by default, with a short exponential backoff.
248+
Certain errors are automatically retried 5 times by default, with a short exponential backoff.
249249
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
250250
429 Rate Limit, and >=500 Internal errors are all retried by default.
251251

src/runloop_api_client/_constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

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

1313
INITIAL_RETRY_DELAY = 1.0
14-
MAX_RETRY_DELAY = 15.0
14+
MAX_RETRY_DELAY = 60.0

tests/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_copy_default_options(self) -> None:
9393
# options that have a default are overridden correctly
9494
copied = self.client.copy(max_retries=7)
9595
assert copied.max_retries == 7
96-
assert self.client.max_retries == 3
96+
assert self.client.max_retries == 5
9797

9898
copied2 = copied.copy(max_retries=6)
9999
assert copied2.max_retries == 6
@@ -754,7 +754,7 @@ class Model(BaseModel):
754754
[3, "", 1],
755755
[2, "", 1 * 2.0],
756756
[1, "", 1 * 4.0],
757-
[-1100, "", 15], # test large number potentially overflowing
757+
[-1100, "", 60], # test large number potentially overflowing
758758
],
759759
)
760760
@mock.patch("time.time", mock.MagicMock(return_value=1696004797))
@@ -949,7 +949,7 @@ def test_copy_default_options(self) -> None:
949949
# options that have a default are overridden correctly
950950
copied = self.client.copy(max_retries=7)
951951
assert copied.max_retries == 7
952-
assert self.client.max_retries == 3
952+
assert self.client.max_retries == 5
953953

954954
copied2 = copied.copy(max_retries=6)
955955
assert copied2.max_retries == 6
@@ -1613,7 +1613,7 @@ class Model(BaseModel):
16131613
[3, "", 1],
16141614
[2, "", 1 * 2.0],
16151615
[1, "", 1 * 4.0],
1616-
[-1100, "", 15], # test large number potentially overflowing
1616+
[-1100, "", 60], # test large number potentially overflowing
16171617
],
16181618
)
16191619
@mock.patch("time.time", mock.MagicMock(return_value=1696004797))

0 commit comments

Comments
 (0)