#29484 fix(guardrails): update_in_memory_litellm_params fails with dict input from DB
## Bug
`CustomGuardrail.update_in_memory_litellm_params()` fails with `vars() argument must have __dict__ attribute` when `litellm_params` is a dict instead of a `LitellmParams` Pydantic model.
## Context
When a guardrail is updated via the API (`PUT /guardrails/{id}`), `update_in_memory_guardrail` in `guardrail_registry.py` calls:
```python custom_guardrail_callback.update_in_memory_litellm_params( litellm_params=updated_litellm_params ) ```
`updated_litellm_params` is cast from the DB response as `LitellmParams` but may actually be a plain dict:
```python updated_litellm_params = cast(LitellmParams, guardrail.get("litellm_params", {})) ```
`cast()` doesn't convert — it's just a type hint. If the underlying value is a dict, `vars()` fails.
## Impact
- Immediate in-memory guardrail sync fails silently after updates - Guardrail version changes don't take effect until the 30s periodic DB sync (or instance restart) - In multi-instance deployments (ECS Fargate), the instance that processes the update throws a warning and stays on the old version
## Observed Error (ECS Logs)
``` LiteLLM Proxy:WARNING - Immediate sync: Failed to update 'guardrail-name' (ID: xxx) in memory:…