fix: correct deprecated model settings behavior#14047
Conversation
|
Replaces #14046 with the same commit on an upstream-owned branch. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughModel enablement now reuses the model catalog, rejects deprecated or unsupported models in the backend, disables their frontend toggles, and clarifies language-model-only age-based deprecation behavior. ChangesModel enablement safeguards
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ModelSelection
participant update_enabled_models
participant ModelCatalog
Client->>ModelSelection: View model metadata
ModelSelection->>ModelSelection: Disable deprecated or unsupported toggles
Client->>update_enabled_models: Submit enabled model IDs
update_enabled_models->>ModelCatalog: Fetch model catalog
ModelCatalog-->>update_enabled_models: Return availability metadata
update_enabled_models-->>Client: Reject unavailable model or update settings
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 9✅ Passed checks (9 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
|
Release-1.11.0 companion: #14048 |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (28.57%) is below the target coverage (40.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release-1.10.3 #14047 +/- ##
=================================================
Coverage ? 58.58%
=================================================
Files ? 2307
Lines ? 220276
Branches ? 32985
=================================================
Hits ? 129053
Misses ? 89737
Partials ? 1486
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
* fix(kb): enforce per-user path containment * fix(security): protect Docling Serve outbound requests (#14033) * fix(security): protect Docling Serve requests * fix(docling): support Self on Python 3.10 * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * fix(auth): verify current password on password changes (#14034) * fix(security): harden MCP stdio configuration (#14036) * fix(security): restrict MCP stdio package sources * fix(security): block MCP Docker host access * fix(security): validate embedded MCP stdio configs * fix: require executable-only MCP commands * test: use allowed MCP commands in timeout tests * fix(security): harden component code module access (#14032) * fix(security): harden component code module access * fix(security): block native FFI imports in generated code * fix: track module assignment aliases in code scanner * fix(security): address alias review findings * fix: correct deprecated model settings behavior (#14047) * fix: prevent deprecated model enablement * test: use supported model in credential cleanup * fix(voice): enforce flow authorization on websocket (#14043) * fix(security): block native FFI imports in generated code (#14040) * fix(security): block native FFI imports in generated code * fix: track module assignment aliases in code scanner * chore: resolve code security conflicts * fix(security): confine AssemblyAI audio file access (#14037) * fix(security): confine AssemblyAI audio file access * [autofix.ci] apply automated fixes * test: stub optional AssemblyAI dependency * fix(security): harden AssemblyAI file submission --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: track assignment aliases in component code scanner (#14041) fix: bind loop and comprehension aliases --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Summary
Root cause
The settings UI allowed deprecated models to enter its optimistic toggle queue, and the update endpoint accepted and persisted that state. A later
GET /enabled_modelsalways returned deprecated models as disabled, so the next refetch appeared to undo the user's toggle.Separately, the models.dev fallback marks catalog entries older than 900 days as deprecated. That heuristic also applied to embeddings. The OpenAI
text-embedding-3-*models reached that threshold in July 2026 even though age alone is not a reliable deprecation signal for embedding models.Explicit catalog deprecations remain unchanged, including provider-specific embedding models that are known to be unavailable.
Validation
uv run pytest tests/unit/base/models/test_models_dev_catalog.py -q(23 passed)uv run pytest src/backend/tests/unit/api/v1/test_models_enabled_providers.py -k cannot_enable_deprecated_model -q(1 passed)npm test -- src/modals/modelProviderModal/__tests__/ModelSelection.test.tsx --runInBand(26 passed)Summary by CodeRabbit
New Features
Bug Fixes
Tests