litellm/litellm/proxy
Ishaan Jaffer 26d85739f5 docs fix
2026-01-22 19:51:34 -08:00
..
_experimental chore: ruff fix 2026-01-21 14:57:14 +09:00
agent_endpoints chore: resolve ModuleNotFoundError for Microsoft Foundry Agents (#18991) 2026-01-17 04:56:52 +05:30
analytics_endpoints
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
client
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
container_endpoints
credential_endpoints
custom_hooks
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
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
health_endpoints
hooks [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
image_endpoints Fix: stability image optional para 2026-01-19 09:05:52 +05:30
management_endpoints [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
management_helpers
middleware
ocr_endpoints
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-22 19:51:34 -08:00
policy_engine [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -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
rerank_endpoints
response_api_endpoints
response_polling
search_endpoints
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
test_prompts
types_utils
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
vertex_ai_endpoints
video_endpoints Revert "Litellm staging 01 15 2026" 2026-01-17 06:31:34 +09:00
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml Litellm dev 01 15 2026 p1 (#19153) 2026-01-16 00:48:41 +05:30
_super_secret_config.yaml
_types.py fix(proxy): add /a2a/{agent_id}/.well-known/agent-card.json to agent_routes allowlist (#19277) 2026-01-19 05:36:54 -08:00
.gitignore
cached_logo.jpg
caching_routes.py
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_prompt_management.py
custom_sso.py
custom_validate.py
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
llamaguard_prompt.txt
logo.jpg
mcp_tools.py
model_config.yaml
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 [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
README.md
route_llm_request.py Fix: Model matching priority in configuration 2026-01-13 11:44:48 +05:30
schema.prisma [Feat] - Add self hosted Claude Code Plugin Marketplace (#19378) 2026-01-19 14:05:47 -08:00
start.sh
utils.py [Feat] Add Support for Claude Code Max/OAuth 2 on LiteLLM AI Gateway (#19453) 2026-01-20 17:21:17 -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