litellm icon indicating copy to clipboard operation
litellm copied to clipboard

Fix: Properly pass azure_ad_token_provider from litellm_params

Open OndrejSlama opened this issue 9 months ago • 5 comments

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.

OndrejSlama avatar Feb 11 '25 19:02 OndrejSlama

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

vercel[bot] avatar Feb 11 '25 19:02 vercel[bot]

@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.

OndrejSlama avatar Feb 14 '25 08:02 OndrejSlama

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.

radovanZRasa avatar Mar 11 '25 12:03 radovanZRasa

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.

krrishdholakia avatar Mar 11 '25 13:03 krrishdholakia

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.

OndrejSlama avatar Mar 17 '25 09:03 OndrejSlama

CLA assistant check
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.

CLAassistant avatar Apr 22 '25 22:04 CLAassistant

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.

github-actions[bot] avatar Jul 22 '25 00:07 github-actions[bot]