[PR #15826] server: preserve generate logprobs with builtin parsers #62016

Open
opened 2026-04-29 16:58:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15826
Author: @dhiltgen
Created: 4/26/2026
Status: 🔄 Open

Base: mainHead: logprobs


📝 Commits (1)

  • 496b024 server: preserve generate logprobs with builtin parsers

📊 Changes

2 files changed (+117 additions, -2 deletions)

View changed files

📝 server/routes.go (+4 -2)
📝 server/routes_generate_test.go (+113 -0)

📄 Description

Generate requests were dropping logprob-only chunks whenever a builtin parser buffered visible content. Chat already handled this case, but generate only forwarded chunks with visible response, thinking, or tool-call output.

Keep generate chunks that carry logprobs even when the builtin parser has not flushed visible content yet, and add a regression test that exercises the behavior with a generic thinking parser.


🔄 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/15826 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 4/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `logprobs` --- ### 📝 Commits (1) - [`496b024`](https://github.com/ollama/ollama/commit/496b024486175e726258836fa9f205c6e6be3cf5) server: preserve generate logprobs with builtin parsers ### 📊 Changes **2 files changed** (+117 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+4 -2) 📝 `server/routes_generate_test.go` (+113 -0) </details> ### 📄 Description Generate requests were dropping logprob-only chunks whenever a builtin parser buffered visible content. Chat already handled this case, but generate only forwarded chunks with visible response, thinking, or tool-call output. Keep generate chunks that carry logprobs even when the builtin parser has not flushed visible content yet, and add a regression test that exercises the behavior with a generic thinking parser. --- <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-29 16:58:32 -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#62016