mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix
This commit is contained in:
parent
ad040d4981
commit
aedf648bc2
1 changed files with 0 additions and 64 deletions
|
|
@ -3,70 +3,6 @@
|
|||
This document explains the internal architecture of LiteLLM for contributors. It describes the
|
||||
major components, how they interact, and the key design decisions that shape the library.
|
||||
|
||||
## 1. Repo Composition
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────────────────┐
|
||||
│ LiteLLM Repository │
|
||||
├─────────────────────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌───────────────────────────────────────────────────────────────────────┐ │
|
||||
│ │ LiteLLM Proxy (litellm/proxy/) │ │
|
||||
│ │ │ │
|
||||
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
|
||||
│ │ │ Budgets │ │ Rate │ │ Cost │ │ Guardrails │ │ │
|
||||
│ │ │ │ │ Limiting │ │ Tracking │ │ │ │ │
|
||||
│ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │ │
|
||||
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
|
||||
│ │ │ Model │ │ Prompt │ │ Batches │ │ Pass-through│ │ │
|
||||
│ │ │ Access │ │ Mgmt │ │ API │ │ Endpoints │ │ │
|
||||
│ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │ │
|
||||
│ │ ┌─────────────┐ ┌─────────────┐ │ │
|
||||
│ │ │ LLM │ │ S3 │ │ │
|
||||
│ │ │Observability│ │ Logging │ │ │
|
||||
│ │ └─────────────┘ └─────────────┘ │ │
|
||||
│ │ │ │
|
||||
│ │ ┌─────────────────────────────────────────────────────────────────┐ │ │
|
||||
│ │ │ OpenAI Compatible REST API │ │ │
|
||||
│ │ └─────────────────────────────────────────────────────────────────┘ │ │
|
||||
│ └───────────────────────────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ ┌───────────────────────────────────────────────────────────────────────┐ │
|
||||
│ │ LiteLLM Python SDK (litellm/) │ │
|
||||
│ │ │ │
|
||||
│ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │
|
||||
│ │ │ main.py │ │ anthropic_ │ │ google_genai/ │ │ │
|
||||
│ │ │ (OpenAI API) │ │ interface/ │ │ (GenAI API) │ │ │
|
||||
│ │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ │
|
||||
│ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │
|
||||
│ │ │ responses/ │ │ router.py │ │ llms/ │ │ │
|
||||
│ │ │ (Responses API) │ │ (Load Balancing)│ │ (Providers) │ │ │
|
||||
│ │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ │
|
||||
│ └───────────────────────────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ ┌───────────────────────────────────────────────────────────────────────┐ │
|
||||
│ │ Integrations (litellm/integrations/) │ │
|
||||
│ │ │ │
|
||||
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
|
||||
│ │ │ Langfuse │ │ Datadog │ │Prometheus│ │ Arize │ │ Slack │ │ │
|
||||
│ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │
|
||||
│ └───────────────────────────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**LiteLLM Proxy** (`litellm/proxy/`) - Production LLM Gateway with authentication, rate limiting,
|
||||
budgets, guardrails, and management APIs. Exposes OpenAI-compatible REST endpoints.
|
||||
|
||||
**LiteLLM Python SDK** (`litellm/`) - Core library with multiple interface styles:
|
||||
- `main.py` - OpenAI-compatible: `completion()`, `embedding()`, `image_generation()`
|
||||
- `anthropic_interface/` - Native Anthropic SDK interface
|
||||
- `google_genai/` - Native Google GenAI SDK interface
|
||||
- `responses/` - OpenAI Responses API interface
|
||||
- `llms/` - Provider implementations with transformation classes
|
||||
|
||||
**Integrations** (`litellm/integrations/`) - Logging and observability callbacks for 30+ platforms
|
||||
|
||||
## Request Flow
|
||||
|
||||
The data flow for a proxy completion request is as follows:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue