ReasoningModelOptions
Options & Configuration · AiDotNet.Configuration
Configures how requests are adapted before they are sent to a reasoning model.
For Beginners
Newer “reasoning” models refuse a couple of the settings ordinary chat models
accept. These options control how the library copes: which model names count as reasoning models, how hard to
ask them to think, whether to quietly drop a rejected setting or stop with an error, and where to send the
notices about what it changed. The defaults are safe; the one worth trying is
ReasoningEffort.
How It Works
The defaults reproduce the reference OpenEvolve request bodies: the built-in profile registry, no
reasoning_effort field unless one is asked for, unsupported sampling settings dropped rather than
rejected, and system messages left under the system role. The one deliberate difference is that every
dropped setting is reported, so a run can prove what it actually sent.
ReasoningEffort is the setting most callers change. Leaving it
Unspecified omits the field entirely and lets the provider choose; raising it
buys better answers on hard proposals at a real cost in latency and hidden reasoning tokens, which a search
pays on every iteration.
RewriteSystemMessageRole is off by default and should normally stay off. The reference
implementation applies no special handling to the system message for reasoning models — it builds the same
system entry for every model — and the OpenAI Chat Completions endpoint still accepts that role for the
o-series and GPT-5 families. Turn it on only for a provider that demands the newer developer role, and
name that role on the profile.
Constructors
| Constructor | Summary |
|---|---|
ReasoningModelOptions() |
Properties
| Property | Summary |
|---|---|
IReasoningModelDiagnosticSink DiagnosticSink { get; set; } |
Gets or sets where adjustment notices are sent; null keeps them in the client only. |
ReasoningEffortLevel ReasoningEffort { get; set; } |
Gets or sets the deliberation level requested, or Unspecified to send no such field. |
ReasoningModelProfileRegistry Profiles { get; set; } |
Gets or sets the profile registry used to recognise reasoning models; null uses the built-ins. |
UnsupportedChatParameterHandling UnsupportedParameterHandling { get; set; } |
Gets or sets what happens to a setting the target model does not support. |
bool Enabled { get; set; } |
Gets or sets whether reasoning-model adaptation runs at all. |
bool RewriteSystemMessageRole { get; set; } |
Gets or sets whether system messages are re-roled to the profile’s role name. |
Methods
| Method | Summary |
|---|---|
ReasoningModelOptions Clone() |
Creates an independent copy of these options. |
void Validate() |
Validates the option values. |