Context
The worker update_model_type path can call register_builtin_model repeatedly while model launches continue on executor threads.
Current problems
- Built-in engine class lists use unconditional extend calls and grow on every refresh.
- Some live global model tables are cleared and rebuilt during refresh.
- Embedding and rerank derived engine entries can accumulate across repeated installs.
- Readers can observe partially rebuilt state or race with dictionary-size changes.
This behavior predates the startup engine-hook work in #5465; that PR now guarantees its callbacks run only during initial bootstrap and therefore does not address the host registry refresh itself.
Expected behavior
- Repeated registry refreshes are idempotent.
- Built-in class and derived engine entries do not grow across refreshes.
- Live readers observe a consistent registry snapshot.
- Add regression coverage for repeated LLM, embedding, and rerank refreshes.
Context
The worker update_model_type path can call register_builtin_model repeatedly while model launches continue on executor threads.
Current problems
This behavior predates the startup engine-hook work in #5465; that PR now guarantees its callbacks run only during initial bootstrap and therefore does not address the host registry refresh itself.
Expected behavior