[PR #4909] [MERGED] Refactor Ollama context window setting #4820

Closed
opened 2026-02-22 18:36:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4909
Author: @timothycarambat
Created: 1/27/2026
Status: Merged
Merged: 1/27/2026
Merged by: @timothycarambat

Base: masterHead: chore/refactor-ollama-performance


📝 Commits (1)

  • 095be60 Refactor Ollama context window setting

📊 Changes

7 files changed (+205 additions, -169 deletions)

View changed files

📝 frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx (+141 -95)
📝 server/models/systemSettings.js (+0 -1)
server/utils/AiProviders/ollama/README.md (+0 -40)
📝 server/utils/AiProviders/ollama/index.js (+18 -15)
📝 server/utils/agents/aibitat/providers/ai-provider.js (+1 -7)
📝 server/utils/agents/aibitat/providers/ollama.js (+45 -7)
📝 server/utils/helpers/updateENV.js (+0 -4)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #xxx

What is in this change?

  • Refactors Ollama to remove Performance Mode property.
  • Updates UI for cleaner hint text and tooltips
  • Applies context window carryover to chat/agents
  • Implied context window size finder with reasonable default (16k)
  • Allows the user to set the maximum value of the model as well as handle invalid values.
  • Adds visibility logging for clarity.
  • Apply custom timeout to agent calls.

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 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/Mintplex-Labs/anything-llm/pull/4909 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 1/27/2026 **Status:** ✅ Merged **Merged:** 1/27/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `chore/refactor-ollama-performance` --- ### 📝 Commits (1) - [`095be60`](https://github.com/Mintplex-Labs/anything-llm/commit/095be60346520f7ebd76d44e50497d16694731f5) Refactor Ollama context window setting ### 📊 Changes **7 files changed** (+205 additions, -169 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/LLMSelection/OllamaLLMOptions/index.jsx` (+141 -95) 📝 `server/models/systemSettings.js` (+0 -1) ➖ `server/utils/AiProviders/ollama/README.md` (+0 -40) 📝 `server/utils/AiProviders/ollama/index.js` (+18 -15) 📝 `server/utils/agents/aibitat/providers/ai-provider.js` (+1 -7) 📝 `server/utils/agents/aibitat/providers/ollama.js` (+45 -7) 📝 `server/utils/helpers/updateENV.js` (+0 -4) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #xxx ### What is in this change? - Refactors Ollama to remove `Performance Mode` property. - Updates UI for cleaner hint text and tooltips - Applies context window carryover to chat/agents - Implied context window size finder with reasonable default (16k) - Allows the user to set the maximum value of the model as well as handle invalid values. - Adds visibility logging for clarity. - Apply custom timeout to agent calls. <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated - [ ] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:36 -05:00
yindo closed this issue 2026-02-22 18:36:36 -05:00
yindo changed title from [PR #4909] Refactor Ollama context window setting to [PR #4909] [MERGED] Refactor Ollama context window setting 2026-06-05 15:20:32 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4820