Skip to main content

Module types

Module types 

Source
Expand description

Core types: traits, messages, requests, responses, and errors

§Core Types

Self-contained type definitions for the CLI LLM runners library. These types mirror the LLM provider contract without requiring any external platform dependency.

Structs§

ChatMessage
A single message in a chat conversation
ChatRequest
Configuration for a chat completion request
ChatResponse
Response from a chat completion
ImagePart
An image attached to a chat message
LlmCapabilities
LLM provider capability flags using bitflags for efficient storage
McpHeader
A name/value pair for an MCP HTTP header or stdio environment variable.
McpServerConfig
An MCP server an ACP-managed provider (Copilot Headless) should connect to, exposing its tools to the model for native tool calling.
RunnerError
Error type for CLI LLM runner operations
StreamChunk
A chunk of a streaming response
TokenUsage
Token usage statistics.
ToolCallRequest
A tool call requested by the assistant
ToolDefinition
Definition of a tool that can be called by the model

Enums§

ErrorKind
Categories of errors produced by CLI runners
McpTransport
Transport an ACP-managed agent uses to reach an McpServerConfig.
MessageRole
Role of a message in the conversation
ResponseFormat
Controls the response format from the model
ToolChoice
Controls which tools the model may call
ToolStreamEvent
An event of LlmProvider::complete_stream_with_tools.

Traits§

LlmProvider
LLM provider trait for chat completion

Type Aliases§

ChatStream
Stream type for chat completion responses
ToolStream
Stream type for LlmProvider::complete_stream_with_tools