[PR #12581] [MERGED] routes: fix built-in renderers for api/generate #13879

Closed
opened 2026-04-13 00:39:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12581
Author: @drifkin
Created: 10/11/2025
Status: Merged
Merged: 10/11/2025
Merged by: @drifkin

Base: mainHead: drifkin/renderer-api-generate


📝 Commits (1)

  • 6db8da9 routes: fix built-in renderers for api/generate

📊 Changes

3 files changed (+341 additions, -10 deletions)

View changed files

📝 server/routes.go (+27 -9)
📝 server/routes_debug_test.go (+1 -1)
server/routes_generate_renderer_test.go (+313 -0)

📄 Description

Made it so when api/generate builds up a message array and generates the prompt it now goes through the same function as api/chat for consistency. This is where we hook the optional built-in renderers to bypass templates, which was missing for api/generate before this change.

Closes: #12578


🔄 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/12581 **Author:** [@drifkin](https://github.com/drifkin) **Created:** 10/11/2025 **Status:** ✅ Merged **Merged:** 10/11/2025 **Merged by:** [@drifkin](https://github.com/drifkin) **Base:** `main` ← **Head:** `drifkin/renderer-api-generate` --- ### 📝 Commits (1) - [`6db8da9`](https://github.com/ollama/ollama/commit/6db8da99588de07a49fe788df6b53a7637b21344) routes: fix built-in renderers for `api/generate` ### 📊 Changes **3 files changed** (+341 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+27 -9) 📝 `server/routes_debug_test.go` (+1 -1) ➕ `server/routes_generate_renderer_test.go` (+313 -0) </details> ### 📄 Description Made it so when api/generate builds up a message array and generates the prompt it now goes through the same function as `api/chat` for consistency. This is where we hook the optional built-in renderers to bypass templates, which was missing for `api/generate` before this change. Closes: #12578 --- <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-13 00:39:14 -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#13879