Leveraging Azure AI Foundry with GitHub Copilot: A Comprehensive Guide

Updated on Nov 12,2025

Table of Contents

Azure AI Foundry empowers developers to create smarter agents using powerful AI models. Integrating these models with GitHub Copilot streamlines the development process. This blog offers a comprehensive guide on setting up an Azure AI Foundry project, installing the necessary AI Toolkit, and deploying AI models effectively for use with GitHub Copilot, enhancing AI application development workflows.

Key Points

Azure AI Foundry offers powerful AI models for building intelligent agents.

GitHub Copilot enhances AI application development through seamless integration.

Project setup in Azure AI Foundry is crucial for utilizing available models.

Installing the AI Toolkit in Visual Studio Code is essential for Copilot integration.

Deploying models from Azure AI Foundry enables Copilot to leverage AI capabilities.

Local models offer enhanced privacy and control over AI processing.

Setting Up Your Azure AI Foundry Project

Creating the Azure AI Foundry Project

Embarking on the journey of building intelligent agents with Azure AI Foundry begins with a fundamental step: project creation. The Azure AI Foundry portal serves as the launching pad, and this section provides a detailed walkthrough on how to initiate your project within this environment. This initial setup is not just a formality; it's the foundational stone upon which all subsequent development activities will rest. By creating an Azure AI Foundry project, you establish the necessary framework for managing, accessing, and deploying AI models that will ultimately power your agents.

First, navigate to the Azure AI Foundry portal. Once there, you will find a prominent 'Create new' button. Clicking this button initiates the project creation process. A window will appear, prompting you to choose a resource type. Select 'Azure AI Foundry resource', which is the recommended option for building AI agents.

This resource type unifies the setup, management, and access to agents, models, and tools, ensuring a streamlined and cohesive development experience.

With the resource type selected, proceed to the next step by clicking 'Next'. You'll then be asked to provide a name for your project. It’s good practice to use a descriptive name that reflects the project's purpose or the type of AI agent you plan to build. For example, 'weather-agent-ghcp' could be an excellent name if you intend to create an AI agent that provides weather updates using GitHub Copilot. Ensure that the name adheres to the naming conventions specified, including length and character restrictions.

Once you’ve given your project a name, delve into the 'Advanced options' section. This area is where you configure essential details like the Azure AI Foundry resource name, subscription, resource group, and region. Note that the project name you provided earlier automatically populates the Azure AI Foundry resource name field, though you can modify it if needed. Select the appropriate Azure subscription from the dropdown menu. If you have access to multiple subscriptions, make sure to choose the one where you want to deploy your AI resources.

Decide whether to use an existing resource group or create a new one. Resource groups are logical containers that hold related Azure resources, making them easier to manage and organize. If you don't have an existing resource group or prefer to create a dedicated one for this project, select the option to create a new resource group. Finally, select the region where you want to deploy your resources. Choose a region that is geographically closest to your users or that meets your compliance requirements.

After meticulously configuring all the necessary settings, click the 'Create' button. Azure will then proceed with setting up your AI Foundry project, which may take a few minutes. Once the process is complete, the Azure AI Foundry portal will open to the project’s overview page. From here, you can explore available models, configure endpoints, and manage project settings. This successful creation marks the beginning of your AI agent development journey within the Azure AI Foundry ecosystem.

Set Default AI Foundry Project

Setting the Project

After all installations are complete, the default project has to be selected. With everything installed, it's time to make sure the right AI Foundry Project is chosen for use. Make sure your AI Foundry project is set as the default, and you can do that in two steps.

Firstly, you will need to navigate back to AI Toolkit extension view, and select Models.

In ‘My Resources’ you’ll see an option for Azure AI Foundry with an indicator saying that no project is selected. Hover over the section that says Azure AI Foundry, then right click and select Select Project. This should load the appropriate subscription, then you can choose to search for a project.

Deploy Model to Azure AI Foundry

To use local AI models with GitHub Copilot, begin within the AI Toolkit extension at the Model Catalog.

Within this Model Catalog, I’m going to filter to view all of the Azure AI Foundry models. So I’m scrolling down to the section where we have the filters. I’ll select Hosted By, and then from there, I’ll select Azure AI Foundry. Now this will provide access to all Azure AI Foundry models. At this point, you'll need to select Deploy to Azure AI Foundry.

The project name, and the connected AI resource will be auto-populated. For the deployment, I’ll use the model name. Under the Model Deployment section there are some choices you can make as well. You can select the type of deployment. The default is going to be Standard, but it does show how it adheres to Azure data residency promises. You also have options for Token Per Minute, and Content Filter. At this point, you can finally select Deploy to Azure AI Foundry.

After this has deployed it will take you back to the AI Toolkit Extension View. In 'My Resources' you'll see that the project ‘gittens-demo-ghcp’ has been created, in addition to several models.

AI Toolkit with Azure AI Foundry and GitHub Copilot Integration: Pros and Cons

👍 Pros

Streamlined integration of AI models into Visual Studio Code.

Enhanced productivity through AI-assisted code completion.

Improved access to powerful Azure AI Foundry models.

Greater control over AI processing with local models.

Simplified deployment of AI solutions directly from the IDE.

👎 Cons

Initial setup can be complex and time-consuming.

Dependence on hardware capabilities for optimal performance.

Potential costs associated with Azure subscription and model usage.

AI responses and recommendations may sometimes be inaccurate.

Local models require significant storage and processing resources.

Frequently Asked Questions

What is Azure AI Foundry?
Azure AI Foundry is a comprehensive platform that allows developers to design, customize, and manage powerful AI agents. It unifies setup, management, and access to agents, models, and tools, streamlining the AI development process. It is designed to give users the ability to rapidly construct AI agents that can automate a wide array of tasks and provide personalized user experiences.
How does GitHub Copilot enhance AI application development?
GitHub Copilot integrates seamlessly with development environments like Visual Studio Code, enhancing productivity and simplifying the development of AI-powered applications. Copilot suggests code completions, provides real-time assistance, and helps automate routine coding tasks, enabling developers to focus on more complex and creative aspects of their projects.
What is the AI Toolkit extension?
The AI Toolkit extension for Visual Studio Code serves as a bridge between Azure AI Foundry and GitHub Copilot. It allows developers to access and leverage AI models directly within their code editor, simplifying the integration of AI capabilities into their applications.
What is a local language model?
A local language model is an AI model that runs directly on your own device or server, rather than relying on a cloud service. This offers increased privacy, control, and the ability to operate independently of internet connectivity. Local language models are ideal for handling sensitive data or ensuring consistent availability.
How do I change my Azure subscription?
After creating a project, navigate to 'Advanced Options.' Inside, locate the dropdown menu for subscription selection. Choose the appropriate Azure subscription from the available options.

Related Questions

What are the key steps for deploying a model in Azure AI Foundry with GitHub Copilot?
To deploy a model: Create a project, install necessary VS Code extensions, select Azure AI Foundry, choose the project to be the default, and deploy to Azure AI Foundry. During the deployment, there are also options for type, tokens per minute, and content filtering. First, you’ll want to start with selecting or creating a project in the Azure AI Foundry portal. Then make sure you have the right extensions installed, before returning to the Foundry, selecting to deploy to Azure AI Foundry, and setting up your deployment. You can select the type of deployment. The default is Standard, but it does show how it adheres to Azure data residency promises. You also have options for Token Per Minute, and Content Filter. And then finally, you are ready to deploy to Azure AI Foundry.
How can I optimize model usage with GitHub Copilot for AI development?
For optimal use of AI models, carefully review the details before deployment, such as version upgrades, token settings, and default filter settings. Make sure that all relevant models are added, to take advantage of the technology in all situations. These actions let you get the most out of model usage with GitHub Copilot.
How do I create a resource group?
First, you’ll navigate to the Azure AI Foundry portal, and create a new AI Foundry resource. Then you will be asked to provide a name for your project. After that, you will want to explore the ‘Advanced options.’ Within these options, there will be the resource group section. You can then opt to create a new resource group.
What are the main purposes of using Local Models?
When building with AI technology, there are reasons to utilize the local language model. Often, this is motivated by reasons such as greater privacy, greater control, and offline availability. Local models are perfect for when data needs to remain local.

Most people like