Skip to main content

Module llm

Module llm 

Source
Expand description

Provider-neutral conversation types shared by routing, clients, and translation.

Debug output redacts MCP URLs and authorization tokens and hides raw provider tool definitions, extensions, and preserved bodies. Conversation content, including unknown provider blocks, remains visible and may contain secrets. Serialization retains the stored values.

Structs§

AggLlmResponse
Normalized, fully-buffered response — the aggregate of a completed generation. This is the terminal form of a streamed LlmResponse.
InputCacheUsage
Optional cache-token detail kept out of the common, cache-free usage allocation.
InstructionBlock
Instruction content separated from normal conversation messages.
LlmRequest
Normalized request representation shared by Switchyard components.
McpListedTool
A tool discovered on an MCP server.
McpToolConfig
Settings for an individual MCP tool or the defaults for a toolset.
McpToolset
Configuration for a URL-based remote MCP toolset.
Message
One normalized conversation message.
OutputParams
Output budget and structured-output options.
PreservationMetadata
Exact source payloads retained for lossless same-format round trips.
ProviderExtensions
Provider-specific fields that do not have first-class conversation fields.
ReasoningParams
Provider reasoning controls preserved by translation.
ResponseOutput
One assistant output item in a normalized response.
SamplingParams
Provider sampling parameters with common cross-provider names.
ToolCall
Normalized assistant tool call.
ToolDefinition
Normalized tool definition.
ToolResult
Normalized tool result message content.
UrlCitation
A source URL cited by generated text.
Usage
Normalized token usage counts.

Enums§

ContentBlock
Normalized content block variants carried by messages and tool results.
FileSource
File payload forms supported by the conversation model.
ImageSource
Image payload forms supported by the conversation model.
McpContent
MCP discovery and execution history. Results reference the matching call’s server identity.
MediaSource
Audio and video payload forms supported by the conversation model.
Role
Actor role normalized across provider APIs.
StopReason
Normalized reason a model stopped producing output.
Tool
A tool available to the model, in catalog order.
ToolChoice
Normalized tool choice policy.