Function: resolveReasoningParser()
ts
function resolveReasoningParser(
option: ReasoningParserName | ReasoningParserFn | undefined,
parsers?: Partial<
Record<Exclude<ReasoningParserName, "auto" | "none">, ReasoningParserFn>
>,
opts?: ReasoningParserOptions,
): ReasoningParserFn;Defined in: src/batteries/llm/chat_common/reasoning_parsers.ts:335
Resolve a reasoningParser option (a name, 'auto', 'none', or a custom fn) to a concrete ReasoningParserFn.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
option | | ReasoningParserName | ReasoningParserFn | undefined | undefined | The option value. Defaults to 'auto' when undefined. |
parsers | Partial<Record<Exclude<ReasoningParserName, "auto" | "none">, ReasoningParserFn>> | BUNDLED_REASONING_PARSERS | Override the bundled parsers. Ignored when opts.orphanRecovery is set (the bundled family parsers are rebuilt with that setting); pass a custom option fn for full control. |
opts | ReasoningParserOptions | {} | ReasoningParserOptions; orphanRecovery defaults to true. When false, the named/auto bundled parsers are rebuilt in strict pair-only mode. |