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

#
public int IgnoredParallelToolCalls { get; }
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.

ReasoningContent

#
public string ReasoningContent { get; }
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.

Text

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

ToolCall

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

Methods

FromText

#
public static AiBackendResponse FromText(string text, string reasoningContent)
text (string)
reasoningContent (string)

FromText

#
public static AiBackendResponse FromText(string text)
text (string)

FromToolCall

#
public static AiBackendResponse FromToolCall(AiToolCall call, int ignoredParallelCalls, string reasoningContent)
call (AiToolCall)
ignoredParallelCalls (int)
reasoningContent (string)

FromToolCall

#
public static AiBackendResponse FromToolCall(AiToolCall call, int ignoredParallelCalls)
call (AiToolCall)
ignoredParallelCalls (int)

FromToolCall

#
public static AiBackendResponse FromToolCall(AiToolCall call)
call (AiToolCall)