feat: support Azure OpenAI via azure/ prefix#80
feat: support Azure OpenAI via azure/ prefix#80Amitesh-AJ10 wants to merge 2 commits intohuggingface:mainfrom
Conversation
|
@claude please review this PR. Focus on correctness, security, LiteLLM/Bedrock routing impact, and whether it's safe to merge against current main. Keep it concise and prefer inline comments where it matters. |
|
Claude finished @akseljoonas's task in 1m 12s —— View job PR Review:
|
1f00459 to
76185d5
Compare
|
I've rebased onto main and resolved the conflicts. It looks like the new Claude Review action is hitting an OIDC authentication error on this PR (Invalid OIDC token), so that failure seems to be an infra issue on the repo side. |
Summary: Adds support for Azure OpenAI models (including OAuth/Entra ID) by recognizing the
azure/model prefix.The Fix:
azure/as a recognized direct API prefix inllm_params.pyandmodel_switcher.py. This stops the agent from incorrectly treating Azure models as Hugging Face router models.litellmto natively handle Azure credentials (likeAZURE_AD_TOKENorDefaultAzureCredential).azure/<model>as a supported format.Verification: Verified locally that
ml-intern --model azure/gpt-4onow bypasses the HF router check and correctly attempts to initialize the Azure client.Fixes #59