azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI'

Open GustavoContreiras opened this issue 1 year ago • 22 comments

This issue is for a: (mark with an x)

- [x ] bug report
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

azd auth login azd up

Any log messages given by the failure

PS C:\dev\azure-search-openai-demo> azd up
? Please enter a new environment name: azure-search-openai-demo
? Please select an Azure Subscription to use:  1. Azure subscription 1 (d798xxxxxxxxxxc0b4f)
? Please select an Azure location to use: 42. (US) East US 2 (eastus2)

Packaging services (azd package)

  |       | Packaging service backendExecuting prepackage hook => C:\Users\GUSTAV~1.CON\AppData\Local\Temp\azd-prepackage-2434810807.ps1

added 121 packages, and audited 122 packages in 17s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
  |     ==| Packaging service backend
> [email protected] build
> tsc && vite build

  |=      | Packaging service backendvite v4.1.1 building for production...
✓ 1250 modules transformed.
../backend/static/index.html                    0.49 kB
../backend/static/assets/github-fab00c2d.svg    0.96 kB
../backend/static/assets/index-6b2c2cfa.css     7.46 kB │ gzip:   2.20 kB
../backend/static/assets/index-3d122da9.js    625.76 kB │ gzip: 204.86 kB │ map: 5,057.29 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
  (✓) Done: Packaging service backend
  - Package Output: C:\Users\GUSTAV~1.CON\AppData\Local\Temp\azddeploy856576354.zip

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time

  (✓) Done: Downloading Bicep
  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#blade/HubsExtension/DeploymentDetailsBlade/overview/id/%2Fsubscriptions%2Fd7xxxxxxx-32x8-47df-xxxf-b0xxxx65c0b4f%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fazure-search-openai-demo

  (✓) Done: Resource group: rg-xxxxxxxxx
  (✓) Done: Form recognizer: cog-fr-xxxxxxxxxx
  (✓) Done: Storage account: stewxxxnxxxxxez46
  (✓) Done: Search service: gptkb-ewxxxxxxxxz46

ERROR: deployment failed: error deploying infrastructure: failed deploying: deploying to subscription:

Deployment Error Details:
SpecialFeatureOrQuotaIdRequired: The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI' .
Unauthorized: This region has quota of 0 instances for your subscription. Try selecting different region or SKU.
- This region has quota of 0 instances for your subscription. Try selecting different region or SKU.

Expected/desired behavior

Deploy the app in Azure.

OS and Version?

Windows 10

Versions

Mention any other details that might be useful

I'm using a free trial Azure account.

GustavoContreiras avatar Apr 14 '23 14:04 GustavoContreiras

Did you get your subscription in allow list to deploy Open AI? Try to create it manually in the portal and it shows the same error.

But I am wondering if should be checked upfront.

hophanms avatar Apr 15 '23 00:04 hophanms

I have the same issue

Samoppakiks avatar Apr 15 '23 09:04 Samoppakiks

Same here and I got the subscription allowed and not using a free account

goodvirus136 avatar Apr 17 '23 12:04 goodvirus136

Same here and I got the subscription allowed and not using a free account

Maybe you have to create an "Azure OpenAI" in Azure after being allowed:

image

GustavoContreiras avatar Apr 17 '23 13:04 GustavoContreiras

See Limited access to Azure OpenAI Service.

Azure OpenAI requires registration and is currently only available to approved enterprise customers and partners. Customers who wish to use Azure OpenAI are required to submit a registration form.

This is also mentioned in the README.

IMPORTANT: In order to deploy and run this example, you'll need an Azure subscription with access enabled for the Azure OpenAI service. You can request access here. You can also visit here to get some free Azure credits to get you started.

iMicknl avatar Apr 17 '23 13:04 iMicknl

Thanks but I can create an openai ressource so thats not the problem

goodvirus136 avatar Apr 18 '23 10:04 goodvirus136

I'm having this same issue. Submitted the registration form and got confirmation that my subscription was enabled for the Open AI service.

kylgrn avatar Apr 19 '23 15:04 kylgrn

I believe I figured out the issue. You have to select the region in the script that you defined in the form you submitted to Microsoft. I was choosing EastUS2 and was unable to provision, then remembered I chose EastUS in the form. It now works.

kylgrn avatar Apr 19 '23 17:04 kylgrn

I had the same issue I didn't realize I selected use east 2 and needed us east

Alec13355 avatar Apr 25 '23 15:04 Alec13355

The only way I could get around this is delete my already existing OpenAI instance in my Azure portal, then run this container. After that it created OpenAI successfully.

pkfuncs avatar Apr 26 '23 13:04 pkfuncs

Change SKU from 'S0' to 'S' in main.bicep:

param openAiSkuName string = 'S'

Also need to set network ACL in cognitiveservices.bicep:

image

bobbydowling avatar May 12 '23 18:05 bobbydowling

Also having this problem, even in the container and having deleted my existing OpenAI Instance. Any solution to this yet?

Problem solved. I had to run

azd env set AZURE_LOCATION="eastus"

in docker container terminal.

anniehou-panda avatar May 19 '23 08:05 anniehou-panda

I'm facing the same problem. "azd up" created "rg-azure-search-openai-demo-dev" and succeeded with 11 resources. However, I encountered a failure while trying to create the OpenAI resource. I'm confident that I have the necessary permissions to create OpenAI resources with "S0".

matsumoto-mayumi avatar May 23 '23 18:05 matsumoto-mayumi

@matsumoto-mayumi confirm your resource group is in the right region. We had the same issue and it was because azd up defaulted to a region that did not have azure open Ai yet. I believe to date there's only 3 regions that support Azure Open AI

Alec13355 avatar May 25 '23 15:05 Alec13355

Thanks @Alec13355 ! I was able to resolve this issue. Unfortunately, another problem has occurred, but it seems to be reported as a separate issue, so I will ask my question there.

matsumoto-mayumi avatar May 26 '23 06:05 matsumoto-mayumi

I got the same issue. Fixed it by select "East US" region. I was using "East US 2".

nhtkid avatar May 30 '23 10:05 nhtkid

Even after getting approval to create the Openai resource, the script failed.

I did a test by creating an Open AI service through the Azure Portal and it worked.

The difference is that through the Portal I created it in eastus and not in eastus2

So I deleted the resource group and services that had been created, changed the location in the .azure directory's .env file (AZURE_LOCATION="eastus") and ran azd up again and everything worked.

Microsoft is making Open AI available only on EASTUS and not on EASTUS2. Its just update ,env configuration file to the EASTUS location.

fabiomarcos70 avatar Jun 01 '23 03:06 fabiomarcos70

When running azd up make sure you pick a region that has Azure OpenAI, those currently are available in the portal when cresting a new service:

  • East US
  • France Central
  • UK South
  • West Europe
screenshot 2023-06-20 at 11 07 11

tonybaloney avatar Jun 20 '23 01:06 tonybaloney

I got same issue with demo. Here is how I have solved it so new comers are not wasting their valuable time to debug it. -1. make sure you have signed up Azure OpenAI service -2. Click on GITHUB CODESPACE OPEN -3. Run azd auth login -4. Run azd init -t azure-search-openai-demo -5. Run azd env set AZURE_LOCATION eastus -6. Run azd up (wait for 16 min. in my case)

erg-hzhou avatar Jun 24 '23 21:06 erg-hzhou

What worked for me: Switching from an Azure totally free subscription to an Azure "pay as you go" subscription (even on a Basic level, where there is no monthly subscription fee, and 12 months of credits).

amtambe avatar Dec 12 '23 20:12 amtambe

It is currently the case that free Azure accounts cannot use Azure OpenAI. If you have a free Azure account, please follow the readme instructions for using OpenAI.com credentials instead.

pamelafox avatar Jan 25 '24 23:01 pamelafox

If we cannot use the free Azure accounts, they should not be an option to select.

KristinBethea avatar May 21 '24 20:05 KristinBethea

I believe I figured out the issue. You have to select the region in the script that you defined in the form you submitted to Microsoft. I was choosing EastUS2 and was unable to provision, then remembered I chose EastUS in the form. It now works.

Thanks a lot for for this. For the record, I first had to upgrade my subscription to "pay as you go", then set the region. The region I had to guess, because they only asked me about the zip code, not "region" in the registration form. I guess they could easily make it even more difficult.

techybolek avatar Jun 07 '24 15:06 techybolek