[PR #12714] [MERGED] runner: always truncate embeddings requests #13923

Closed
opened 2026-04-13 00:40:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12714
Author: @jmorganca
Created: 10/20/2025
Status: Merged
Merged: 10/20/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/truncate-fix


📝 Commits (1)

  • 2ac3f9a runner: always truncate embeddings requests

📊 Changes

3 files changed (+29 additions, -2 deletions)

View changed files

📝 integration/embed_test.go (+13 -0)
📝 runner/llamarunner/runner.go (+8 -1)
📝 runner/ollamarunner/runner.go (+8 -1)

📄 Description

Fixes https://github.com/ollama/ollama/issues/12710

Truncation currently happens in two places: in routes.go in the server package and also in the runner packages. However, the truncation logic isn't completely aligned, causing an error when truncation does occur. This change defaults the runner to always truncate (as it should have in https://github.com/ollama/ollama/pull/12582) until we remove truncation from the server package in order to only rely on truncation in the runner.


🔄 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/12714 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 10/20/2025 **Status:** ✅ Merged **Merged:** 10/20/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/truncate-fix` --- ### 📝 Commits (1) - [`2ac3f9a`](https://github.com/ollama/ollama/commit/2ac3f9a16487336dc52b3c912e672a2c23eecec2) runner: always truncate embeddings requests ### 📊 Changes **3 files changed** (+29 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `integration/embed_test.go` (+13 -0) 📝 `runner/llamarunner/runner.go` (+8 -1) 📝 `runner/ollamarunner/runner.go` (+8 -1) </details> ### 📄 Description Fixes https://github.com/ollama/ollama/issues/12710 Truncation currently happens in two places: in `routes.go` in the `server` package and also in the `runner` packages. However, the truncation logic isn't completely aligned, causing an error when truncation does occur. This change defaults the runner to always truncate (as it should have in https://github.com/ollama/ollama/pull/12582) until we remove truncation from the `server` package in order to only rely on truncation in the runner. --- <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:40:22 -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#13923