Azure OpenAI v1 API, Responses API, and Model Context Protocol: What .NET Developers Need to Know
Azure OpenAI v1 API, Responses API, and Model Context Protocol: What .NET Developers Need to Know
TL;DR
Starting in August 2025, Azure OpenAI offers next-generation v1 APIs with ongoing access to latest features without monthly version updates . The new Responses API is a stateful API that brings together the best capabilities from chat completions and assistants APIs in one unified experience . Model Context Protocol (MCP) is an open protocol enabling seamless integration between LLM applications and external data sources and tools . For .NET developers, this means simpler API management, faster feature adoption, and powerful tooling integration through GitHub Copilot and Semantic Kernel.
Migrate to Azure OpenAI v1 APIs
The v1 APIs offer ongoing access to latest features with no need to specify new api-versions each month, and feature a faster API release cycle with new features launching more frequently .
Key Changes
-
api-version is no longer a required parameter with the v1 GA API
-
The v1 API removes the dependency on AzureOpenAI() client by adding automatic token refresh support to the OpenAI() client
Migration Example
Use the OpenAI() client instead of AzureOpenAI(), pass the Azure OpenAI endpoint with /openai/v1 appended to the endpoint address, and api-version is no longer required :
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/"
)
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}]
)
Adopt the Responses API for Stateful Interactions
The Responses API is a new stateful API from Azure OpenAI that brings together the best capabilities from the chat completions and assistants API in one unified experience .
Why Use It
- Unified interface for chat and agent scenarios
-
Adds support for the new computer-use-preview model which powers the Computer use capability
- When you’re using the MCP tool, you only pay for tokens used when importing tool definitions or making tool calls—there are no additional fees involved
Example: Using MCP Tools
import os
from openai import OpenAI
client = OpenAI(
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
api_key=os.getenv("AZURE_OPENAI_API_KEY")
)
response = client.responses.create(
model="gpt-4",
tools=[
{
"type": "mcp",
"server_label": "github",
"server_url": "https://contoso.com/api/mcp",
"require_approval": "never"
}
],
input="What are the latest commits?"
)
print(response.output_text)
Integrate with Model Context Protocol (MCP)
Model Context Protocol is an open protocol that enables seamless integration between LLM applications and external data sources and tools, with MCP tools providing AI applications with data and capabilities to accomplish tasks .
.NET + MCP Integration
Semantic Kernel supports MCP, and you can use the MCP C# SDK to quickly create your own MCP integrations and switch between different AI models without significant code changes .
Semantic Kernel supports both local MCP servers through standard I/O and remote servers that connect through SSE over HTTPS .
Expose Your ASP.NET Core App as an MCP Server
You can empower GitHub Copilot Chat with your existing .NET web apps by integrating their capabilities as Model Context Protocol servers, enabling Copilot Chat to perform real-world tasks .
// In Program.cs
var builder = WebApplication.CreateBuilder(args);
// Enable MCP middleware
builder.Services.AddMcp();
builder.Services.AddCors(options => options.AddPolicy("MCP", p =>
p.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()
));
var app = builder.Build();
app.UseCors("MCP");
app.MapMcp("/api/mcp"); // Expose MCP endpoint
app.Run();
Use GitHub Copilot for .NET Modernization
GitHub Copilot app modernization is a GitHub Copilot agent that helps upgrade projects to newer versions of .NET and migrate .NET applications to Azure quickly and confidently, and starting with Visual Studio 2022 17.14.16, the GitHub Copilot app modernization agent is included with Visual Studio .
Supported Scenarios
Predefined tasks include migrating to Managed Identity based databases on Azure (SQL DB, SQL MI, PostgreSQL), moving file I/O operations to Azure File Storage, and replacing on-premises object storage with Azure Blob Storage .
Quick Start
# In Visual Studio 2022 17.14.16+
# Right-click your project → Modernize
# Or open Copilot Chat and type: @modernize Migrate to Azure
Each major step in the upgrade process is committed to the local Git repository, and when the upgrade completes, a report is generated that describes every step of the upgrade, with Git commits for every portion .
Optimize Costs with Azure Copilot
Microsoft Copilot in Azure can help you analyze, estimate and optimize cloud costs by asking questions using natural language to get information and recommendations based on Microsoft Cost Management .
For OpenAI token-based models, Microsoft Copilot in Azure can provide simulations that estimate your costs for increasing or decreasing usage, and you can also get estimates for changes to your OpenAI-token based models, such as moving from GPT-35-Turbo to GPT-4 .
Build AI Agents with Semantic Kernel
Semantic Kernel is an open-source SDK that integrates and orchestrates AI models and services like OpenAI, Azure OpenAI, and Hugging Face with conventional programming languages like C#, Python, and Java, and benefits enterprise developers by streamlining integration of AI capabilities into existing applications .
Install and Configure
dotnet add package Microsoft.SemanticKernel
dotnet add package Microsoft.SemanticKernel.Connectors.OpenAI
using Microsoft.SemanticKernel;
var builder = Kernel.CreateBuilder();
builder.AddAzureOpenAIChatCompletion(
deploymentName: "gpt-4",
endpoint: "https://your-resource.openai.azure.com/",
apiKey: "your-api-key"
);
var kernel = builder.Build();
Semantic Kernel’s Vector stores provide abstractions over embedding models, vector databases, and other data to simplify context management, and are agnostic to the underlying LLM or vector database, offering a uniform developer experience, with memory features configurable to store data in Azure AI Search and Azure Cache for Redis .
Watch for API Deprecations
Azure has announced the retirement of Assistants API v1 on July 19, 2025, and migrating to v2 will be necessary, however v2