Skip to main content

Crate caliban_provider

Crate caliban_provider 

Source
Expand description

Provider-neutral message IR and the Provider trait for the caliban agent harness. Adapter crates (caliban-provider-anthropic, etc.) implement this trait for specific schema-family/transport pairs.

Re-exports§

pub use cache::CacheControl;
pub use capabilities::Capabilities;
pub use capabilities::ModelInfo;
pub use capabilities::PromptCachingCapability;
pub use capabilities::SystemPromptCapability;
pub use capabilities::ToolUseCapability;
pub use effort::Effort;
pub use error::Error;
pub use error::Result;
pub use error::is_auth_error;
pub use message::ContentBlock;
pub use message::ImageBlock;
pub use message::ImageSource;
pub use message::Message;
pub use message::Role;
pub use message::TextBlock;
pub use provider::Provider;
pub use request::CompletionRequest;
pub use request::CompletionRequestBuilder;
pub use request::RequestMetadata;
pub use request::RequestPurpose;
pub use response::CompletionResponse;
pub use response::StopReason;
pub use response::Usage;
pub use stream::MessageStream;
pub use stream::StreamEvent;
pub use stream::StreamingContentType;
pub use stream::StreamingDelta;
pub use stream::collect_message;
pub use thinking::ThinkingBlock;
pub use thinking::ThinkingConfig;
pub use thinking::ThinkingSetting;
pub use tool::Tool;
pub use tool::ToolChoice;
pub use tool::ToolResultBlock;
pub use tool::ToolUseBlock;
pub use transport::TransportErrorClass;
pub use transport::classify_reqwest_error;
pub use transport::render_source_chain;

Modules§

cache
Prompt-cache markers in the IR.
capabilities
Capability discovery types.
effort
Reasoning-effort level shared by every provider that supports a “thinking” / “reasoning” knob. Lives in caliban-provider (rather than caliban-agent-core) to keep the conversion to provider-native shapes (e.g. OpenAI reasoning.effort, Anthropic thinking.budget_tokens) reachable from each adapter crate without introducing a cyclic dependency on caliban-agent-core.
error
Cross-provider error enum.
message
Core message types: roles, messages, content blocks.
provider
The Provider trait.
request
Completion request, builder, and validation.
response
Completion response, usage, stop-reason.
stream
Streaming events.
thinking
Extended-thinking IR.
tool
Tool-use IR: declarations, calls, results.
transport
Shared classification of reqwest transport failures.