Skip to content

OpenAIModelCatalog

Namespace AgentPrism · Assembly AgentPrism.OpenAI.dll

Builds the catalog shown in the user interface from the model definitions in the provider options.

public static class OpenAIModelCatalog

objectOpenAIModelCatalog

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

AgentPrism carries no built-in model list. This is a deliberate decision: OpenAI model names and prices change much faster than a NuGet package is released. A list embedded in code becomes misleading in a short time.

Measured: an earlier built-in list contained none of the models a real account could reach; a call to gpt-4.1-mini from that list returned HTTP 403 model_not_found.

The catalog comes from the OpenAIProviderOptions.Models option. The catalog is not a validation list: a model name that is absent here can still be used, and the provider sends the request to OpenAI as it is. The catalog only feeds the model picker screen and the cost calculation of the user interface.

"AgentPrism": { "Providers": { "OpenAI": {
"Models": [
{ "Name": "gpt-5.4-mini", "ContextWindowTokens": 400000, "InputCostPerMillionTokens": 0.25 }
]
}}}

Builds the catalog from the model definitions in the options.

public static IReadOnlyList<ModelDescriptor> Build(OpenAIProviderOptions options)

options OpenAIProviderOptions

Provider options.

IReadOnlyList<ModelDescriptor>

The models ordered by name. An empty list when there is no definition.

When the same name is defined more than once, the last definition wins. The comparison is case insensitive. Entries without a name are ignored.

ArgumentNullException

options is null.