Conversation
|
🧪 Testing To try out this version of the SDK: Expires at: Sat, 11 Apr 2026 08:17:51 GMT |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) { | ||
| // If the API asks us to wait a certain amount of time, just do what it | ||
| // says, but otherwise calculate a default | ||
| if (timeoutMillis === undefined) { |
There was a problem hiding this comment.
Malformed retry-after header bypasses backoff due to NaN
Medium Severity
When the retry-after header contains a string that is neither a valid number nor a valid date (e.g., a malformed value), Date.parse() returns NaN, making timeoutMillis equal to NaN. The new guard timeoutMillis === undefined evaluates to false for NaN, so the default backoff is never applied and sleep(NaN) resolves immediately (since setTimeout treats NaN as 0). The old guard caught this because NaN is falsy. This could cause aggressive retry storms against a server sending malformed headers.
Additional Locations (1)
e615bb8 to
2ded8ea
Compare
3840cc5 to
f34a21c
Compare
f34a21c to
a85abe5
Compare
a85abe5 to
9663dfe
Compare


Automated Release PR
0.57.1 (2026-03-12)
Full Changelog: v0.57.0...v0.57.1
Bug Fixes
Chores
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions
Note
Medium Risk
Modifies core request URL construction and retry backoff behavior, which can affect all API calls if query merging or retry timing changes are incorrect. Remaining changes are largely CI/test/package maintenance and dependency pinning.
Overview
Bumps the SDK to
0.57.1and updates release metadata (CHANGELOG.md, manifest, OpenAPI stats).Fixes the client’s URL building to preserve query parameters already present in the request path by merging
url.searchParamswithdefaultQueryand per-request query params insrc/client.ts.CI/test reliability updates: artifact upload in
ci.ymlnow skipsstl/*branches,scripts/mockpre-installs Prism and adds a 30s startup timeout with better logging, and file upload tests use simpler placeholder content. Also pinsminimatchviaoverrides/resolutionsand updatesyarn.lockaccordingly.Written by Cursor Bugbot for commit 9663dfe. This will update automatically on new commits. Configure here.