router.py fixes
- 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
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 |
interesting that our test_router.py testing didn't catch the cache_config bug. I'll look into it. thanks for this @karvetskiy
@karvetskiy it looks like this PR has merge conflicts, can you fix and update?
i've also DM'ed via LinkedIn to understand how you're using the router
Hey @karvetskiy just bump me here/on LinkedIn when you want me to re-look at this PR.
@krrishdholakia I fixed conflicts. You can review it 👀