[PR #1757] [MERGED] Add OpenAI compatible API support #3769

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/1757
Author: @timothycarambat
Created: 6/24/2024
Status: Merged
Merged: 6/24/2024
Merged by: @timothycarambat

Base: masterHead: openai-compat-api-endpoints


📝 Commits (1)

  • d9ab4bd Add OpenAI compatible API support

📊 Changes

7 files changed (+1104 additions, -104 deletions)

View changed files

📝 server/endpoints/api/index.js (+2 -0)
server/endpoints/api/openai/compatibility-test-script.cjs (+64 -0)
server/endpoints/api/openai/index.js (+331 -0)
📝 server/swagger/init.js (+1 -0)
📝 server/swagger/openapi.json (+229 -0)
server/utils/chats/openaiCompatible.js (+477 -0)
📝 server/utils/helpers/chat/responses.js (+0 -104)

📄 Description

Pull Request Type

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

Relevant Issues

resolves #xxx

What is in this change?

Adds support for some OpenAI endpoints for ease of use in existing codebases and SDKs

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/1757 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 6/24/2024 **Status:** ✅ Merged **Merged:** 6/24/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `openai-compat-api-endpoints` --- ### 📝 Commits (1) - [`d9ab4bd`](https://github.com/Mintplex-Labs/anything-llm/commit/d9ab4bdcf26d067930756105a1aafe644bd54e60) Add OpenAI compatible API support ### 📊 Changes **7 files changed** (+1104 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `server/endpoints/api/index.js` (+2 -0) ➕ `server/endpoints/api/openai/compatibility-test-script.cjs` (+64 -0) ➕ `server/endpoints/api/openai/index.js` (+331 -0) 📝 `server/swagger/init.js` (+1 -0) 📝 `server/swagger/openapi.json` (+229 -0) ➕ `server/utils/chats/openaiCompatible.js` (+477 -0) 📝 `server/utils/helpers/chat/responses.js` (+0 -104) </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 #xxx ### What is in this change? Adds support for some OpenAI endpoints for ease of use in existing codebases and SDKs - GET `/models` https://platform.openai.com/docs/api-reference/models/list - POST `/embeddings` https://platform.openai.com/docs/api-reference/embeddings/create - POST `/chat/completions` with `stream, messages, and temperature` param support support https://platform.openai.com/docs/api-reference/chat/create <!-- Describe the changes in this PR that are impactful to the repo. --> ### 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:34:27 -05:00
yindo closed this issue 2026-02-22 18:34:27 -05:00
yindo changed title from [PR #1757] Add OpenAI compatible API support to [PR #1757] [MERGED] Add OpenAI compatible API support 2026-06-05 15:15:07 -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#3769