AnthropicProviderOptions
AgentPrism.Anthropic.dllAgentPrism’s Anthropic (Claude) provider settings.
public sealed class AnthropicProviderOptionsInheritance
Section titled “Inheritance”object ← AnthropicProviderOptions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”This type is deliberately a class, not a record: a record’s
generated ToString would print every property and a single log line
would expose the API key.
Validation is done by hand in AnthropicProviderOptionsValidator;
DataAnnotations relies on reflection and breaks AOT compatibility.
Constructors
Section titled “Constructors”AnthropicProviderOptions()
Section titled “ AnthropicProviderOptions()”public AnthropicProviderOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The full path of the configuration section settings are read from.
public const string SectionName = "AgentPrism:Providers:Anthropic"Field Value
Section titled “Field Value”Properties
Section titled “Properties”ApiKey
Section titled “ ApiKey”Anthropic API key.
public string? ApiKey { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This value is a secret and is never written to a file. Use
dotnet user-secrets, an environment variable, or a secret manager.
The key is never written to the database, never returned from the API, and
never shown in the UI, under any condition.
DefaultMaxOutputTokens
Section titled “ DefaultMaxOutputTokens”The upper bound used when ModelBinding.MaxOutputTokens is not given.
public int DefaultMaxOutputTokens { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The Anthropic Messages API requires max_tokens; it is not an
optional field like in OpenAI. Because of this, AgentPrism carries a
default and the default cannot be null.
The value bounds output generation, not tokens actually spent. Even so, a
very high limit is treated by some providers as a “worst case” cost (see
the HTTP 402 encountered with OpenRouter).
DefaultModel
Section titled “ DefaultModel”The model name used when ModelBinding.Model is left empty.
public string? DefaultModel { get; set; }Property Value
Section titled “Property Value”Endpoint
Section titled “ Endpoint”The request address. When null, Anthropic’s own address is used. Filled in for setups behind a proxy or gateway.
public Uri? Endpoint { get; set; }Property Value
Section titled “Property Value”Uri?
MaxRetries
Section titled “ MaxRetries”How many times the SDK automatically retries a request. When null, the library default is used.
public int? MaxRetries { get; set; }Property Value
Section titled “Property Value”int?
Remarks
Section titled “Remarks”The circuit breaker looks at failure of the AI.IChatClient
level, not the raw request count; this setting does not affect it. However,
if a test measures raw request count, this value must be set to 0.
Models
Section titled “ Models”The model catalog shown to the UI.
public IList<ModelDescriptor> Models { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”AgentPrism carries no built-in model list; the catalog comes entirely from here. This list is not a validation list: a model name absent from it can still be used.
Timeout
Section titled “ Timeout”The upper time limit for a single request. When null, the library default is used.
public TimeSpan? Timeout { get; set; }