[GH-ISSUE #12370] Cloud model 400 Bad Request: raw mode does not support template, system, or context #70277

Closed
opened 2026-05-04 20:55:37 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @ghost on GitHub (Sep 22, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12370

Originally assigned to: @drifkin on GitHub.

What is the issue?

The cloud model of Ollama, when set with raw: true, returns a 400 Bad Request error: "raw mode does not support template, system, or context." Additionally, setting template: "{{ .Prompt }}" seems ineffective, as it still cannot seamlessly complete text and gets interrupted. The same parameters work fine when called on a local model.

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @ghost on GitHub (Sep 22, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12370 Originally assigned to: @drifkin on GitHub. ### What is the issue? The cloud model of Ollama, when set with `raw: true`, returns a 400 Bad Request error: "raw mode does not support template, system, or context." Additionally, setting `template: "{{ .Prompt }}"` seems ineffective, as it still cannot seamlessly complete text and gets interrupted. The same parameters work fine when called on a local model. ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the cloudbug labels 2026-05-04 20:55:37 -05:00
Author
Owner

@rick-github commented on GitHub (Sep 22, 2025):

Can you provide examples of the prompts you are sending to the cloud model and the local model?

<!-- gh-comment-id:3320755189 --> @rick-github commented on GitHub (Sep 22, 2025): Can you provide examples of the prompts you are sending to the cloud model and the local model?
Author
Owner

@rick-github commented on GitHub (Sep 22, 2025):

This looks like a problem with the proxy.

$ prompt='<|start|>system<|message|>Talk like a pirate\n# Valid channels: analysis, commentary, final. Channel must be included for every message.<|end|><|start|>user<|message|>hello<|end|><|start|>assistant'
$ curl -s https://ollama.com/api/generate -H "Authorization: $OLLAMA_API_KEY" -d '{"model":"gpt-oss:20b","prompt":"'"$prompt"'","raw":true,"stream":false}' | jq 
{
  "model": "gpt-oss:20b",
  "created_at": "2025-09-22T18:49:33.835263946Z",
  "response": "<|channel|>analysis<|message|>User says \"hello\". They want to talk like a pirate.",
  "done": true,
  "total_duration": 224292188,
  "prompt_eval_count": 34,
  "eval_count": 16
}
$ curl -s localhost:11434/api/generate -H "Authorization: $OLLAMA_API_KEY" -d '{"model":"gpt-oss:20b-cloud","prompt":"'"$prompt"'","raw":true,"stream":false}' | jq
{
  "error": "400 Bad Request: raw mode does not support template, system, or context"
}
<!-- gh-comment-id:3320822356 --> @rick-github commented on GitHub (Sep 22, 2025): This looks like a problem with the proxy. ```console $ prompt='<|start|>system<|message|>Talk like a pirate\n# Valid channels: analysis, commentary, final. Channel must be included for every message.<|end|><|start|>user<|message|>hello<|end|><|start|>assistant' $ curl -s https://ollama.com/api/generate -H "Authorization: $OLLAMA_API_KEY" -d '{"model":"gpt-oss:20b","prompt":"'"$prompt"'","raw":true,"stream":false}' | jq { "model": "gpt-oss:20b", "created_at": "2025-09-22T18:49:33.835263946Z", "response": "<|channel|>analysis<|message|>User says \"hello\". They want to talk like a pirate.", "done": true, "total_duration": 224292188, "prompt_eval_count": 34, "eval_count": 16 } $ curl -s localhost:11434/api/generate -H "Authorization: $OLLAMA_API_KEY" -d '{"model":"gpt-oss:20b-cloud","prompt":"'"$prompt"'","raw":true,"stream":false}' | jq { "error": "400 Bad Request: raw mode does not support template, system, or context" } ```
Author
Owner

@ghost commented on GitHub (Sep 22, 2025):

Can you provide examples of the prompts you are sending to the cloud model and the local model?

I am indeed using the local Ollama to call the cloud model, fetch('http://localhost:11434/api/generate'

<!-- gh-comment-id:3320874599 --> @ghost commented on GitHub (Sep 22, 2025): > Can you provide examples of the prompts you are sending to the cloud model and the local model? I am indeed using the local Ollama to call the cloud model, `fetch('http://localhost:11434/api/generate'`
Author
Owner

@rylaion commented on GitHub (Nov 19, 2025):

How you guys fix the

Error HTTP 400 Bad Request from http://127.0.0.1:11434/api/generate {"StatusCode":400,"Status":"400 Bad Request","error":"raw mode does not support template, system, or context"}?

Im using the qwen3-coder:480b-cloud for autocomplete to my Continue.dev extension but its not working I already declare the raw: false. Any work around?

<!-- gh-comment-id:3550127939 --> @rylaion commented on GitHub (Nov 19, 2025): How you guys fix the > Error HTTP 400 Bad Request from http://127.0.0.1:11434/api/generate {"StatusCode":400,"Status":"400 Bad Request","error":"raw mode does not support template, system, or context"}? Im using the qwen3-coder:480b-cloud for autocomplete to my Continue.dev extension but its not working I already declare the raw: false. Any work around?
Author
Owner

@ACheshirov commented on GitHub (Jan 20, 2026):

Will this ever be fixed?

<!-- gh-comment-id:3774335595 --> @ACheshirov commented on GitHub (Jan 20, 2026): Will this ever be fixed?
Author
Owner

@drifkin commented on GitHub (Jan 20, 2026):

Will this ever be fixed?

apologies, this issue shouldn't have been closed, @rick-github's repro is still valid. I've opened a new, more specific issue at #13801, I'll try to get a fix in soon

<!-- gh-comment-id:3774625467 --> @drifkin commented on GitHub (Jan 20, 2026): > Will this ever be fixed? apologies, this issue shouldn't have been closed, @rick-github's repro is still valid. I've opened a new, more specific issue at #13801, I'll try to get a fix in soon
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#70277