--- alias: user-guide-azure-openai --- # Azure AI Foundry Configuration Guide This guide describes how to create and configure Azure OpenAI resources using Azure AI Foundry and how to map the required values to the Critical Manufacturing MES GenAI configuration. ## Prerequisites * You must have an active Azure subscription. ## 1. Create a Project in Azure AI Foundry 1. Navigate to the [Azure AI Foundry portal](https://ai.azure.com/) (formerly Azure AI Studio). 2. If you don't have any projects created, select the **Start building** button on the top ribbon. 3. Select **Create a new project** or select an existing one. 4. If you already have projects created, select the **+ Create new** button and choose **Microsoft Foundry resource** as the resource type. 5. Choose a name for the project (for example, `cmf-genai-project`). 6. You can further customize your project using the Advanced options, providing details such as: * **Subscription** - choose an existing subscription or create a new one. * **Resource group** - choose an existing resource group or create a new one. * **Microsoft Foundry resource** - this field is automatically populated and uses the project name with the `-resource` suffix (for example, `cmf-genai-project-resource`). * **Region** - choose a region that supports the required models (for example, `East US 2` or `Sweden Central`) 7. Select **Create**. !!! note This process automatically creates the underlying Azure OpenAI or Azure AI Services resource associated with the project. ## 2. Deploy a Model A model must be deployed (that is, made active) before it can be used by any application. 1. Select **Build** from the top ribbon and navigate to **Models**. 2. Choose **Deploy a base model**. 3. Choose your preferred model (for example, `gpt-4o` or `gpt-35-turbo`). !!! warning Model availability depends on the selected Azure region. The model deployment must be in the same region as the Azure AI Foundry project. For more information, see [Supported models in Foundry Agent Service](https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/model-region-support?view=foundry&preserve-view=true&tabs=global-standard). 4. Select **Deploy** and choose one of the available options: * **Default settings** - set to global standard and default quota. This is the recommended option. * **Custom settings** - set your own SKU, quota, PTU, spillover, and guardrails. ## 3. Configure the Critical Manufacturing MES When deploying the [[installation-guide-installation#genai|GenAI MES package]] through DevOps Center, you must collect a set of configuration values from [Azure AI Foundry](https://ai.azure.com/) and the [Microsoft Azure portal](https://portal.azure.com/#home). Follow the steps below to identify each required value. ![configuring the GenAI package during create environment process](../images/configuring_gen_ai_package.png) 1. The **Instance Name** corresponds to the name assigned to the **Microsoft Foundry resource** (in this scenario, `cmf-genai-project-resource`). You can also identify this value from the first segment of the **Project endpoint** URL (in this example, `https://cmf-genai-project-resource.services.ai.azure.com/api/projects/cmf-genai-project`). 2. To locate the **API Key**, go to your Foundry project, navigate to **Home**, and copy the **Project API Key**. 3. To locate **API Version**, go to the [Microsoft Azure portal](https://portal.azure.com/#home), open the Foundry Resource (in this example, `cmf-genai-project-resource`), and switch to the **JSON view** in the **Overview** section. From this view, copy the **API Version** value. 4. To locate the **Model** and the **Deployment Name**, go to your Foundry project, navigate to **Build**, then choose **Models**. You will find the required information on this page. After completing these steps, the Azure OpenAI deployment is correctly aligned with Azure AI Foundry and ready to be consumed by the Critical Manufacturing MES GenAI components.