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 OpenAI API Version Failing for latest API Versions of 2024 #3860

Open
edwinjosechittilappilly opened this issue Sep 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@edwinjosechittilappilly
Copy link
Collaborator

Bug Description

We are experiencing failures when attempting to use the latest Azure OpenAI API versions released in 2024. Interestingly, the API functions correctly when utilizing any of the preview API versions from 2023.

Reproduction

Create a basic flow with AzureOpenAI component:

  1. Select API Version: Choose any of the 2024 API versions for Azure OpenAI.
  2. Build the component: Perform a standard API request using the selected 2024 version.
  3. Observe Failure: 404 Resource not found.

Expected behavior

The component should have been built successfully.

Reference guide on selecting the API versions:https://stackoverflow.com/questions/76475419/how-can-i-select-the-proper-openai-api-version

Who can help?

No response

Operating System

MacOS

Langflow Version

1.0.18

Python Version

None

Screenshot

No response

Flow File

No response

@edwinjosechittilappilly edwinjosechittilappilly added the bug Something isn't working label Sep 19, 2024
@saurabhmj11
Copy link

It looks like you're encountering a compatibility issue with the latest Azure OpenAI API versions released in 2024, where API calls result in a 404 Resource not found error. This seems to happen specifically when using the 2024 versions, while earlier versions from 2023 work as expected.

Potential Causes and Troubleshooting Steps:
API Version Discrepancy: Azure OpenAI might have made changes to the API endpoints, resource paths, or version naming conventions in the 2024 release. Double-check the following:

Ensure the API version is properly configured in your request.
Compare the differences in API documentation between 2023 preview versions and 2024 releases. There might be new resource paths or different structures in the request format.
Region-Specific or Availability Issues: Sometimes, new API versions may not be rolled out uniformly across all regions. If the API version is not available in the region you're querying, it could return a 404 error. Try switching to different regions where the 2024 API might be fully operational.

Component Configuration: In Langflow, ensure the AzureOpenAI component is properly configured with the required API version and the correct environment (e.g., endpoint URLs, API keys, etc.). You can also validate these details by calling the API directly through cURL or Postman.

API Key/Access Permissions: There could be changes to the required scopes, permissions, or API key configurations for the 2024 versions. Verify that your API key has the necessary permissions for the 2024 API.

Suggested Steps for Resolution:
Check API Documentation: Review the official Azure OpenAI 2024 API documentation to identify any major changes. You can also use the reference guide on selecting API versions here.

Fallback to 2023 Versions: If the 2024 version is not critical, you might want to continue using the 2023 preview versions until the 2024 version becomes stable or fully supported.

Raise a Support Ticket: If the issue persists, consider reaching out to Azure OpenAI support, providing detailed logs, including the API version, region, and error messages.

Langflow Update: Ensure you’re using the latest Langflow version (1.0.18 seems up to date). However, check if any recent updates or patches for API compatibility have been released.

Additional Debugging:
You might want to test with lower-level tools like Postman or Python’s requests library to send direct API requests. This will help you isolate whether the issue is specific to Langflow or the Azure OpenAI API itself.

Would you like help writing a direct API test script or checking any specific configurations?

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

No branches or pull requests

2 participants