ReasoningMap
Namespace: Vercel.AI.ProviderUtils
public static class ReasoningMapMaps reasoning levels onto provider effort and token budgets.
Inheritance: object
Methods
Section titled “Methods”IsCustomReasoning(string?)
Section titled “IsCustomReasoning(string?)”public static bool IsCustomReasoning(string? reasoning)True for every reasoning value except omitted and provider-default. Maps to isCustomReasoning.
Parameters
| Name | Type | Description |
|---|---|---|
reasoning |
string |
Returns: bool
MapReasoningToProviderBudget(string, int, int, IList<ModelWarning>, int, IReadOnlyDictionary<string, double>?)
Section titled “MapReasoningToProviderBudget(string, int, int, IList<ModelWarning>, int, IReadOnlyDictionary<string, double>?)”public static int? MapReasoningToProviderBudget(string reasoning, int maxOutputTokens, int maxReasoningBudget, IList<ModelWarning> warnings, int minReasoningBudget = 1024, IReadOnlyDictionary<string, double>? budgetPercentages = null)Maps a reasoning level to a token budget. Maps to mapReasoningToProviderBudget.
Parameters
| Name | Type | Description |
|---|---|---|
reasoning |
string | |
maxOutputTokens |
int | |
maxReasoningBudget |
int | |
warnings |
IList<ModelWarning> | |
minReasoningBudget |
int | |
budgetPercentages |
IReadOnlyDictionary<string, double> |
Returns: int?
MapReasoningToProviderEffort(string, IReadOnlyDictionary<string, string>, IList<ModelWarning>)
Section titled “MapReasoningToProviderEffort(string, IReadOnlyDictionary<string, string>, IList<ModelWarning>)”public static string? MapReasoningToProviderEffort(string reasoning, IReadOnlyDictionary<string, string> effortMap, IList<ModelWarning> warnings)Maps a reasoning level through <code class=“paramref”>effortMap</code>. Maps to mapReasoningToProviderEffort.
Parameters
| Name | Type | Description |
|---|---|---|
reasoning |
string | |
effortMap |
IReadOnlyDictionary<string, string> | |
warnings |
IList<ModelWarning> |
Returns: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product