Skip to main content

Module model

Module model 

Source
Expand description

Model provider interface and routing.

Re-exports§

pub use self::realtime::RealtimeVoiceCall;
pub use self::realtime::RealtimeVoiceCommand;
pub use self::realtime::RealtimeVoiceEvent;
pub use self::realtime::RealtimeVoiceRequest;

Modules§

anthropic
Native Anthropic Messages API provider.
deepseek
DeepSeek Responses provider.
kimi
Native Kimi Chat Completions provider.
openai
OpenAI Responses API Adapter.
openai_codex
ChatGPT-authenticated Codex Responses provider.
openai_socket
First-party OpenAI Responses WebSocket transport.
openrouter
OpenRouter Responses provider.
provider
Provider-owned setup metadata and model construction.
realtime
Provider-owned WebRTC negotiation and authenticated voice sideband control.

Structs§

CompactOutput
Durable replacement history returned by server-side compaction.
CompactRequest
Input for a provider’s native compaction endpoint.
ModelOutput
Completed output from a model response.
ModelPricing
Token rates owned by one concrete provider/model implementation.
ModelRequest
Input for one model turn.
ModelRouter
Selects a model Adapter by a stable provider ID.
PromptCacheIdentity
Provider-visible identity for one prompt-cache lineage.
ToolCall
One model-requested function call.
ToolDefinition
A function tool definition sent to a model provider.
ToolLoad
A durable control item recording tool schemas materialized at one context position.

Constants§

TOOLS_SEARCH_NAME
Stable semantic name of the core deferred-tool discovery function.

Traits§

Model
A model provider Adapter used by the agent loop.

Functions§

prompt_cache_key
Hashes a local session identity into a stable provider cache key.
tool_output
Creates a Responses API function-call-output item.
user_message
Creates a Responses API user-message item.
user_message_with_attachments
Creates a durable user message carrying opaque uploaded-file references.

Type Aliases§

ModelEventSink
Fallible synchronous callback used to forward streaming provider events.