---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/transformers_js/helpers/interfaces/ReasoningParserOptions.md
description: Options shared by the bundled reasoning parsers.
---

# Interface: ReasoningParserOptions

Defined in: [src/batteries/llm/chat\_common/reasoning\_parsers.ts:59](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/reasoning_parsers.ts#L59)

Options shared by the bundled reasoning parsers.

## Remarks

`orphanRecovery` (default `true`) controls whether an **unpaired** reasoning marker is recovered by
inferring the missing half from the pseudo-streaming order, rather than being left to leak into the
visible answer. A real-world gemma-4-E4B WebGPU quant "randomly emits `</think>`" with no matching
open; because generation is start→end, a lone close implies the block opened at the previous close
(or start-of-output), and a lone open with no close implies reasoning ran to end-of-stream. Turn this
off for strict pair-only behaviour (markers without a matching partner are left verbatim).

## Properties

| Property                                               | Type      | Description                                                              | Defined in                                                                                                                                                          |
| ------------------------------------------------------ | --------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `orphanRecovery?` | `boolean` | Recover unpaired markers by inferring the missing half (default `true`). | [src/batteries/llm/chat\_common/reasoning\_parsers.ts:61](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/reasoning_parsers.ts#L61) |
