[GH-ISSUE #12694] Incorrect content type in cloud-hosted models #8422

Closed
opened 2026-04-12 21:05:34 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @pljones on GitHub (Oct 19, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12694

What is the issue?

Hi,

I'm accessing Ollama remotely through API calls. I'm seeing an error in the Open WebUI log and I can reproduce it using curl (see relevant log output).

The API requests Content-Type: application/json but Ollama is responding with a Content-Type: text/plain; charset=utf-8 header in certain circumstances.

I've done only two tests: deepseek-v3.1:671b-cloud (i.e. an Ollama cloud-hosted model) and mistral:7b (i.e. an unrelated locally hosted model).

I've not investigated the source at all to see if I can see where this is happening.

(The error from Open WebUI's perspective appears to cause it to fail to set a useful chat title and it won't create chat prompts.)

Thanks,

-- Peter

Relevant log output

---- REMOTE MODEL ----
$ curl -X POST http://X.X.X.X:11434/api/chat   -H "Content-Type: application/json"   -d '{
    "model": "deepseek-v3.1:671b-cloud",
    "messages": [{"role": "user", "content": "Test message"}],
    "stream": false
  }' -v
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying X.X.X.X:11434...
* Connected to X.X.X.X (X.X.X.X) port 11434
> POST /api/chat HTTP/1.1
> Host: X.X.X.X:11434
> User-Agent: curl/8.5.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 129
>
< HTTP/1.1 200 OK
< Date: Sun, 19 Oct 2025 17:21:02 GMT
< Content-Type: text/plain; charset=utf-8
< Transfer-Encoding: chunked
<
{"model":"deepseek-v3.1:671b-cloud","remote_model":"deepseek-v3.1:671b","remote_host":"https://ollama.com:443","created_at":"2025-10-19T17:21:26.853081314Z","message":{"role":"assistant","content":"Hello! I received your test message. 😊 \n\nHow can I help you today? Whether you have questions, need assistance with something, or just want to chat, I'm here for you!"},"done":true,"done_reason":"stop","total_duration":3739430136,"prompt_eval_count":6,"eval_count":41}


---- LOCAL MODEL ----
$ curl -X POST http://X.X.X.X:11434/api/chat   -H "Content-Type: application/json"   -d '{
    "model": "mistral:7b",
    "messages": [{"role": "user", "content": "Test message"}],
    "stream": false
  }' -v
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying X.X.X.X:11434...
* Connected to X.X.X.X (X.X.X.X) port 11434
> POST /api/chat HTTP/1.1
> Host: X.X.X.X:11434
> User-Agent: curl/8.5.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 115
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Sun, 19 Oct 2025 17:26:54 GMT
< Content-Length: 494
<
* Connection #0 to host X.X.X.X left intact
{"model":"mistral:7b","created_at":"2025-10-19T17:26:54.4666709Z","message":{"role":"assistant","content":" Hello! Your test message has been received. Is there anything specific you would like to discuss or ask about? I'm here to help with your questions and provide information on a wide range of topics."},"done":true,"done_reason":"stop","total_duration":44941127400,"load_duration":17435800,"prompt_eval_count":6,"prompt_eval_duration":107990000,"eval_count":42,"eval_duration":3844336200}

OS

Windows

GPU

No response

CPU

AMD

Ollama version

0.12.6

Originally created by @pljones on GitHub (Oct 19, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12694 ### What is the issue? Hi, I'm accessing Ollama remotely through API calls. I'm seeing an error in the Open WebUI log and I can reproduce it using `curl` (see relevant log output). The API requests `Content-Type: application/json` but Ollama is responding with a `Content-Type: text/plain; charset=utf-8` header in certain circumstances. I've done only two tests: `deepseek-v3.1:671b-cloud` (i.e. an [Ollama cloud](https://ollama.com/blog/cloud-models)-hosted model) and `mistral:7b` (i.e. an unrelated locally hosted model). I've not investigated the source at all to see if I can see where this is happening. (The error from Open WebUI's perspective appears to cause it to fail to set a useful chat title and it won't create chat prompts.) Thanks, -- Peter ### Relevant log output ```shell ---- REMOTE MODEL ---- $ curl -X POST http://X.X.X.X:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "deepseek-v3.1:671b-cloud", "messages": [{"role": "user", "content": "Test message"}], "stream": false }' -v Note: Unnecessary use of -X or --request, POST is already inferred. * Trying X.X.X.X:11434... * Connected to X.X.X.X (X.X.X.X) port 11434 > POST /api/chat HTTP/1.1 > Host: X.X.X.X:11434 > User-Agent: curl/8.5.0 > Accept: */* > Content-Type: application/json > Content-Length: 129 > < HTTP/1.1 200 OK < Date: Sun, 19 Oct 2025 17:21:02 GMT < Content-Type: text/plain; charset=utf-8 < Transfer-Encoding: chunked < {"model":"deepseek-v3.1:671b-cloud","remote_model":"deepseek-v3.1:671b","remote_host":"https://ollama.com:443","created_at":"2025-10-19T17:21:26.853081314Z","message":{"role":"assistant","content":"Hello! I received your test message. 😊 \n\nHow can I help you today? Whether you have questions, need assistance with something, or just want to chat, I'm here for you!"},"done":true,"done_reason":"stop","total_duration":3739430136,"prompt_eval_count":6,"eval_count":41} ---- LOCAL MODEL ---- $ curl -X POST http://X.X.X.X:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "mistral:7b", "messages": [{"role": "user", "content": "Test message"}], "stream": false }' -v Note: Unnecessary use of -X or --request, POST is already inferred. * Trying X.X.X.X:11434... * Connected to X.X.X.X (X.X.X.X) port 11434 > POST /api/chat HTTP/1.1 > Host: X.X.X.X:11434 > User-Agent: curl/8.5.0 > Accept: */* > Content-Type: application/json > Content-Length: 115 > < HTTP/1.1 200 OK < Content-Type: application/json; charset=utf-8 < Date: Sun, 19 Oct 2025 17:26:54 GMT < Content-Length: 494 < * Connection #0 to host X.X.X.X left intact {"model":"mistral:7b","created_at":"2025-10-19T17:26:54.4666709Z","message":{"role":"assistant","content":" Hello! Your test message has been received. Is there anything specific you would like to discuss or ask about? I'm here to help with your questions and provide information on a wide range of topics."},"done":true,"done_reason":"stop","total_duration":44941127400,"load_duration":17435800,"prompt_eval_count":6,"prompt_eval_duration":107990000,"eval_count":42,"eval_duration":3844336200} ``` ### OS Windows ### GPU _No response_ ### CPU AMD ### Ollama version 0.12.6
GiteaMirror added the cloudbug labels 2026-04-12 21:05:34 -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#8422