#35577 [Bug]: New DB deployments are dropped during router upsert when no existing deployment is found
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate
### What happened?
Database-backed deployments are dropped from a proxy pod's in-memory router when they are loaded for the first time through `Router.upsert_deployment()`
This affects startup and periodic database reloads. Static configuration deployments remain available, while database deployments disappear from model-list endpoints and cannot receive traffic. Model creation can persist the row successfully and then return an internal error because the new deployment is not live in the pod after reload
The regression was introduced by commit [300e710bc34](https://github.com/BerriAI/litellm/commit/300e710bc34). `upsert_deployment()` calls `get_deployment()`, which returns `None` for a deployment that is new to the current router. It then unconditionally passes that value to `_unregister_pre_routing_strategy_for_deployment()`, where `deployment.litellm_params` is dereferenced
With `ignore_invalid_deployments=True`, the resulting `AttributeError` is caught and the deployment is silently dropped
Expected behavior: a previously unseen database deployment is adde…