Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure ai requests are failing due to changed endpoint #800

Open
amanintech opened this issue Dec 11, 2024 · 2 comments
Open

Azure ai requests are failing due to changed endpoint #800

amanintech opened this issue Dec 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working triage

Comments

@amanintech
Copy link

amanintech commented Dec 11, 2024

What Happened?

Provider - azure-ai
Example model - mistral-large

According to the new Azure AI Studio, AI inferencing models URL have changed to - https://resource-name.openai.azure.com/ but the code still refers to previous patterns

on using provider - azure-openai gives error

{"error":{"message":"azure-openai error: Backend returned unexpected response. Please contact Microsoft for help.","type":null,"param":null,"code":"InternalServerError"},"provider":"azure-openai"}

portkey log shows bad URL

url": "https://undefined.undefined.inference.ml.azure.com/score/chat/completions?api-version=2024-05-01-preview",
  "method": "POST",

What Should Have Happened?

add another mode or change the url pattern to -

if (azureDeploymentType === 'serverless') {
      return 
https://${azureDeploymentName?.toLowerCase()}.openai.azure.com`;
}

Relevant Code Snippet

https://github.com/Portkey-AI/gateway/edit/main/src/providers/azure-ai-inference/api.ts

if (provider === GITHUB) {
      return 'https://models.inference.ai.azure.com';
    }
    if (azureDeploymentType === 'serverless') {
      return `https://${azureDeploymentName?.toLowerCase()}.${azureRegion}.models.ai.azure.com`;
    }

Your Twitter/LinkedIn

https://www.linkedin.com/in/amanintech/

@amanintech amanintech added the bug Something isn't working label Dec 11, 2024
@amanintech
Copy link
Author

BTW I am happy to patch this if it seems as a good fix.

@narengogi
Copy link
Collaborator

@amanintech thanks for reporting this, yes the fix looks good, you can raise it. I'm assigning the issue to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants