Skip to main content

Crate bamboo_llm

Crate bamboo_llm 

Source
Expand description

LLM provider abstraction and integration for Bamboo.

Re-exports§

pub use cache::CacheTtl;
pub use cache::PromptCachePlan;
pub use error::ProxyAuthRequiredError;
pub use model_catalog::ModelCatalogService;
pub use prompt_ir::Continuation;
pub use prompt_ir::PromptIR;
pub use prompt_ir::Segment;
pub use prompt_ir::SegmentRole;
pub use protocol::AnthropicProtocol;
pub use protocol::FromProvider;
pub use protocol::GeminiProtocol;
pub use protocol::OpenAIProtocol;
pub use protocol::ProtocolError;
pub use protocol::ProtocolResult;
pub use protocol::ToProvider;
pub use provider::LLMError;
pub use provider::LLMProvider;
pub use provider::LLMRequestOptions;
pub use provider::LLMStream;
pub use provider_factory::create_provider;
pub use provider_factory::create_provider_by_name;
pub use provider_factory::create_provider_with_dir;
pub use provider_factory::validate_provider_config;
pub use provider_factory::AVAILABLE_PROVIDERS;
pub use provider_registry::ProviderRegistry;
pub use providers::AnthropicProvider;
pub use providers::CopilotProvider;
pub use providers::GeminiProvider;
pub use providers::OpenAIProvider;
pub use resolved_model::ResolvedModel;
pub use router::ProviderModelRouter;
pub use types::LLMChunk;
pub use models::*;

Modules§

api
cache
Provider-agnostic prompt caching.
error
Error types for LLM operations.
http_client
Shared HTTP client construction for LLM providers.
masking
Last-moment outbound-request masking.
model_catalog
Aggregates model lists from all configured providers into a unified ProviderCatalog.
models
LLM API request and response models.
prompt_ir
PromptIR — bamboo’s rich, provider-AGNOSTIC canonical request.
protocol
Protocol conversion traits and types.
provider
LLM provider trait and types
provider_factory
Provider Factory
provider_registry
Multi-provider registry that holds one initialized LLMProvider per configured provider.
providers
LLM Providers
resolved_model
router
Routes a ProviderModelRef to the correct LLMProvider from the registry.
types

Structs§

Config
Main configuration structure for Bamboo agent