fix(nvidia_nim/embed.py): add 'dimensions' support (#8302)

* fix(nvidia_nim/embed.py): add 'dimensions' support

Fixes https://github.com/BerriAI/litellm/issues/8238

* fix(proxy_Server.py): initialize router redis cache if setup on proxy

Fixes https://github.com/BerriAI/litellm/issues/6602

* test: add unit testing for new helper function
This commit is contained in:
Krish Dholakia 2025-02-07 16:19:32 -08:00 committed by GitHub
parent 942446d826
commit 024237077b
5 changed files with 36 additions and 2 deletions

View file

@ -573,6 +573,20 @@ class Router:
litellm.amoderation, call_type="moderation"
)
def _update_redis_cache(self, cache: RedisCache):
"""
Update the redis cache for the router, if none set.
Allows proxy user to just do
```yaml
litellm_settings:
cache: true
```
and caching to just work.
"""
if self.cache.redis_cache is None:
self.cache.redis_cache = cache
def initialize_assistants_endpoint(self):
## INITIALIZE PASS THROUGH ASSISTANTS ENDPOINT ##
self.acreate_assistants = self.factory_function(litellm.acreate_assistants)