Arcana::AI::Chat::Response
Constructors
Parse from an OpenAI-compatible JSON response body.
Instance methods
Server-side tool results (e.g. web_search results).
Chain-of-thought / reasoning fields, when the model supports them.
thinking_content — the raw reasoning text if the provider
surfaces it (Anthropic extended thinking, Gemini with
includeThoughts). OpenAI o-series never surfaces the reasoning
itself, so this stays nil for OpenAI even when reasoning ran.
reasoning_tokens — the token count the model spent on
reasoning, when reported (OpenAI's
completion_tokens_details.reasoning_tokens, Anthropic's cached
thinking budget). Useful for cost tracking.
Chain-of-thought / reasoning fields, when the model supports them.
thinking_content — the raw reasoning text if the provider
surfaces it (Anthropic extended thinking, Gemini with
includeThoughts). OpenAI o-series never surfaces the reasoning
itself, so this stays nil for OpenAI even when reasoning ran.
reasoning_tokens — the token count the model spent on
reasoning, when reported (OpenAI's
completion_tokens_details.reasoning_tokens, Anthropic's cached
thinking budget). Useful for cost tracking.
Find the first tool call matching a given function name.