litellm/litellm/proxy
2026-01-24 09:24:50 -08:00
..
_experimental chore: update Next.js build artifacts (2026-01-24 17:18 UTC, node v22.16.0) 2026-01-24 09:18:58 -08:00
agent_endpoints chore: resolve ModuleNotFoundError for Microsoft Foundry Agents (#18991) 2026-01-17 04:56:52 +05:30
analytics_endpoints fix(sql): Optimize SpendLogs queries to use timestamp filtering for index usage (#17504) 2025-12-04 21:52:57 -08:00
anthropic_endpoints [Feat] UI - Allow Adding Claude Code Plugins (#19387) 2026-01-19 19:08:59 -08:00
auth Fix for Prometheus Metric Cardinality Issue with /responses Endpoint 2026-01-20 15:28:09 +05:30
batches_endpoints Add end to end integration tests for batches 2025-12-23 11:54:46 -05:00
client add a new feature fix to expose the team alias when authenticating th… (#17725) 2025-12-10 10:10:28 -08:00
common_utils [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
config_management_endpoints (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
container_endpoints [Feat] Litellm new endpoint add container file upload (#18743) 2026-01-07 13:36:55 +05:30
credential_endpoints Added new step into rotate master key function for processing credentials table (#17952) 2025-12-16 09:40:22 +05:30
custom_hooks [Feat] SSO - Allow users to run a custom sso login handler (#12465) 2025-07-09 16:36:30 -07:00
db Revert "Fix/prisma schema permission (#19391)" 2026-01-21 17:19:32 +05:30
discovery_endpoints Add in-product nudge for claude code feedback survey + new learning centre (#19303) 2026-01-17 20:05:20 -08:00
example_config_yaml [Feat] Claude Code - Add Websearch support using LiteLLM /search (using web search interception hook) (#19263) 2026-01-16 21:10:05 -08:00
fine_tuning_endpoints fix: Get custom_llm_provider from query param (#16731) 2025-11-17 19:56:41 -08:00
google_endpoints Fix: [Bug]: Gemini Image Generation: imageConfig parameters (imageSize, aspectRatio) are completely ignored #18656 2026-01-12 13:38:37 +05:30
guardrails Fix/per service ssl override v2 (#19538) 2026-01-21 20:10:04 -08:00
health_check_utils fix lint errors (#15406) 2025-10-10 14:16:23 -07:00
health_endpoints add license endpoint (#18311) 2025-12-25 11:11:17 +05:30
hooks feat: hashicorp vault rotate support 2026-01-23 17:32:55 +09:00
image_endpoints Fix: stability image optional para 2026-01-19 09:05:52 +05:30
management_endpoints Merge pull request #19604 from BerriAI/litellm_team_update_org 2026-01-24 09:09:55 -08:00
management_helpers [Feat] Tag Management - Add support for setting tag based budgets (#15433) 2025-10-10 19:24:50 -07:00
middleware PrometheusAuthMiddleware 2025-04-04 20:37:53 -07:00
ocr_endpoints [Feat] Native /ocr endpoint support (#15573) 2025-10-15 17:20:01 -07:00
openai_files_endpoints Add managed files support when load_balancing is True 2026-01-19 15:54:04 +05:30
pass_through_endpoints docs fix 2026-01-23 12:54:30 -08:00
policy_engine fix linting 2026-01-23 13:46:02 -08:00
prompts fix(prompts): fix prompt info lookup and delete using correct IDs (#19358) 2026-01-20 12:28:34 -08:00
public_endpoints fixing lint 2026-01-16 18:14:33 -08:00
rag_endpoints [Feat] RAG query endpoint - Add RAG Search / Query endpoint (#18376) 2025-12-23 22:30:37 +05:30
rerank_endpoints use correct get custom headers 2025-03-12 17:16:51 -07:00
response_api_endpoints Revert "feat: Add built-in migration lock to prevent concurrent Prisma migrat…" (#18719) 2026-01-06 23:56:02 +05:30
response_polling Fix lint and mypy error for response api polling 2025-12-08 20:42:23 +05:30
search_endpoints Add cost tracking and logging support 2025-11-25 17:14:59 +05:30
spend_tracking [Fix] turn_off_message_logging Does Not Redact Request Messages in proxy_server_request Field When Stored to Database (#18897) 2026-01-10 11:28:21 -08:00
swagger Change favicon (#16837) 2025-11-19 20:38:22 -08:00
test_prompts Prompt Management (2/2) - New /prompt/list endpoint + key-based access to prompt templates (#13218) 2025-08-02 10:36:38 -07:00
types_utils [Feat] Allow reading custom logger python scripts from s3 (#12623) 2025-07-16 15:07:01 -07:00
ui_crud_endpoints Add in-product nudge for claude code feedback survey + new learning centre (#19303) 2026-01-17 20:05:20 -08:00
vector_store_endpoints Fix: vector store sync issues 2026-01-19 13:17:08 +05:30
vector_store_files_endpoints Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
vertex_ai_endpoints Move query params to create_pass_through_route call (#17660) 2025-12-08 12:57:49 -08:00
video_endpoints Revert "Litellm staging 01 15 2026" 2026-01-17 06:31:34 +09:00
.gitignore
__init__.py
_logging.py
_new_new_secret_config.yaml Ollama ssl verify = False + Spend Logs reliability fixes (#7931) 2025-01-23 23:05:41 -08:00
_new_secret_config.yaml Litellm dev 01 15 2026 p1 (#19153) 2026-01-16 00:48:41 +05:30
_super_secret_config.yaml fix: remove fake keys causing security scans to fail (#18140) 2025-12-17 10:14:06 -08:00
_types.py [Feat] Guardrail Policy Management - Allow using UI to manage guardrail policies (#19668) 2026-01-23 12:44:22 -08:00
cached_logo.jpg Litellm dev 01 23 2025 p2 (#7962) 2025-01-23 21:02:15 -08:00
caching_routes.py fix install on python 2025-06-14 15:42:06 -07:00
common_request_processing.py [Feat] Claude Code - Add Websearch support using LiteLLM /search (using web search interception hook) (#19263) 2026-01-16 21:10:05 -08:00
custom_auth_auto.py Custom Auth - bubble up custom exceptions (#13093) 2025-07-29 16:28:25 -07:00
custom_prompt_management.py [Fix] CI/CD - mypy & check_code_and_doc_quality & mcp_testing (#17920) 2025-12-13 08:18:43 -08:00
custom_sso.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
custom_validate.py build: merge commit 1b15568af7 2025-02-17 21:56:00 -08:00
enterprise
health_check.py Fix Azure DALL-E-3 health check content policy violation by using safe default prompt (#16329) 2025-11-07 15:30:56 -08:00
lambda.py
litellm_pre_call_utils.py [Feat] UI + Backend - Allow adding policies on Keys/Teams + Viewing on Info panels (#19688) 2026-01-23 19:03:44 -08:00
llamaguard_prompt.txt
logo.jpg
mcp_tools.py example mcp tools 2025-03-20 17:53:20 -07:00
model_config.yaml Revert "Revert "(feat) Allow using include to include external YAML files in a config.yaml (#6922)"" 2024-11-27 16:08:59 -08:00
openapi.json
post_call_rules.py
prisma_migration.py Revert "Fix/prisma schema permission (#19391)" 2026-01-21 17:19:32 +05:30
proxy_cli.py Revert "Fix/prisma schema permission (#19391)" 2026-01-21 17:19:32 +05:30
proxy_config.yaml [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
proxy_server.py fix: _apply_search_filter_to_models mypy linting 2026-01-24 09:24:50 -08:00
README.md [Feat-Proxy] Allow using custom sso handler (#5809) 2024-09-20 19:14:33 -07:00
route_llm_request.py Fix: Model matching priority in configuration 2026-01-13 11:44:48 +05:30
schema.prisma fix schema.prisma 2026-01-23 13:17:52 -08:00
start.sh
utils.py Fix date overflow/division by zero in proxy utils (#19527) 2026-01-21 21:09:57 -08:00

litellm-proxy

A local, fast, and lightweight OpenAI-compatible server to call 100+ LLM APIs.

usage

$ pip install litellm
$ litellm --model ollama/codellama 

#INFO: Ollama running on http://0.0.0.0:8000

replace openai base

import openai # openai v1.0.0+
client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:8000") # set proxy to base_url
# request sent to model set on litellm proxy, `litellm --model`
response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [
    {
        "role": "user",
        "content": "this is a test request, write a short poem"
    }
])

print(response)

See how to call Huggingface,Bedrock,TogetherAI,Anthropic, etc.


Folder Structure

Routes

  • proxy_server.py - all openai-compatible routes - /v1/chat/completion, /v1/embedding + model info routes - /v1/models, /v1/model/info, /v1/model_group_info routes.
  • health_endpoints/ - /health, /health/liveliness, /health/readiness
  • management_endpoints/key_management_endpoints.py - all /key/* routes
  • management_endpoints/team_endpoints.py - all /team/* routes
  • management_endpoints/internal_user_endpoints.py - all /user/* routes
  • management_endpoints/ui_sso.py - all /sso/* routes