Skip to main content

Module anthropic

Module anthropic 

Source
Expand description

Anthropic Claude API provider implementation

This module provides a modular implementation of the Anthropic Claude LLM provider, decomposed into focused submodules for maintainability:

  • provider: Main AnthropicProvider struct and LLMProvider trait impl
  • request_builder: LLMRequest → Anthropic API format conversion
  • response_parser: Anthropic API response → LLMResponse parsing
  • stream_decoder: Server-sent events (SSE) streaming decoder
  • prompt_cache: Prompt caching configuration and headers
  • headers: API headers, beta features, and version management
  • capabilities: Model capability detection (vision, reasoning, structured output)
  • validation: Request validation and schema checking

Modules§

api
Anthropic API compatibility server
compat

Structs§

AnthropicProvider