Skip to content

Can't call embeddings from azure-ai-projects OpenAI client #44532

@zweckj

Description

@zweckj
  • Package Name: azure-ai-projects
  • Package Version: 2.0.0b2
  • Operating System: macOS 26.2
  • Python Version: 3.13.11

Describe the bug

Trying to use openai_client.embeddings.create in conjunction with openai_client.embeddings.create only yields 404 responses. Embedding model is deployed in Foundry.

To Reproduce
Steps to reproduce the behavior:

        self._project = AIProjectClient(
            endpoint=self.settings.AZURE_AI_PROJECT_ENDPOINT,
            credential=DefaultAzureCredential(),
        )
        openai_client = self._project.get_openai_client()
        embedding = await openai_client.embeddings.create(
            model=self.settings.AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME,
            input=query,
        )

with AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME=text-embedding-ada-002

Expected behavior

Embeddings are generated successfully.

Additional context

Logs:

[get_openai_client] Creating OpenAI client using Entra ID authentication, base_url = `https://aif-<MY_INSTANCE>-dev.services.ai.azure.com/api/projects/proj-default/openai`

==> Request:
POST https://aif-<MY_INSTANCE>-dev.services.ai.azure.com/api/projects/proj-default/openai/embeddings?api-version=2025-11-15-preview

<== Response:
404 Not Found
Headers:
  apim-request-id: e632ab44-d83a-4e68-8332-2640bb30b468
  azureml-served-by-cluster: hyena-swedencentral-02

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI ProjectsService AttentionWorkflow: This issue is responsible by Azure service team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions