Skip to content

improvement(openai): migrate to responses api - #3135

Merged
Sg312 merged 13 commits into
stagingfrom
feat/openai-responses
Feb 4, 2026
Merged

improvement(openai): migrate to responses api#3135
Sg312 merged 13 commits into
stagingfrom
feat/openai-responses

Conversation

@Sg312

@Sg312Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrate openai provider to use responses api

Type of Change

  • New feature

Testing

Manual with @waleedlatif1

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)
Cursor Bugbot found 1 potential issue for commit 95bdc33

@vercel

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
docsSkippedSkippedFeb 4, 2026 11:40pm

Request Review

@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

Comment threadapps/sim/providers/responses-utils.ts
Comment threadapps/sim/providers/openai/core.ts
Comment threadapps/sim/app/api/wand/route.ts
Comment threadapps/sim/lib/copilot/chat-title.ts
@simstudioaisimstudioai deleted a comment from greptile-appsBotFeb 4, 2026
@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/providers/openai/utils.ts
Comment threadapps/sim/app/api/wand/route.ts
@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/app/api/wand/route.ts Outdated
Comment threadapps/sim/app/api/wand/route.ts Outdated
Comment threadapps/sim/providers/openai/core.ts
@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/providers/openai/utils.ts Outdated
@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/providers/openai/core.ts Outdated
Comment threadapps/sim/providers/openai/core.ts
@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/providers/openai/core.ts
@Sg312

Sg312 commented Feb 4, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment threadapps/sim/app/api/wand/route.ts
@Sg312
Sg312 merged commit 1933e1a into stagingFeb 4, 2026
11 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/openai-responses branch February 4, 2026 23:57
royceP2 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Mar 3, 2026
* Migrate openai to use responses api
* Consolidate azure
* Fix streaming
* Bug fixes
* Bug fixes
* Fix responseformat
* Refactor
* Fix bugs
* Fix
* Fix azure openai response format with tool calls
* Fixes
* Fixes
* Fix temp
waleedlatif1 added a commit that referenced this pull request Aug 5, 2026
…path
`/v1/responses` posted through the OpenAI SDK until 1933e1a (#3135) moved it
onto raw `fetch`, which silently dropped the SDK's `maxRetries: 2`. The 16 other
providers that construct an SDK client still retry; only openai and azure-openai,
which share this core, retried nothing.
Restores 2 retries (3 attempts) on 408/409/429/5xx using `backoffWithJitter` and
`parseRetryAfter`, preferring OpenAI's `retry-after-ms` over `Retry-After`. The
loop sits in the shared request helper so the streaming paths are covered too — a
refused request yields no body, so no stream bytes were consumed and no response
was created server-side.
Aborts, other 4xx, and the body-read deadline stay non-retryable. `/v1/responses`
ignores `Idempotency-Key`, so a retry after a response already exists would
generate and bill a second one; the body stall is exactly that case.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Sg312