Repository navigation
fix(api): migrate legacy model types during upgrade - #41326
Merged
Merged
Conversation
Add a PostgreSQL and MySQL Alembic migration that canonicalizes legacy model types, resolves data collisions, and preserves credential references. Rotate provider cache namespaces so migrated records cannot be shadowed by stale Redis values.
Contributor
Pyrefly Type Coverage
|
laipz8200
marked this pull request as ready for review
August 26, 2026 21:25
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #41326 +/- ##
==========================================
- Coverage 86.74% 86.74% -0.01%
==========================================
Files 5288 5288
Lines 304493 304493
Branches 60853 60853
==========================================
- Hits 264132 264129 -3
- Misses 35081 35084 +3
Partials 5280 5280
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
laipz8200
requested review from
MRZHUH,
QuantumGhost and
snakevash
as code owners
August 26, 2026 21:25
laipz8200
enabled auto-merge
August 26, 2026 21:32
crazywoola
approved these changes
Aug 27, 2026
MRZHUH
approved these changes
Aug 27, 2026
This was referenced Aug 28, 2026
Closed
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
Fixes #41294
Automatically migrate pre-1.15 model type values during the normal
flask db upgradepath instead of requiring a separate manual data-migration command.text-generation,embeddings, andrerankingacross the five affected provider tablesThis complements #41303 by repairing the stored data during deployment rather than only accepting legacy values at read time.
Screenshots
Not applicable (backend data migration).