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

[BUG] Issue with Azure OpenAI Provider Not Being Identified Correctly #378

Open
2 tasks done
piyush-mahajan opened this issue Dec 2, 2024 · 2 comments · Fixed by #379
Open
2 tasks done

[BUG] Issue with Azure OpenAI Provider Not Being Identified Correctly #378

piyush-mahajan opened this issue Dec 2, 2024 · 2 comments · Fixed by #379

Comments

@piyush-mahajan
Copy link

piyush-mahajan commented Dec 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Vercel Runtime Logs

  • I have checked the Vercel Runtime Logs for errors (if applicable)

Current Behavior

We are currently transitioning to the Azure OpenAI service in our Morphic application, and we have encountered an issue where the provider is not being identified correctly. This has resulted in errors when attempting to connect to the Azure OpenAI API.
The application fails to connect to the Azure OpenAI API, resulting in the following error
Using model: openai:gpt-4o
Resolved providerId: openai
AZURE_API_KEY: Loaded
AZURE_RESOURCE_NAME:
AZURE_DEPLOYMENT_NAME:
AZURE_API_VERSION:
⨯ app\actions.tsx (86:9) @ $$ACTION_0
⨯ Error: Provider openai is not available (API key not configured or base URL not set)
at $$ACTION_0 (./app/actions.tsx:80:15)
digest: "1309449151"
84 | // Check if provider is enabled
85 | if (!isProviderEnabled(providerId)) {

86 | throw new Error(
| ^
87 | Provider ${providerId} is not available (API key not configured or base URL not set)
88 | );
89 | }

Expected Behavior

The application should correctly identify the Azure OpenAI provider and successfully connect to the API without errors.

Steps To Reproduce

We have verified that the API URL is correctly formatted and does not contain duplicate prefixes.
The issue seems to be related to the provider identification within the Morphic application, as we are able to connect to the Azure OpenAI API using other methods.
We believe this may not be an isolated issue, and other users transitioning to Azure OpenAI may face similar challenges.

Environment

- OS: Windows 11
- Browser:Google Chrome 52.0.2743.116

Anything else?

No response

@miurla
Copy link
Owner

miurla commented Dec 3, 2024

image

@piyush-mahajan In the latest version, models can be selected from the UI, but did you select Azure?
If there was an error with Azure, you should see the following error message, but in your case it seems to be running with the OpenAI provider.

 ⨯ Error: Provider azure is not available (API key not configured or base URL not set)
    at submit (./app/actions.tsx:80:11)
    at AsyncLocalStorage.run (node:async_hooks:346:14)

In the latest version, DEPLOYMENT_NAME is set to gpt-4o. I'll fix this as it should be configurable through environment variables again.

@miurla
Copy link
Owner

miurla commented Dec 3, 2024

In the latest version, DEPLOYMENT_NAME is set to gpt-4o. I'll fix this as it should be configurable through environment variables again.

fixed: #379

@piyush-mahajan Could you try setting the following 3 variables in the latest main branch?

AZURE_API_KEY=
AZURE_RESOURCE_NAME=
NEXT_PUBLIC_AZURE_DEPLOYMENT_NAME=

https://github.com/miurla/morphic/blob/main/.env.local.example#L53-L58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants