withThinking

Create a thinking-enhanced version of this prompt runner.

Returns a PromptRunner where all operations (createObject, generateText, etc.) return ThinkingResponse wrappers that include both results and extracted thinking blocks from the LLM response.

Always check supportsThinking() first and ensure LlmOptions includes thinking configuration via withLlm(LlmOptions.withThinking(Thinking.withExtraction())).

Note: Thinking and streaming capabilities are mutually exclusive.

Return

ThinkingCapability instance providing access to thinking-aware operations

Throws

if thinking is not supported by this implementation

if thinking is not enabled in LlmOptions configuration