René's URL Explorer Experiment


Title: fix(providers): bound the OpenAI response body read, restore retries, and fail on reported generation failures by waleedlatif1 · Pull Request #6281 · simstudioai/sim · GitHub

Open Graph Title: fix(providers): bound the OpenAI response body read, restore retries, and fail on reported generation failures by waleedlatif1 · Pull Request #6281 · simstudioai/sim

X Title: fix(providers): bound the OpenAI response body read, restore retries, and fail on reported generation failures by waleedlatif1 · Pull Request #6281 · simstudioai/sim

Description: Summary Bound the /v1/responses body read (60s) so a stalled response fails fast instead of hanging ~4.5min on the runtime's own socket wall. Time-to-headers stays unbounded — the endpoint withholds its 200 until generation finishes, so all think time is time-to-headers (measured: 14545ms to headers, 1ms of body). Annotate opaque transport failures with the phase they died in (awaiting-response-headers vs reading-response-body) plus status, ttfb, content-length and x-request-id. The annotation rides the error message into the trace span, which persists even when a task stops shipping logs. Restore status-based retries (408/409/429/5xx, 2 retries, backoff + Retry-After). This path lost them in #3135 when it moved off the OpenAI SDK onto raw fetch; every other provider still retries via its SDK client. Fail the block when a 200 reports a failed generation. status: "failed" / populated error previously returned success with empty content and billed tokens, and a truncated function_call was executed. Now matches the streaming path. Deliberately no retry on a stalled body: /v1/responses ignores Idempotency-Key (verified live — same key and body returns two distinct response ids), so a retry would generate and bill a second response. The OpenAI SDK and the AI SDK both decline to retry this class. Type of Change Bug fix Testing Tested manually against the live API plus 40 new unit tests. Replayed real captured /v1/responses payloads (completed, incomplete/max_output_tokens, tool-call) through the provider — none rejected by the new status guard. Verified live that Idempotency-Key is ignored on this endpoint, and that headers arrive only when generation completes. Verified the body deadline propagates into an already-returned body under the real runtime. Every new test verified able to fail by breaking the implementation first. Full suite green; one unrelated pre-existing failure (executor/handlers/pi/cloud-review-tools.test.ts) reproduces identically on staging. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Bound the /v1/responses body read (60s) so a stalled response fails fast instead of hanging ~4.5min on the runtime's own socket wall. Time-to-headers stays unbounded — the endpoint wit...

X Description: Summary Bound the /v1/responses body read (60s) so a stalled response fails fast instead of hanging ~4.5min on the runtime's own socket wall. Time-to-headers stays unbounded — the endpoint...

Opengraph URL: https://github.com/simstudioai/sim/pull/6281

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2a7fe0f3-bf05-80a2-4851-382f96e0cb98
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD326:4466C:15FE47:1EA984:6AFB4DFC
html-safe-noncef262f4b813b1ce0882b9a6cb8a0c9bfc010638577e3bd381e4543b1798ee2d5a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzI2OjQ0NjZDOjE1RkU0NzoxRUE5ODQ6NkFGQjRERkMiLCJ2aXNpdG9yX2lkIjoiNjE4Nzk4ODg2OTUzOTY0Njk3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca3591c2e0761d23f5725911f3ba74f5181424c532158b6f749fa6fbe8f32b582
hovercard-subject-tagpull_request:4209020519
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6281/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Bound the /v1/responses body read (60s) so a stalled response fails fast instead of hanging ~4.5min on the runtime's own socket wall. Time-to-headers stays unbounded — the endpoint wit...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release26504db649b58525278f77a52b80ba5f10d5f4de
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6281/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6281%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6281%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6281/files
Reloadhttps://github.com/simstudioai/sim/pull/6281/files
Reloadhttps://github.com/simstudioai/sim/pull/6281/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/openai-provider-transport-diagnosticshttps://github.com/simstudioai/sim/tree/fix/openai-provider-transport-diagnostics
Conversation 13 https://github.com/simstudioai/sim/pull/6281
Commits 5 https://github.com/simstudioai/sim/pull/6281/commits
Checks 30 https://github.com/simstudioai/sim/pull/6281/checks
Files changed https://github.com/simstudioai/sim/pull/6281/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6281/files
fix(providers): bound the OpenAI response body read, restore retries, and fail on reported generation failures https://github.com/simstudioai/sim/pull/6281/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/6281/files
90fc3d3 fix(providers): bound the OpenAI response body read and name the fail… waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6281/commits/90fc3d3ab63994413e0a6158425a23687e4c7676
10adda7 fix(providers): restore status-based retries to the OpenAI Responses … waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6281/commits/10adda7ddca8b779e6e250e3823fb1c89762d74d
7e578a3 fix(providers): fail the block when a 200 from /v1/responses reports … waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6281/commits/7e578a3ce5946fb9f954d2734cf714589d4749dd
40ec8ee chore(providers): restore fake timers on a single exit path to satisf… waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6281/commits/40ec8ee9587aaf95c7d889bab46aeeae2e4581ad
f403ceb fix(providers): bound stalled error bodies and make retry backoff can… waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6281/commits/f403ceb602c58f164105100b6cb10c1cdc255e63
Clear filters https://github.com/simstudioai/sim/pull/6281/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6281/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6281/files
agent-handler.test.ts https://github.com/simstudioai/sim/pull/6281/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
agent-handler.ts https://github.com/simstudioai/sim/pull/6281/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
core.response-status.test.ts https://github.com/simstudioai/sim/pull/6281/files#diff-4211177e4f6f3a323e32ea90cc00f6ba02ac698241d790d7be54f14505284f8c
core.retry.test.ts https://github.com/simstudioai/sim/pull/6281/files#diff-a92a88f14d4cb36f6e02b7ab79344b54a5ad8e0d2359d641c147fccf4cfa66d5
core.transport-phase.test.ts https://github.com/simstudioai/sim/pull/6281/files#diff-e192cc660882535d4b8c8a6ab052a876b528c653db555f1d0f2eed40e07735c2
core.ts https://github.com/simstudioai/sim/pull/6281/files#diff-08a8d94bfd29c80408e6c52311d64c5f906c60d0e7a2144ec632f75d271e3492
types.ts https://github.com/simstudioai/sim/pull/6281/files#diff-173d679b23ede4297b7b374f41798fcf014b853f44c38f29fbbcbb8ee5ba39f5
apps/sim/executor/handlers/agent/agent-handler.test.tshttps://github.com/simstudioai/sim/pull/6281/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
View file https://github.com/simstudioai/sim/blob/f403ceb602c58f164105100b6cb10c1cdc255e63/apps/sim/executor/handlers/agent/agent-handler.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6281/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6281/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
https://github.com/simstudioai/sim/pull/6281/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
apps/sim/executor/handlers/agent/agent-handler.tshttps://github.com/simstudioai/sim/pull/6281/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
View file https://github.com/simstudioai/sim/blob/f403ceb602c58f164105100b6cb10c1cdc255e63/apps/sim/executor/handlers/agent/agent-handler.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6281/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6281/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
https://github.com/simstudioai/sim/pull/6281/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
https://github.com/simstudioai/sim/pull/6281/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
https://github.com/simstudioai/sim/pull/6281/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
apps/sim/providers/openai/core.response-status.test.tshttps://github.com/simstudioai/sim/pull/6281/files#diff-4211177e4f6f3a323e32ea90cc00f6ba02ac698241d790d7be54f14505284f8c
View file https://github.com/simstudioai/sim/blob/f403ceb602c58f164105100b6cb10c1cdc255e63/apps/sim/providers/openai/core.response-status.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6281/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/6281/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6281/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.