litellm icon indicating copy to clipboard operation
litellm copied to clipboard

router.py fixes

Open sevkar opened this issue 2 years ago • 6 comments

  • Default linters My default IDE linters flagged the code formatting. I hope this rewrite makes it more readable.
  • Fix Redis cache (it wasn't work) The Redis cache configuration was not unpacked, causing it to malfunction.
  • Return types Added readability to methods
  • Optimized model storage: O(1) get model list I changed the implementation from iterating over a list of potential deployments on every request to using a dictionary to improve the speed of accessing its items.
  • Minimal model validation Added validation of model keys to prevent malformed models from passing to model_list
  • Minor fixes

sevkar avatar Oct 30 '23 08:10 sevkar

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 9:53am

vercel[bot] avatar Oct 30 '23 08:10 vercel[bot]

interesting that our test_router.py testing didn't catch the cache_config bug. I'll look into it. thanks for this @karvetskiy

krrishdholakia avatar Oct 31 '23 23:10 krrishdholakia

@karvetskiy it looks like this PR has merge conflicts, can you fix and update?

krrishdholakia avatar Oct 31 '23 23:10 krrishdholakia

i've also DM'ed via LinkedIn to understand how you're using the router

krrishdholakia avatar Oct 31 '23 23:10 krrishdholakia

Hey @karvetskiy just bump me here/on LinkedIn when you want me to re-look at this PR.

krrishdholakia avatar Nov 01 '23 15:11 krrishdholakia

@krrishdholakia I fixed conflicts. You can review it 👀

sevkar avatar Nov 01 '23 20:11 sevkar