cCoder.AI
2026.7.30.48
See the version list below for details.
dotnet add package cCoder.AI --version 2026.7.30.48
NuGet\Install-Package cCoder.AI -Version 2026.7.30.48
<PackageReference Include="cCoder.AI" Version="2026.7.30.48" />
<PackageVersion Include="cCoder.AI" Version="2026.7.30.48" />
<PackageReference Include="cCoder.AI" />
paket add cCoder.AI --version 2026.7.30.48
#r "nuget: cCoder.AI, 2026.7.30.48"
#:package cCoder.AI@2026.7.30.48
#addin nuget:?package=cCoder.AI&version=2026.7.30.48
#tool nuget:?package=cCoder.AI&version=2026.7.30.48
cCoder.AI
cCoder.AI is a named-provider inference broker. Applications register every AI endpoint once, then select a provider by its key on each completion or agent request.
builder.Services.AddAIWeb(ai =>
{
ai.DefaultProvider = "local";
ai.AddOllama("local", provider =>
{
provider.Endpoint = "http://localhost:11434";
provider.Model = "qwen3.5:4b";
provider.MaxConcurrency = 1;
});
ai.AddOllama("desktop", provider =>
{
provider.Endpoint = "http://desktop:11434";
provider.Model = "gpt-oss:20b";
provider.MaxConcurrency = 1;
});
ai.AddOpenAI("open-ai", provider =>
{
provider.ApiKey = configuration["OPENAI_API_KEY"];
provider.Model = "gpt-5.6-luna";
provider.MaxConcurrency = 8;
});
ai.AddFoundry("foundry", provider =>
{
provider.Endpoint = configuration["FOUNDRY_COMPLETION_ENDPOINT"];
provider.ModelEndpoint = configuration["FOUNDRY_MODEL_ENDPOINT"];
provider.ApiKey = configuration["FOUNDRY_API_KEY"];
provider.Model = configuration["FOUNDRY_MODEL"];
provider.MaxConcurrency = 8;
});
ai.AddCodex("codex", provider =>
{
// Uses the Codex CLI's existing ChatGPT or API-key login.
provider.Model = "gpt-5.6-luna";
provider.ReasoningEffort = "low";
provider.MaxConcurrency = 1;
});
});
The registration key (local, desktop, open-ai, or foundry above) is the provider value supplied to ICompletionProviderService and IAgentOrchestrationService requests.
Consumer exposure
Consumers should use ChatContext as the high-level inference boundary. It
accepts a ChatRequest, supports attached image paths and agent tools, and can
either return a complete response or stream inference tokens:
ChatContext chat = serviceProvider.GetRequiredService<ChatContext>();
AgentRunResponse response = await chat.InferAsync(new ChatRequest
{
Instructions = "Describe the attached image.",
Provider = "codex",
InputFilePaths = [imagePath]
});
Use InferAsStreamAsync for an IAsyncEnumerable<AgentStreamTokenResponse>.
AddAIWeb registers the exposure and the library-owned MVC application part.
Applications that map controllers consequently receive:
POST /Api/AI/CompletionsPOST /Api/AI/AgentsPOST /Api/AI/Agents/StreamPOST /Api/AI/ChatPOST /Api/AI/Chat/StreamGET /Api/Model/Providers/{provider}/AvailablePOST /Api/Model/Providers/{provider}/Import
The included web application contains only UI-facing controller actions. Its
API controllers are supplied by cCoder.AI, so another host receives the same
API surface by referencing and configuring the package.
Provider concurrency is enforced inside cCoder.AI, independently for each key. Transient HTTP 408, 429, and 5xx responses are retried using provider retry settings and Retry-After headers when supplied. Application-level schedulers may impose lower workload concurrency, but cannot exceed the provider cap during inference.
The Codex provider runs non-interactive codex exec requests in ephemeral, read-only mode. Set ExecutablePath in the Codex provider configuration when the CLI is not on PATH; Codex desktop installations are discovered automatically. To route Codex through a local model instead, set UseOss = true and LocalProvider = "ollama".
Applications can query IModelManagerService.GetProviderCapabilities(key) for the provider's declared concurrency limit and model-listing support, then call RetrieveAvailableModelsAsync(key) when listing is supported. This keeps provider/model selection and worker controls capability-driven in consuming applications.
The sample web application exposes every completion provider currently implemented by the library: Ollama, OpenAI-compatible, Azure AI Foundry, and Codex CLI. Keys and endpoints remain configuration-driven; secrets should be provided through environment variables or another configuration provider.
Local configuration
The sample application binds an AIWebConfiguration root containing the AI
domain section. Keep provider secrets empty in appsettings.json and provide
them through structured user- or machine-level environment variables:
AI__Providers__Ollama__CompletionProvider__ApiKeyAI__Providers__Ollama__ModelProvider__ApiKeyAI__Providers__AzureFoundry__CompletionProvider__ApiKeyAI__Providers__AzureFoundry__ModelProvider__ApiKeyAI__Providers__OpenAI__CompletionProvider__ApiKeyAI__Providers__OpenAI__ModelProvider__ApiKeyAI__Providers__Codex__CompletionProvider__ApiKeyAI__Providers__Codex__ModelProvider__ApiKey
Only define variables for configured providers that require credentials. Restart Visual Studio after changing user- or machine-level variables, then run the application with F5. No local secrets file or configuration conversion step is required.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- cCoder.CodeAnalysis (>= 2026.7.29.2324)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on cCoder.AI:
| Package | Downloads |
|---|---|
|
cCoder.Core
cCoder.Core |
|
|
cCoder.ClientRelationshipManagement
Tenant-scoped CRM domain for client acquisition, relationship management, and onboarding handoff. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.9.8.2218 | 0 | 9/8/2026 |
| 2026.9.8.2201 | 0 | 9/8/2026 |
| 2026.8.28.2209 | 129 | 8/28/2026 |
| 2026.8.27.1708 | 113 | 8/27/2026 |
| 2026.8.27.1656 | 83 | 8/27/2026 |
| 2026.8.26.1035 | 144 | 8/26/2026 |
| 2026.8.5.30 | 385 | 8/4/2026 |
| 2026.8.4.2319 | 143 | 8/4/2026 |
| 2026.8.3.1800 | 250 | 8/3/2026 |
| 2026.8.2.1340 | 167 | 8/2/2026 |
| 2026.8.2.1226 | 101 | 8/2/2026 |
| 2026.8.1.1632 | 240 | 8/1/2026 |
| 2026.8.1.1239 | 104 | 8/1/2026 |
| 2026.8.1.1210 | 120 | 8/1/2026 |
| 2026.7.30.1717 | 307 | 7/30/2026 |
| 2026.7.30.48 | 97 | 7/29/2026 |
| 2026.7.29.143 | 151 | 7/29/2026 |
| 2026.7.28.2359 | 102 | 7/28/2026 |
| 2026.7.27.750 | 122 | 7/27/2026 |