Skip to main content

vtcode_llm/
lib.rs

1#![allow(
2    missing_docs,
3    clippy::expect_used,
4    dead_code,
5    unused_imports,
6    reason = "Intentional compatibility, platform, or test-only suppression."
7)]
8#![expect(
9    clippy::let_underscore_must_use,
10    clippy::indexing_slicing,
11    clippy::string_slice,
12    clippy::cast_possible_truncation,
13    reason = "Provider adapters intentionally mutate request JSON, maintain bounded stream buffers, and convert wire counters into protocol-sized fields."
14)]
15//! # vtcode-llm - LLM Provider Abstraction
16//!
17//! Provides a unified interface for multiple LLM providers including
18//! Gemini, OpenAI, Anthropic, Meta AI, DeepSeek, and Ollama.
19
20pub mod capabilities;
21pub mod client;
22pub mod config_adapter;
23#[cfg(feature = "copilot")]
24pub mod copilot;
25pub mod error_display;
26pub mod factory_types;
27pub mod http_client;
28pub mod model_resolver;
29pub mod open_responses;
30mod process_env;
31pub mod provider;
32pub mod provider_base;
33pub mod provider_config_types;
34pub mod providers;
35pub mod reasoning_effort;
36pub mod rig_adapter;
37pub mod single_response;
38pub(crate) mod system_prompt;
39pub mod tool_bridge;
40pub mod types;
41pub mod usage_cost;
42pub mod utils;
43
44// Re-export main types for backward compatibility
45pub use capabilities::ProviderCapabilities;
46pub use client::{AnyClient, ProviderClientAdapter};
47pub use config_adapter::{
48    AdapterEvent, AdapterHooks, AdapterHooksProvider, OwnedProviderConfig, as_factory_config,
49    as_factory_config_with_hooks,
50};
51pub use factory_types::{ProviderConfig, infer_provider_from_model};
52pub use model_resolver::{DynamicModelMeta, DynamicModelRef, ModelAvailability, ModelResolver, ResolvedModel};
53pub use provider::{FinishReason, LLMStream, LLMStreamEvent, Usage};
54pub use provider_config_types::ProviderConfig as ProviderConfigData;
55pub use tool_bridge::{
56    CorrelationStats, IntentFulfillment, MessageCorrelationTracker, MessageToolCorrelation, ToolExecution, ToolIntent,
57    ToolIntentExtractor,
58};
59pub use types::{BackendKind, LLMError, LLMResponse};
60pub use vtcode_commons::delegate_components;