PinkRooster.ProviderConfig 0.1.0-preview.3

This is a prerelease version of PinkRooster.ProviderConfig.
dotnet add package PinkRooster.ProviderConfig --version 0.1.0-preview.3
                    
NuGet\Install-Package PinkRooster.ProviderConfig -Version 0.1.0-preview.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PinkRooster.ProviderConfig" Version="0.1.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PinkRooster.ProviderConfig" Version="0.1.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="PinkRooster.ProviderConfig" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PinkRooster.ProviderConfig --version 0.1.0-preview.3
                    
#r "nuget: PinkRooster.ProviderConfig, 0.1.0-preview.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PinkRooster.ProviderConfig@0.1.0-preview.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PinkRooster.ProviderConfig&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PinkRooster.ProviderConfig&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Tool

PinkRooster logo

PinkRooster.ProviderConfig

Configuration-driven provider setup for Microsoft.Extensions.AI chat clients: a provider type registry, a chat client factory and configuration validation.

Status: preview (0.1.0-preview.3), developed against the .NET 10 SDK.

dotnet add package PinkRooster.ProviderConfig --prerelease

Quickstart

using PinkRooster.ProviderConfig;

services.AddProviderConfig()
    .AddChatClient("openai", "gpt-5-mini");

Model Defaults Configuration

Default generation parameters can be declared per model under Providers:<id>:Models:<modelId>:

{
  "Providers": {
    "openai": {
      "Type": "openai",
      "ApiKey": "sk-...",
      "Models": {
        "gpt-5": {
          "Temperature": 0.2,
          "ReasoningEffort": "High",
          "MaxOutputTokens": 4096,
          "AdditionalProperties": {
            "custom_budget_tokens": 2048
          }
        },
        "gpt-5-mini": {
          "Temperature": 0.7,
          "ReasoningEffort": "Low"
        }
      }
    }
  }
}

Supported settings are Temperature (0–2), ReasoningEffort (a defined Microsoft.Extensions.AI.ReasoningEffort value), MaxOutputTokens (positive), TopP (0–1), TopK (positive), FrequencyPenalty and PresencePenalty (−2–2), Seed, StopSequences, and AdditionalProperties. Invalid settings fail startup validation with the provider, model, and property path.

Model IDs are case-insensitive. Every call selects defaults using ChatOptions.ModelId when supplied, otherwise the model ID used to create the client. Unlisted models receive no defaults. Both normal and streaming calls use this behavior; non-chat clients are unaffected.

When an IChatClient is resolved via IChatClientFactory or AddChatClient, it automatically uses these configured defaults. Any option supplied by the caller at invocation time overrides the configured default, including zero temperature. Caller options are cloned before defaults are merged. AdditionalProperties are merged by key, with caller keys taking precedence.

An explicit empty StopSequences list disables configured stop sequences. Only a null list receives defaults. Floating-point generation settings must be finite and within their documented ranges.

Configuration stores scalar values as strings. For model AdditionalProperties, boolean values are converted to bool, integers to long, and other finite numbers to double, using invariant culture. Other values remain strings, and null values remain null. This conversion also applies to quoted numeric or boolean strings. To pass a literal string such as "2048" or "true", set that property through the builder's Configure callback, which runs after configuration binding.

Compatibility

.NET 10. Depends on Microsoft.Extensions.AI.Abstractions.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on PinkRooster.ProviderConfig:

Package Downloads
PinkRooster.ProviderConfig.OpenAI

The openai and openai_responses provider types for PinkRooster.ProviderConfig: the Chat Completions and Responses APIs of OpenAI or a compatible service.

PinkRooster.ProviderConfig.Anthropic

The anthropic provider type for PinkRooster.ProviderConfig: the Messages API of Anthropic or a compatible service.

PinkRooster.ProviderConfig.Jev

The jev provider type for PinkRooster.ProviderConfig: the Jev System One API of TypeSafe, through Jev.Net.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.3 51 10/26/2026
0.1.0-preview.2 69 10/24/2026
0.1.0-preview.1 69 10/24/2026