[PR #4404] [MERGED] Migrate OpenAI LLM provider to use Responses API #4613

Closed
opened 2026-02-22 18:36:11 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4404
Author: @shatfield4
Created: 9/18/2025
Status: Merged
Merged: 9/19/2025
Merged by: @timothycarambat

Base: masterHead: 4403-feat-migrate-openai-llm-provider-to-responses-api


📝 Commits (4)

  • 647f4e6 migrate openai llm provider to use responses api
  • fff49e5 Merge branch 'master' into 4403-feat-migrate-openai-llm-provider-to-responses-api
  • cd1f788 add back image support
  • 433252c dont recalc tokens from OpenAI since we get metrics back

📊 Changes

1 file changed (+111 additions, -42 deletions)

View changed files

📝 server/utils/AiProviders/openAi/index.js (+111 -42)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #4403
resolves #4304
closes #4307

What is in this change?

  • Removes using chat.completions from the OpenAI package and uses responses to chat via the OpenAI responses API
  • Simplifies OpenAI LLM provider implementation by removing unnecessary O series model checks
  • Adds support for gpt-5 models

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4404 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 9/18/2025 **Status:** ✅ Merged **Merged:** 9/19/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `4403-feat-migrate-openai-llm-provider-to-responses-api` --- ### 📝 Commits (4) - [`647f4e6`](https://github.com/Mintplex-Labs/anything-llm/commit/647f4e60bd2f04f140fb4c17d56f6a295cfa1fa2) migrate openai llm provider to use responses api - [`fff49e5`](https://github.com/Mintplex-Labs/anything-llm/commit/fff49e5d3e68be326d44ee134629d91731d2f75f) Merge branch 'master' into 4403-feat-migrate-openai-llm-provider-to-responses-api - [`cd1f788`](https://github.com/Mintplex-Labs/anything-llm/commit/cd1f788d8b1a757a404ba867a5c49c18c254ed83) add back image support - [`433252c`](https://github.com/Mintplex-Labs/anything-llm/commit/433252c4183ac6cd562da03dd13e22ecc675860b) dont recalc tokens from OpenAI since we get metrics back ### 📊 Changes **1 file changed** (+111 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/AiProviders/openAi/index.js` (+111 -42) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #4403 resolves #4304 closes #4307 ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> - Removes using `chat.completions` from the OpenAI package and uses `responses` to chat via the OpenAI responses API - Simplifies OpenAI LLM provider implementation by removing unnecessary O series model checks - Adds support for `gpt-5` models ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:11 -05:00
yindo closed this issue 2026-02-22 18:36:11 -05:00
yindo changed title from [PR #4404] Migrate OpenAI LLM provider to use Responses API to [PR #4404] [MERGED] Migrate OpenAI LLM provider to use Responses API 2026-06-05 15:19:27 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4613