Add model versioning to storage and cache invalidation#229
Open
kevinjosethomas wants to merge 2 commits intomainfrom
Open
Add model versioning to storage and cache invalidation#229kevinjosethomas wants to merge 2 commits intomainfrom
kevinjosethomas wants to merge 2 commits intomainfrom
Conversation
Instead of deleting the cached model and forcing a ~93MB re-download when the source URL changes, update the stored URL in-place and return the existing cached data. The model binary is identical regardless of which URL served it. https://claude.ai/code/session_01T73Yphu4y2U3c3ctCcHVPf
- Version mismatch → delete cache, force re-download (new model) - URL-only change with same version → keep cache, update stored URL - Existing users without a version field get the cache preserved (the `modelData.version &&` guard handles this gracefully) To force all clients to re-download, bump NEXT_PUBLIC_MAIA_MODEL_VERSION (or the hardcoded default in MaiaEngineContext.tsx). https://claude.ai/code/session_01T73Yphu4y2U3c3ctCcHVPf
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces model versioning to the MAIA engine's storage layer, enabling intelligent cache invalidation based on model versions rather than just URLs. This allows the model to be moved to different hosts without losing the cache, while still invalidating the cache when a new version is released.
Key Changes
versionfield toModelStorageinterface to track model versions alongside URLsstoreModel()method to accept and store amodelVersionparametergetModel()method to accept amodelVersionparameter and implement version-aware cache validation:MaiaOptionsinterface to includemodelVersionconfigurationMaiaclass to track and passmodelVersionto storage operationsNEXT_PUBLIC_MAIA_MODEL_VERSIONwith default value of'1'Implementation Details
https://claude.ai/code/session_01Tv2Uaz64haxYkoJWu2jrPG