[PR #11129] [CLOSED] runner: add flag to disable context shifting #12186

Closed
opened 2025-11-12 16:30:37 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11129
Author: @ParthSareen
Created: 6/19/2025
Status: Closed

Base: mainHead: parth/opt-in-error-context-window


📝 Commits (1)

  • beaa0e8 api: add flag to disable context shifting

📊 Changes

9 files changed (+576 additions, -44 deletions)

View changed files

📝 api/types.go (+2 -0)
📝 llm/server.go (+4 -0)
📝 runner/llamarunner/runner.go (+38 -15)
runner/llamarunner/runner_test.go (+152 -0)
📝 runner/ollamarunner/runner.go (+37 -14)
runner/ollamarunner/runner_test.go (+167 -0)
📝 server/prompt.go (+3 -0)
📝 server/prompt_test.go (+20 -15)
📝 server/routes_test.go (+153 -0)

📄 Description

Add an API flag to disable context shifting:
shift_context -> defaults to true

There are a few places where the done can happen early


🔄 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/11129 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 6/19/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `parth/opt-in-error-context-window` --- ### 📝 Commits (1) - [`beaa0e8`](https://github.com/ollama/ollama/commit/beaa0e82f34115b2207de02c5252b5370b480822) api: add flag to disable context shifting ### 📊 Changes **9 files changed** (+576 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+2 -0) 📝 `llm/server.go` (+4 -0) 📝 `runner/llamarunner/runner.go` (+38 -15) ➕ `runner/llamarunner/runner_test.go` (+152 -0) 📝 `runner/ollamarunner/runner.go` (+37 -14) ➕ `runner/ollamarunner/runner_test.go` (+167 -0) 📝 `server/prompt.go` (+3 -0) 📝 `server/prompt_test.go` (+20 -15) 📝 `server/routes_test.go` (+153 -0) </details> ### 📄 Description Add an API flag to disable context shifting: `shift_context` -> defaults to true There are a few places where the done can happen early --- <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 2025-11-12 16:30:37 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#12186