Changes
PR #2243 by taljeon and ksylvan: fix(ai): refresh model catalogs after vendor membership changes
- Fixed model catalogs so they refresh automatically after vendor membership changes, ensuring newly registered vendors are reflected immediately.
- Simplified cache invalidation in
AddVendorsby taking themodelsMulock and clearing the cached models, reducing the change from 463 added lines to 25. - Reduced
GetModelsto a concise lock-and-read implementation, removing the retry loop and defensive copies. - Removed the
modelsVersion,modelsLoading, andmodelsDiscoverymachinery, along withvendorsSnapshot(), eliminating unnecessary generation tracking and waiter coalescing. - Reconciled model catalog synchronization with
main, preserving generation-scoped invalidation behavior while integrating the upstream concurrent-model-read regression fix and its test coverage.