Cisharpai.Azure
0.2.2
See the version list below for details.
dotnet add package Cisharpai.Azure --version 0.2.2
NuGet\Install-Package Cisharpai.Azure -Version 0.2.2
<PackageReference Include="Cisharpai.Azure" Version="0.2.2" />
<PackageVersion Include="Cisharpai.Azure" Version="0.2.2" />
<PackageReference Include="Cisharpai.Azure" />
paket add Cisharpai.Azure --version 0.2.2
#r "nuget: Cisharpai.Azure, 0.2.2"
#:package Cisharpai.Azure@0.2.2
#addin nuget:?package=Cisharpai.Azure&version=0.2.2
#tool nuget:?package=Cisharpai.Azure&version=0.2.2
Cisharpai.Azure
Azure AI provider for the Cisharpai unified LLM client library. Covers both Azure OpenAI Service and Azure AI Inference (model-as-a-service).
Features
Azure OpenAI
- Chat completions with all Azure OpenAI deployments
- Reasoning models (o1, o3, o4, GPT-5) with automatic
max_completion_tokenshandling and optionalReasoningEffort - Text embeddings (ada-002, text-embedding-3-small/large)
- JSON Mode and Structured Outputs
- Tool calling / function calling
- Vision (image file paths and base64)
- Streaming (token-by-token via SSE)
- API key and Azure AD (Entra ID) authentication
Azure AI Inference
- Chat completions with Azure AI model catalog (Phi-3, Llama-3, Mistral, etc.)
- Reasoning model detection and appropriate request formatting
- Text and image embeddings (with
IImageEmbeddingFeature) - JSON Mode and Structured Outputs
- Tool calling / function calling
- Vision (image file paths and base64)
- Streaming (token-by-token via SSE)
Quick Start — Azure OpenAI
using Cisharpai;
using Cisharpai.Models;
using Cisharpai.Azure.Extensions;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddAzureOpenAiClient(options =>
{
options.Endpoint = "https://myresource.openai.azure.com";
options.ApiKey = "YOUR_API_KEY";
options.DeploymentName = "gpt-4o";
// Optional for o1/o3/o4/gpt-5 deployments:
// options.ReasoningEffort = "low";
});
var provider = services.BuildServiceProvider();
var client = provider.GetRequiredService<IChatCompletionClient>();
var response = await client.GetChatCompletionAsync(
new ChatCompletionRequest(
Messages: [new LlmMessage(LlmRole.User, "Hello!")]));
ReasoningEffort is sent only for reasoning deployments. For provider parameters that are not typed yet, or to override a typed value per request, use ChatCompletionRequest.ExtraParameters; it deep-merges into the final JSON request.
Quick Start — Azure AI Inference
services.AddAzureAiInferenceChatCompletion(options =>
{
options.Endpoint = "https://mymodel.eastus.models.ai.azure.com";
options.ApiKey = "YOUR_API_KEY";
options.ModelId = "Phi-3-mini-4k-instruct";
});
Authentication
Both API key and Azure AD (Bearer token) authentication are supported. Omit ApiKey to use Azure.Identity DefaultAzureCredential with scope https://cognitiveservices.azure.com/.default.
Keyed Services
.NET 8 keyed DI is supported for registering multiple clients:
services.AddAzureOpenAiClient("gpt4o", options => { /* ... */ });
services.AddAzureOpenAiClient("gpt4mini", options => { /* ... */ });
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Azure.Identity (>= 1.13.2)
- Cisharpai (>= 0.2.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http.Resilience (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
-
net8.0
- Azure.Identity (>= 1.13.2)
- Cisharpai (>= 0.2.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http.Resilience (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0-alpha.12.202 | 39 | 5/19/2026 |
| 0.3.0-alpha.11.197 | 41 | 5/15/2026 |
| 0.3.0-alpha.10.196 | 55 | 5/15/2026 |
| 0.3.0-alpha.9.186 | 53 | 5/8/2026 |
| 0.3.0-alpha.8.185 | 49 | 5/8/2026 |
| 0.3.0-alpha.7.164 | 42 | 5/6/2026 |
| 0.3.0-alpha.6.161 | 50 | 5/6/2026 |
| 0.3.0-alpha.5.159 | 39 | 5/6/2026 |
| 0.3.0-alpha.5.155 | 38 | 5/6/2026 |
| 0.3.0-alpha.4.156 | 45 | 5/6/2026 |
| 0.3.0-alpha.4.154 | 39 | 5/6/2026 |
| 0.3.0-alpha.3.150 | 45 | 4/30/2026 |
| 0.3.0-alpha.2.145 | 39 | 4/30/2026 |
| 0.2.2 | 97 | 4/30/2026 |
| 0.2.2-beta.1.147 | 42 | 4/30/2026 |
| 0.2.2-beta.1.146 | 48 | 4/30/2026 |
| 0.2.1 | 92 | 4/30/2026 |
| 0.2.1-beta.1.142 | 46 | 4/30/2026 |
| 0.2.1-beta.1.140 | 46 | 4/30/2026 |
| 0.2.1-beta.1.138 | 45 | 4/30/2026 |