Skip to main content

Module types

Module types 

Source
Expand description

Core message and request/response types.

Structs§

CacheControl
Cache control configuration for prompt caching.
CompletionRequest
A completion request to an LLM provider.
CompletionResponse
A completion response from an LLM provider.
ContextManagement
Server-side context management configuration.
EmbeddingRequest
A request to an embedding model.
EmbeddingResponse
Response from an embedding request.
EmbeddingUsage
Token usage statistics for an embedding request.
Message
A message in a conversation.
SystemBlock
A block within a structured system prompt.
TokenUsage
Token usage statistics for a completion.
ToolAnnotations
Behavioral annotations for a tool (from MCP spec).
ToolContext
Runtime context provided to tools during execution.
ToolDefinition
Definition of a tool available to the model.
ToolOutput
Output from a tool execution.
UsageIteration
Per-iteration token usage breakdown (returned during server-side compaction).
UsageLimits
Resource usage limits for the agentic loop.

Enums§

CacheTtl
Cache time-to-live options.
ContentBlock
A content block within a message.
ContentItem
A content item within a tool result.
ContextEdit
A context editing operation.
DocumentSource
Source of a document.
ImageSource
Source of an image.
ReasoningEffort
Reasoning effort level for reasoning models.
ResponseFormat
Response format configuration.
Role
The role of a message participant.
StopReason
Reason the model stopped generating.
SystemPrompt
System prompt configuration.
ThinkingConfig
Extended thinking configuration for reasoning models.
ToolChoice
Tool selection strategy for the model.

Traits§

ProgressReporter
Reports progress for long-running tool operations.