[PR #14564] server: remove duplicate top_logprobs validation #61421

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14564
Author: @umut-polat
Created: 3/2/2026
Status: 🔄 Open

Base: mainHead: fix/remove-duplicate-logprobs-check


📝 Commits (1)

  • c9a2a30 server: remove duplicate top_logprobs validation

📊 Changes

1 file changed (+0 additions, -10 deletions)

View changed files

📝 server/routes.go (+0 -10)

📄 Description

Both GenerateHandler and ChatHandler validated top_logprobs twice: once early after parsing the request and again after loading the model. The second check is unreachable dead code since the first already returns on invalid values.

Removed the duplicate checks at lines 236 and 2038 (before this change).


🔄 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/14564 **Author:** [@umut-polat](https://github.com/umut-polat) **Created:** 3/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/remove-duplicate-logprobs-check` --- ### 📝 Commits (1) - [`c9a2a30`](https://github.com/ollama/ollama/commit/c9a2a30618e6c22819a7a1500e1c6bd093850b5d) server: remove duplicate top_logprobs validation ### 📊 Changes **1 file changed** (+0 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+0 -10) </details> ### 📄 Description Both GenerateHandler and ChatHandler validated `top_logprobs` twice: once early after parsing the request and again after loading the model. The second check is unreachable dead code since the first already returns on invalid values. Removed the duplicate checks at lines 236 and 2038 (before this change). --- <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:29:08 -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#61421