Microsoft.Extensions.AI 9.1.0-preview.1.25064.3

Microsoft.Extensions.AI

Provides utilities for working with generative AI components.

Install the package

From the command-line:

dotnet add package Microsoft.Extensions.AI

Or directly in the C# project file:

<ItemGroup>
  <PackageReference Include="Microsoft.Extensions.AI" Version="[CURRENTVERSION]" />
</ItemGroup>

Usage Examples

Please refer to the README for the Microsoft.Extensions.AI.Abstractions package.

Feedback & Contributing

We welcome feedback and contributions in our GitHub repo.

Running the integration tests

If you're working on this repo and want to run the integration tests, e.g., those in Microsoft.Extensions.AI.OpenAI.Tests, you must first set endpoints and keys. You can either set these as environment variables or - better - using .NET's user secrets feature as shown below.

Configuring OpenAI tests (OpenAI)

Run commands like the following. The settings will be saved in your user profile.

cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
dotnet user-secrets set OpenAI:Mode OpenAI
dotnet user-secrets set OpenAI:Key abcdefghijkl

Optionally also run the following. The values shown here are the defaults if you don't specify otherwise:

dotnet user-secrets set OpenAI:ChatModel gpt-4o-mini
dotnet user-secrets set OpenAI:EmbeddingModel text-embedding-3-small

Configuring OpenAI tests (Azure OpenAI)

Run commands like the following. The settings will be saved in your user profile.

cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
dotnet user-secrets set OpenAI:Mode AzureOpenAI
dotnet user-secrets set OpenAI:Endpoint https://YOUR_DEPLOYMENT.openai.azure.com/
dotnet user-secrets set OpenAI:Key abcdefghijkl

Optionally also run the following. The values shown here are the defaults if you don't specify otherwise:

dotnet user-secrets set OpenAI:ChatModel gpt-4o-mini
dotnet user-secrets set OpenAI:EmbeddingModel text-embedding-3-small

Your account must have models matching these names.

Configuring Azure AI Inference tests

Run commands like the following. The settings will be saved in your user profile.

cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
dotnet user-secrets set AzureAIInference:Endpoint https://YOUR_DEPLOYMENT.azure.com/
dotnet user-secrets set AzureAIInference:Key abcdefghijkl

Optionally also run the following. The values shown here are the defaults if you don't specify otherwise:

dotnet user-secrets set AzureAIInference:ChatModel gpt-4o-mini
dotnet user-secrets set AzureAIInference:EmbeddingModel text-embedding-3-small

Showing the top 20 packages that depend on Microsoft.Extensions.AI.

Packages Downloads
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
9
Radzen.Blazor
Radzen Blazor is the most sophisticated free UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Charts, Pivot, Gantt and Spreadsheet, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and advanced theming with full support for Material Design and Fluent UI.
8
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
8
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
7
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use, with no license key, app limit or revenue limit) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
7
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
6
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use, with no license key, app limit or revenue limit) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
6
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
5
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use, with no license key, app limit or revenue limit) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
5
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
3
Radzen.Blazor
Radzen Blazor is the most sophisticated free and open-source (MIT, including commercial use, with no license key, app limit or revenue limit) UI component library for Blazor, featuring 155+ native components including DataGrid, Scheduler, Gantt, PivotDataGrid, an Excel-like Spreadsheet with formulas and XLSX import/export, and 30+ chart types drawn in C# as SVG, the most complete AI toolkit for Blazor - AIChat with tool calling, approvals and attachments, AIPrompt, InlineAIPrompt and SmartPasteButton on Microsoft.Extensions.AI, working with any OpenAI-compatible provider - and free Material, Standard, Default, Humanistic and Software themes in light and dark.
3

Version Downloads Last updated
11.0.1 0 11/21/2026
11.0.0 0 11/10/2026
10.11.1 0 11/20/2026
10.11.0 8 10/18/2026
10.10.0 7 10/21/2026
10.9.0 9 10/20/2026
10.8.3 7 10/20/2026
10.8.1 7 10/26/2026
10.8.0 7 10/20/2026
10.7.0 8 10/21/2026
10.6.0 7 10/20/2026
10.5.2 8 10/20/2026
10.5.1 7 10/21/2026
10.5.0 7 10/20/2026
10.4.1 7 10/20/2026
10.4.0 9 10/20/2026
10.3.0 9 10/22/2026
10.2.0 7 10/23/2026
10.1.1 7 10/21/2026
10.1.0 8 10/21/2026
10.0.1 6 10/21/2026
10.0.0 8 10/20/2026
9.10.2 8 10/20/2026
9.10.1 7 10/21/2026
9.10.0 9 10/21/2026
9.9.1 7 10/21/2026
9.9.0 9 10/21/2026
9.8.0 10 10/21/2026
9.7.1 8 10/21/2026
9.7.0 7 10/20/2026
9.6.0 8 10/20/2026
9.5.0 9 10/22/2026
9.5.0-preview.1.25262.9 8 10/20/2026
9.4.4-preview.1.25259.16 8 10/20/2026
9.4.3-preview.1.25230.7 8 10/21/2026
9.4.0-preview.1.25207.5 6 10/20/2026
9.3.0-preview.1.25161.3 8 10/18/2026
9.3.0-preview.1.25114.11 7 10/20/2026
9.1.0-preview.1.25064.3 7 10/20/2026
9.0.1-preview.1.24570.5 6 10/21/2026
9.0.0-preview.9.24556.5 9 10/20/2026
9.0.0-preview.9.24525.1 7 10/21/2026
9.0.0-preview.9.24507.7 8 10/20/2026