[GH-ISSUE #7052] Capability checking does not consider custom templates #30237

Open
opened 2026-04-22 09:45:56 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @kyRobot on GitHub (Oct 1, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7052

What is the issue?

When sending a completion request to a model that supports FIM tasks - e.g Qwen 2.5 Coder 7B base - Ollama rejects the request because the "model does not support insert".

Passing raw with the necessary prompt format to the model does work for completion, so the issue is not with the model, it is with Ollamas acceptance of the non-raw prompt.

I found the issue is that the Modelfile template does not contain {{.Suffix}} since the instruct version of the same model, which does include suffix does work for completions, in raw mode and otherwise.

Passing a custom template in the request to the base mode however does not work. Ollama gives the same "model does not support insert" error.

The server code shows that only the modelfile template is considered for compatability checking.

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.3.12

Originally created by @kyRobot on GitHub (Oct 1, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7052 ### What is the issue? When sending a completion request to a model that supports FIM tasks - e.g Qwen 2.5 Coder 7B base - Ollama rejects the request because the "model does not support insert". Passing `raw` with the necessary prompt format to the model does work for completion, so the issue is not with the model, it is with Ollamas acceptance of the non-raw prompt. I found the issue is that the Modelfile template does not contain `{{.Suffix}}` since the instruct version of the same model, which does include suffix does work for completions, in raw mode and otherwise. Passing a custom template in the request to the base mode however does not work. Ollama gives the same "model does not support insert" error. The server code shows that only the modelfile template is considered for compatability checking. ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.3.12
GiteaMirror added the bug label 2026-04-22 09:45:57 -05:00
Author
Owner

@kyRobot commented on GitHub (Oct 1, 2024):

Opened PR #7026 to resolve this issue. Awaiting review and merge

<!-- gh-comment-id:2384562217 --> @kyRobot commented on GitHub (Oct 1, 2024): Opened PR #7026 to resolve this issue. Awaiting review and merge
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#30237