[PR #6910] [MERGED] OpenAI: accept additional headers to fix CORS error #12257

Closed
opened 2026-04-12 23:53:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6910
Author: @oza6ut0ne
Created: 9/22/2024
Status: Merged
Merged: 11/23/2024
Merged by: @jmorganca

Base: mainHead: fix-openai-cors-header


📝 Commits (1)

  • 9f6bc5a OpenAI: accept additional headers for OpenAI compatible endpoints to fix CORS problem.

📊 Changes

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

View changed files

📝 server/routes.go (+1 -1)

📄 Description

Related to #4879 #4388

A few days ago, they introduced additional request header X-Stainless-Retry-Count in OpenAI JavaScript library in v4.63.0 and CORS problem is back again.
https://github.com/openai/openai-node/pull/1087
https://github.com/openai/openai-node/blob/master/CHANGELOG.md#4630-2024-09-20

So we need to add it to Access-Control-Allow-Headers.


🔄 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/ollama/ollama/pull/6910 **Author:** [@oza6ut0ne](https://github.com/oza6ut0ne) **Created:** 9/22/2024 **Status:** ✅ Merged **Merged:** 11/23/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `fix-openai-cors-header` --- ### 📝 Commits (1) - [`9f6bc5a`](https://github.com/ollama/ollama/commit/9f6bc5a6c3fe39b40374b450d9bcf2833507439b) OpenAI: accept additional headers for OpenAI compatible endpoints to fix CORS problem. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+1 -1) </details> ### 📄 Description Related to #4879 #4388 A few days ago, they introduced additional request header `X-Stainless-Retry-Count` in OpenAI JavaScript library in v4.63.0 and CORS problem is back again. https://github.com/openai/openai-node/pull/1087 https://github.com/openai/openai-node/blob/master/CHANGELOG.md#4630-2024-09-20 So we need to add it to `Access-Control-Allow-Headers`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:53:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#12257