[PR #3971] [MERGED] Fix model map staleness behavior or fallback #4478

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3971
Author: @timothycarambat
Created: 6/6/2025
Status: Merged
Merged: 6/6/2025
Merged by: @timothycarambat

Base: masterHead: model-map-staleness


📝 Commits (4)

📊 Changes

2 files changed (+47 additions, -14 deletions)

View changed files

📝 .github/workflows/dev-build.yaml (+1 -1)
📝 server/utils/AiProviders/modelMap/index.js (+46 -13)

📄 Description

Pull Request Type

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

What is in this change?

  • Fixes issue where a stale model map while the container is running returns null - which means previously working model map lookups now fallback to a much smaller window. Resulting in worse LLM behavior.

Since the model map only syncs on container start, we should allow stale maps to be used, but just log that once in the logs so the user knows, since no current async pulling occurs while the container is running.

Additional Information

This issue can occur is the model map in storage goes missing or expires while the container is running, leading to lookup failures suddenly or randomly, depending on the last time the container booted.

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/3971 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 6/6/2025 **Status:** ✅ Merged **Merged:** 6/6/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `model-map-staleness` --- ### 📝 Commits (4) - [`34306e7`](https://github.com/Mintplex-Labs/anything-llm/commit/34306e7b914c0cf947b3f91c334d43d99cc5a6d2) Fix model map staleness behavior or fallback - [`0c9fc40`](https://github.com/Mintplex-Labs/anything-llm/commit/0c9fc403ca0cbb29d87e304ed61e224e78726206) patch url - [`5c2baab`](https://github.com/Mintplex-Labs/anything-llm/commit/5c2baab675f73f6e645bfb1279ea7e3b6eb45b36) fix log - [`14d427d`](https://github.com/Mintplex-Labs/anything-llm/commit/14d427dde2dcc2c21021ed0ad443058be79d70f2) dev build ### 📊 Changes **2 files changed** (+47 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/dev-build.yaml` (+1 -1) 📝 `server/utils/AiProviders/modelMap/index.js` (+46 -13) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [x] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### What is in this change? - Fixes issue where a stale model map while the container is running returns `null` - which means previously working model map lookups now fallback to a much smaller window. Resulting in worse LLM behavior. Since the model map only syncs on container start, we should allow stale maps to be used, but just log that once in the logs so the user knows, since no current async pulling occurs while the container is running. <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information This issue can occur is the model map in storage goes missing or expires while the container is running, leading to lookup failures suddenly or randomly, depending on the last time the container booted. <!-- 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:35:55 -05:00
yindo closed this issue 2026-02-22 18:35:55 -05:00
yindo changed title from [PR #3971] Fix model map staleness behavior or fallback to [PR #3971] [MERGED] Fix model map staleness behavior or fallback 2026-06-05 15:18:46 -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#4478