Skip to content

AgentPrismModelConcurrencyOptions

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Defines the outgoing concurrency limit applied per model provider.

public sealed class AgentPrismModelConcurrencyOptions

objectAgentPrismModelConcurrencyOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The goal is to avoid producing a burst of 429 responses in the first place; the circuit breaker only reacts once a provider is already failing. A request over the limit waits (bounded by its own cancellation token) instead of being rejected immediately — rejecting outright would turn a short traffic spike into the very failures this option exists to prevent.

Unlimited by default: today’s behavior is preserved exactly when this is not configured, and the hot path allocates nothing extra.

public AgentPrismModelConcurrencyOptions()

Gets or sets the maximum concurrent outgoing calls allowed per provider. null means unlimited.

public int? MaxConcurrentCallsPerProvider { get; set; }

int?