litellm
litellm copied to clipboard
Fix: Properly pass azure_ad_token_provider from litellm_params
Title
Fix for azure_ad_token_provider
Relevant issues
Fixes #6790
Type
🐛 Bug Fix
Changes
- try to get azure_ad_token_provider from litellm_params. If not present, continue as previously.
Tested locally. Its possible to define azure_ad_token_provider now in litellm_params as described in docs.
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 | Feb 12, 2025 9:20am |
@ishaan-jaff Agree. Can it be added separately? This issue completely blocks us from effectively using Router in sdk with azure deployments that need custom token provider in current release of litellm.
Any news on this PR?
We have to use workarounds (creating new Router to ensure token is fresh) if we want to use OAuth with LiteLLM.
Docs state that azure_ad_token_provider can se set, but as soon that is set the error about missing api_key, azure_ad_token or azure_ad_token_provider is raised.
Side note: LiteLLM crew, please refactor your functions. They are like 500 lines long and super hard to follow.
Hey @radovanZRasa acknowledging the feedback
We have a lint rule in place to prevent any new functions from exceeding 50 LOC (since late 2024)
These are older functions which need to be refactored.
We have decided to move away from LiteLLM completely. This issue (among others and overall very poor library code quality) have been the deciding factor. Feel free to take over this pull request if any other changes are needed to merge it.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.