Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

clampReasoningLevel.md

27 lines563 Bytes

function clampReasoningLevel(reasoning, level): ReasoningLevel;

Defined in: packages/ai/src/reasoning.ts:128

A level the model supports: the level itself, else the nearest supported level above it, else the nearest below it, else off. The same rule as pi.

Parameters

reasoning

ModelReasoning | undefined

level

ReasoningLevel

Returns

ReasoningLevel