ReasoningModelProfileRegistry
Models & Types · AiDotNet.Agentic.Models.Connectors
An ordered set of reasoning-model profiles, resolved against a model id by prefix.
For Beginners
This is the phone book the library uses to decide whether the model you named is a
“reasoning” model that needs special request handling. You get a sensible built-in list for free through
Default. If you use a provider that names its reasoning models differently, build your own
registry with the prefixes it uses and pass it in the options.
How It Works
Default reproduces the reference implementation’s model list exactly: the OpenAI o-series
(o1, o3, o4-), the GPT-5 family, and the two GPT-OSS releases. Upstream keeps them in one
flat tuple of prefixes and calls str.startswith on the lower-cased model name; the split into three named
profiles here changes nothing about which ids match, and buys a name to put in a diagnostic and a place to hang
a family-specific difference should the providers ever diverge.
Two of upstream’s prefixes are redundant and are kept anyway so the match set is provably identical: a name
starting with o1 already covers o1-mini, so the separate o1- entry can never match anything
new. Note also what the list implies — an id such as o1-preview-2024-09-12 matches, but so would an
unrelated model that happens to start with those two characters, and a reasoning model published under a name
outside these prefixes will not match at all. That is the reference behaviour; supply your own registry when
you need a different rule.
Resolution scans in order and returns the first match, so a caller-supplied registry can put a narrow profile ahead of a broad one. Instances are immutable and safe to share.
Constructors
| Constructor | Summary |
|---|---|
ReasoningModelProfileRegistry(IReadOnlyList<ReasoningModelProfile> profiles) |
Initializes a registry from an ordered list of profiles. |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<ReasoningModelProfile> Profiles { get; } |
Gets the profiles in resolution order. |
ReasoningModelProfileRegistry Default { get; } |
Gets the shared registry covering the model families the reference implementation knows about. |
Methods
| Method | Summary |
|---|---|
ReasoningModelProfile Find(string modelId) |
Finds the first profile that claims a model id. |
ReasoningModelProfileRegistry CreateDefault() |
Builds a new registry containing the built-in profiles. |
bool IsReasoningModel(string modelId) |
Reports whether any profile claims a model id. |