OpenAIProviderOptions
AgentPrism.OpenAI.dllThe OpenAI provider options of AgentPrism.
public sealed class OpenAIProviderOptionsInheritance
Section titled “Inheritance”object ← OpenAIProviderOptions
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”Validation is written by hand inside OpenAIProviderOptionsValidator;
DataAnnotations is not used.
Constructors
Section titled “Constructors”OpenAIProviderOptions()
Section titled “ OpenAIProviderOptions()”public OpenAIProviderOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”Gets the full path of the configuration section the options are read from.
public const string SectionName = "AgentPrism:Providers:OpenAI"Field Value
Section titled “Field Value”Properties
Section titled “Properties”ApiKey
Section titled “ ApiKey”Gets or sets the OpenAI 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
user interface.
DefaultModel
Section titled “ DefaultModel”Gets or sets the model name to use when ModelBinding.Model is left empty.
public string? DefaultModel { get; set; }Property Value
Section titled “Property Value”EnableResponsesSurface
Section titled “ EnableResponsesSurface”Gets or sets a value indicating whether the Responses API surface is also enabled
for a provider registered with UseOpenAICompatible.
public bool EnableResponsesSurface { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Only UseOpenAICompatible reads it. UseOpenAI
ignores this field; the official OpenAI provider always registers both surfaces
(OpenAIProviderNames.ChatCompletions and
OpenAIProviderNames.Responses).
The default is false: most OpenAI compatible servers do not
implement the /v1/responses endpoint. When it is on, a second provider is
registered under the name {name}-responses.
Endpoint
Section titled “ Endpoint”Gets or sets the request address. When null, the OpenAI address is used. Set it for OpenAI compatible proxies.
public Uri? Endpoint { get; set; }Property Value
Section titled “Property Value”Uri?
Models
Section titled “ Models”Gets the model catalog shown in the user interface.
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. Model names and prices change much faster than the package is released.
This list is not a validation list. A model name that is absent here can still be used; the catalog only feeds the model picker screen and the cost calculation of the user interface.
Organization
Section titled “ Organization”Gets or sets the organization id. It is used by multi organization accounts.
public string? Organization { get; set; }Property Value
Section titled “Property Value”Timeout
Section titled “ Timeout”Gets or sets the upper time limit of a single request. When null, the library default is used.
public TimeSpan? Timeout { get; set; }