cCoder.AI
2026.8.28.2209
dotnet add package cCoder.AI --version 2026.8.28.2209
NuGet\Install-Package cCoder.AI -Version 2026.8.28.2209
<PackageReference Include="cCoder.AI" Version="2026.8.28.2209" />
<PackageVersion Include="cCoder.AI" Version="2026.8.28.2209" />
<PackageReference Include="cCoder.AI" />
paket add cCoder.AI --version 2026.8.28.2209
#r "nuget: cCoder.AI, 2026.8.28.2209"
#:package cCoder.AI@2026.8.28.2209
#addin nuget:?package=cCoder.AI&version=2026.8.28.2209
#tool nuget:?package=cCoder.AI&version=2026.8.28.2209
cCoder.AI
View the latest main-branch code coverage report
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.AddPeerLlm("peer-llm", provider =>
{
provider.ApiKey = configuration["PEERLLM_API_KEY"];
provider.Model = "LLooMA2.0";
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>.
Attached PNG, JPEG, GIF, and WebP files are forwarded using each provider's
native multimodal contract: OpenAI-compatible and Azure Foundry chat endpoints
receive image_url content, Ollama receives its message images array, and
Codex CLI receives repeated --image arguments. The selected model must also
support vision. Other file types are rejected explicitly; consumers should
extract their text or use a provider-specific document API rather than silently
submitting an unsupported attachment.
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/AI/Model/Providers/{provider}/AvailablePOST /Api/AI/Model/Providers/{provider}/Import
The previous /Api/Model/... routes remain available for compatibility but
are omitted from generated API descriptions.
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, PeerLLM, 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 the complete configuration root to its
AppConfiguration, whose AI property contains the AI domain configuration.
This app has no persistence dependency; applications that combine AI with Data
domains must register those Data domains explicitly at their own composition
root. An application consuming cCoder.Core should use Core's composite API,
which deliberately composes its configured child domains recursively.
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__PeerLLM__CompletionProvider__ApiKeyAI__Providers__PeerLLM__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
- No dependencies.
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.8.28.2209 | 120 | 8/28/2026 |
| 2026.8.27.1708 | 111 | 8/27/2026 |
| 2026.8.27.1656 | 82 | 8/27/2026 |
| 2026.8.26.1035 | 143 | 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 | 166 | 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 |