mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-03 16:41:33 +08:00
Backend half of #2693 P3. - `ModelCatalogService` normalizes `services.llm.fallbacks` on every save: only well-formed `{profile_id, model_id}` entries survive, duplicates collapse, and the list is capped at 4 so a failure cannot multiply the retry budget. - `POST /api/settings/apply/service` no longer drops the chain. The settings UI edits providers and does not carry a `fallbacks` key, and that endpoint replaces the whole service object — so an absent key now means "keep what is stored" instead of "clear it". An explicit key still replaces the chain. - Covered by tests for normalization, save round-trip and the preserve rule. Still to come: the read-only chain display on the LLM settings page, the `provider_switched` copy, and the integrated chat/services failover tests.