Expand description
Core message and request/response types.
Structs§
- Cache
Control - Cache control configuration for prompt caching.
- Completion
Request - A completion request to an LLM provider.
- Completion
Response - A completion response from an LLM provider.
- Context
Management - Server-side context management configuration.
- Embedding
Request - A request to an embedding model.
- Embedding
Response - Response from an embedding request.
- Embedding
Usage - Token usage statistics for an embedding request.
- Message
- A message in a conversation.
- System
Block - A block within a structured system prompt.
- Token
Usage - Token usage statistics for a completion.
- Tool
Annotations - Behavioral annotations for a tool (from MCP spec).
- Tool
Context - Runtime context provided to tools during execution.
- Tool
Definition - Definition of a tool available to the model.
- Tool
Output - Output from a tool execution.
- Usage
Iteration - Per-iteration token usage breakdown (returned during server-side compaction).
- Usage
Limits - Resource usage limits for the agentic loop.
Enums§
- Cache
Ttl - Cache time-to-live options.
- Content
Block - A content block within a message.
- Content
Item - A content item within a tool result.
- Context
Edit - A context editing operation.
- Document
Source - Source of a document.
- Image
Source - Source of an image.
- Reasoning
Effort - Reasoning effort level for reasoning models.
- Response
Format - Response format configuration.
- Role
- The role of a message participant.
- Stop
Reason - Reason the model stopped generating.
- System
Prompt - System prompt configuration.
- Thinking
Config - Extended thinking configuration for reasoning models.
- Tool
Choice - Tool selection strategy for the model.
Traits§
- Progress
Reporter - Reports progress for long-running tool operations.