PinkRooster.ProviderConfig 0.1.0-preview.6

This is a prerelease version of PinkRooster.ProviderConfig.
dotnet add package PinkRooster.ProviderConfig --version 0.1.0-preview.6
                    
NuGet\Install-Package PinkRooster.ProviderConfig -Version 0.1.0-preview.6
                    
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.6" />
                    
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.6" />
                    
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.6
                    
#r "nuget: PinkRooster.ProviderConfig, 0.1.0-preview.6"
                    
#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.6
                    
#: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.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PinkRooster.ProviderConfig&version=0.1.0-preview.6&prerelease
                    
Install as a Cake Tool

PinkRooster logo

PinkRooster.ProviderConfig

Configuration-driven setup for Microsoft.Extensions.AI chat clients and text embedding generators. The core provides a type registry, client factories, and startup validation without depending on any provider SDK.

Status: preview (0.1.0-preview.6). Targets .NET 10.

dotnet add package PinkRooster.ProviderConfig --prerelease

Quickstart

Install and register an adapter alongside the core to use a built-in provider type. Start with the runnable OpenAI quickstart, or see the adapter list. To register your own provider instead, use AddProviderType<TClient>.

SDK retry limits

Providers:<id>:MaxRetries (or ProviderOptions.MaxRetries in code) caps additional SDK attempts per request, not total attempts. Omit it or set it to null to leave the SDK policy unchanged. Set it to 0 to disable SDK retries, or a positive integer to cap retries on failures the SDK considers retryable.

Among built-in types, only openai_embedding and openai_embeddings support it. An explicit value on any type that has not opted in, or a negative or malformed value, fails startup validation.

Model Defaults Configuration

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

{
  "Providers": {
    "openai": {
      "Type": "openai",
      "Models": {
        "gpt-4.1-mini": {
          "Temperature": 0.2,
          "MaxOutputTokens": 4096
        }
      }
    }
  }
}

Supply Providers:openai:ApiKey separately through .NET configuration, for example using the Providers__openai__ApiKey environment variable.

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 chat calls use this behavior.

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.

Embedding dimensions

For OpenAI embedding providers, set Providers:<id>:Models:<modelId>:Dimensions to request a specific vector length. The value must be a positive integer; the upstream model must support it. This setting is separate from the chat defaults above. See the embeddings walkthrough.

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.6 71 11/21/2026
0.1.0-preview.5 69 11/21/2026
0.1.0-preview.4 67 11/20/2026
0.1.0-preview.3 92 10/26/2026
0.1.0-preview.2 124 10/24/2026
0.1.0-preview.1 88 10/24/2026