vtcode_llm/providers/anthropic/mod.rs
1//! Anthropic Claude API provider implementation
2//!
3//! This module provides a modular implementation of the Anthropic Claude LLM provider,
4//! decomposed into focused submodules for maintainability:
5//!
6//! - `provider`: Main `AnthropicProvider` struct and `LLMProvider` trait impl
7//! - `request_builder`: LLMRequest → Anthropic API format conversion
8//! - `response_parser`: Anthropic API response → LLMResponse parsing
9//! - `stream_decoder`: Server-sent events (SSE) streaming decoder
10//! - `prompt_cache`: Prompt caching configuration and headers
11//! - `headers`: API headers, beta features, and version management
12//! - `capabilities`: Model capability detection (vision, reasoning, structured output)
13//! - `validation`: Request validation and schema checking
14//! - `fallback_retry`: Bounded credit-token retry when a server-side fallback could not run
15
16#[cfg(feature = "anthropic-api")]
17pub mod api;
18mod block_order;
19pub mod capabilities;
20pub mod compat;
21mod fallback_retry;
22mod headers;
23mod prompt_cache;
24mod provider;
25pub(crate) mod request_builder;
26mod response_parser;
27mod stream_decoder;
28pub(crate) mod validation;
29
30pub use provider::AnthropicProvider;
31
32#[cfg(test)]
33mod tests;