[GH-ISSUE #9236] CORS error x-stainless-timeout #52529

Closed
opened 2026-04-28 23:36:49 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @lucasthahn on GitHub (Feb 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9236

What is the issue?

I am making requests to a local instance of Ollama using the OpenAI npm package from browser. This commit in the openai-node package causes it to send the x-stainless-timeout header. Because of this, when using the OpenAI client, I encounter the following issue:

Access to fetch at 'http://127.0.0.1:11434/v1/chat/completions' from origin 'http://localhost:5174' has been blocked by CORS policy: Request header field x-stainless-timeout is not allowed by Access-Control-Allow-Headers in preflight response.

This is quite similar to https://github.com/ollama/ollama/issues/8342.

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.5.11

Originally created by @lucasthahn on GitHub (Feb 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9236 ### What is the issue? I am making requests to a local instance of Ollama using the OpenAI npm package from browser. [This commit](https://github.com/openai/openai-node/pull/1299) in the `openai-node` package causes it to send the `x-stainless-timeout` header. Because of this, when using the OpenAI client, I encounter the following issue: ``` Access to fetch at 'http://127.0.0.1:11434/v1/chat/completions' from origin 'http://localhost:5174' has been blocked by CORS policy: Request header field x-stainless-timeout is not allowed by Access-Control-Allow-Headers in preflight response. ``` This is quite similar to https://github.com/ollama/ollama/issues/8342. ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.5.11
GiteaMirror added the bug label 2026-04-28 23:36:49 -05:00
Author
Owner

@jmorganca commented on GitHub (Feb 20, 2025):

This was fixed be #9237

<!-- gh-comment-id:2672243756 --> @jmorganca commented on GitHub (Feb 20, 2025): This was fixed be #9237
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52529