Unable to Use Microsoft Phi-4 Deployment Despite Successful Deployment Status

Thitiwat Wuthimapakorn 0 Reputation points
2026-11-18T05:23:18.4933333+00:00
  • Subscription Type: Azure Free Trial
  • Azure AI Foundry
  • Model: microsoft--phi-4
  • Deployment Type: GlobalManagedCompute
  • Accelerator: A100_80GB
  • Provisioning State: Succeeded
  • Playground Error: ERR_BAD_REQUEST
  • Browser Network: 404 Not Found
  • Direct API: "The specified endpoint does not exist"

User's image

User's image

Foundry Models
Foundry Models

A catalog of AI models in Microsoft Foundry that you can discover, compare, and deploy using Azure’s built‑in tools for evaluation, fine‑tuning, and inference


1 answer

Sort by: Oldest
  1. AI answer

    2026-11-18T05:25:01.8233333+00:00

    Invoke this Global Managed Compute deployment through the Foundry account endpoint and the exact deployment name phi-4-a100, using the generated request under Continue in code rather than a project, agent, or Azure OpenAI endpoint.

    Use the managed-compute endpoint

    Managed-compute deployments use this universal route:

    https://<account>.services.ai.azure.com/managed-deployments/phi-4-a100/
    

    Every managed-compute deployment is available through /managed-deployments/<deployment-name>/. The /openai/v1/ route works only when the deployment’s runtime exposes an OpenAI-compatible API; using it against an incompatible runtime returns HTTP 404.^1^

    1. In Foundry, open Build → Models → Deployments → Managed-compute → phi-4-a100.
    2. Select Continue in code.
    3. Copy the endpoint and sample for that deployment. Do not substitute:
      • the Foundry project endpoint ending in /api/projects/<project-name>;
      • an endpoint from another Foundry resource;
      • the model catalog ID microsoft--phi-4; or
      • an Azure OpenAI deployment URL.
    4. Keep phi-4-a100 as the deployment identifier. The inference request uses the deployment name, not the catalog model name.^2^

    If Continue in code provides an OpenAI-compatible sample, its essential configuration should resemble:

    from openai import OpenAI
    
    client = OpenAI(
        base_url="https://<account>.services.ai.azure.com/openai/v1/",
        api_key="<foundry-account-key>",
    )
    
    response = client.chat.completions.create(
        model="phi-4-a100",
        messages=[{"role": "user", "content": "hello"}],
    )
    print(response.choices[0].message.content)
    

    Do not add api-version to the /openai/v1/ route. If the generated sample instead uses /managed-deployments/phi-4-a100/, retain that route and its runtime-specific request path unchanged.

    Interpret the result

    Microsoft lists three primary causes for a 404 on Foundry inference endpoints: an incorrect endpoint URL, a nonexistent deployment name, or an unsupported API version.^3^

    • The generated request succeeds: the manually constructed API endpoint or route was incorrect.
    • /openai/v1/ fails but the generated managed-deployment request succeeds: that deployment runtime does not expose the OpenAI-compatible route. Continue using /managed-deployments/phi-4-a100/.
    • Both the generated request and Playground fail: this is no longer isolated to client code. Because the deployment is already Succeeded and the portal Playground also returns an error, collect the failed request details and escalate it as a managed-compute endpoint/routing problem.

    Permissions and escalation

    For Playground or Microsoft Entra ID access, the signed-in identity needs Foundry User on the Foundry account. Entra authentication uses the https://ai.azure.com/.default scope. Account-key authentication is also supported on both managed-compute route families.^1^

    If the role is already present and the generated request still fails:

    1. Open the failed request in browser developer tools and record:
      • request URL and HTTP method;
      • status code and response body;
      • x-request-id or other correlation/request ID;
      • UTC timestamp.
    2. Record the Foundry account, project, region, deployment name phi-4-a100, deployment type, and deployment template/runtime shown under Details.
    3. Check Azure Service Health for the account’s region.
    4. In Azure Portal, open Help + support → Create a support request, select the Foundry resource, and categorize it under Model Deployments. Include the Playground failure and the equivalent failure from the generated request.

    The Free Trial label alone does not explain this result: managed compute requires approved quota for the selected accelerator and scope, but quota failures normally occur during creation rather than after the deployment reaches Succeeded.^2^


    References

    1. Managed compute in Microsoft Foundry
    2. Deploy open-source models with managed compute (ai-foundry-portal)
    3. Troubleshoot common HTTP errors - Azure OpenAI in Microsoft Foundry - Microsoft Foundry | Microsoft Learn
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.