AiBackendResponse

References
public sealed class AiBackendResponse
What the backend returned for a single turn. Either text (the model declined to call a tool) or a structured tool call. Exactly one of Text and ToolCall is populated.

Properties

IgnoredParallelToolCalls

#
Count of additional parallel tool calls present in the same response that we silently dropped (we only process one tool call per turn). When this is large, the model is going haywire -- the host counts these against the docs-lookup budget so a runaway response aborts the conversation quickly instead of grinding through one call at a time.
public int IgnoredParallelToolCalls { get; }

ReasoningContent

#
Chain-of-thought produced by a reasoning-mode model, or null if the provider didn't return one. Must be echoed back to the API on the next turn for thinking-mode models (DeepSeek V4 thinking, OpenAI o-series), otherwise the request is rejected.
public string ReasoningContent { get; }

Text

#
The model's plain-text response, or null if it called a tool.
public string Text { get; }

ToolCall

#
The tool the model invoked, or null if it returned text.
public AiToolCall ToolCall { get; }

Methods

FromText

#
public static AiBackendResponse FromText(
text,
reasoningContent
)

FromText

#
public static AiBackendResponse FromText(
text
)

FromToolCall

#
public static AiBackendResponse FromToolCall(
call,
ignoredParallelCalls,
reasoningContent
)

FromToolCall

#
public static AiBackendResponse FromToolCall(
call,
ignoredParallelCalls
)

FromToolCall

#
public static AiBackendResponse FromToolCall()