Can't configure a regional API endpoint for AzureOpenAIEmbeddingSkill

Felix Obenauer 11 Reputation points
2024-03-07T16:04:50.9233333+00:00

I run into an issue while configuring the AzureOpenAIEmbeddingSkill in my indexers' skillset. Particularly, I can't seem to set the correct value for the "resourceUri" field.

All my search resources are deployed to france central (azure ai search, cognitive accounts, azure openai and the deployed models). The deployed model I tried to use is called "ada-embedding".

When I use https://<my-openai-deployment-name>.openai.azure.com as the value for resourceUri, I can successfully POST the configuration via the Rest API. However, when the skill is executed, I get this error:

Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource

I get the same error when I manually try to embed some text with this curl:

curl 'https://<my-openai-deployment-name>.openai.azure.com/openai/deployments/ada-embedding/embeddings?api-version=2023-05-15'\
  -H "Content-Type: application/json" \
  -H "api-key: 1c.....e" \
  -d '{"input": "Sample Document goes here"}'

I then tried to configure the regional API endpoint and tried to put "https://francecentral.api.cognitive.microsoft.com" as the resourceUri. Note: in this case, there's no <my-openai-deployment-name> subdomain.
I cannot save this configuration, I immediately get the errormessage "Invalid resourceUri. Provide a valid resourceUri for the Azure Open AI service".

I can, however, successfully create an embedding by manually calling this API endpoint:

curl 'https://francecentral.api.cognitive.microsoft.com/openai/deployments/ada-embedding/embeddings?api-version=2023-05-15'\
  -H "Content-Type: application/json" \
  -H "api-key: 1c....e" \
  -d '{"input": "Sample Document goes here"}'

This curl succeeds and returns an embedding.

To me, this looks like an issue in the validation of the configuration API. If I try to configure the skillset via the Azure portal, I also get this error, even when picking the resources (open ai deployment, model) from the dropdowns in the wizard.

It seems that there's a simple check that the URI is a subdomain of 'openai.azure.com', as it will accept a value like "https://dasdasdasdfasdfasd.openai.azure.com".

Is this really a bug in the API validation or should I in fact use "<my-openai-deployment-name>.openai.azure.com" here?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
810 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,488 questions
{count} vote