litellm/litellm/proxy
2026-01-03 09:43:06 +09:00
..
_experimental Merge pull request #18597 from BerriAI/litellm_fix_openapi_to_mcp 2026-01-03 09:43:06 +09:00
agent_endpoints Merge pull request #17781 from BerriAI/litellm_daily_agent_table 2025-12-11 15:01:50 -08:00
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 [Fix] CI/CD – Clean Up Performance PR Changes & others (#17838) 2025-12-11 12:50:03 -08:00
auth Add Kubernetes ServiceAccount JWT authentication support (#18055) 2026-01-02 14:02:31 +05:30
batches_endpoints Fix model getting twice 2025-12-16 15:43:55 +05:30
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 Allow org admins to view org info 2025-12-24 11:43:36 -08:00
config_management_endpoints
container_endpoints [Feat] Containers API - add new container API file management + UI Interface (#17745) 2025-12-09 17:33:26 -08:00
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
db Revert "[Fix] CI/CD - local_testing & mapped tests (#18222)" (#18223) 2025-12-18 14:46:09 -08:00
discovery_endpoints Support Disable Admin UI 2025-12-23 13:52:05 -08:00
example_config_yaml [Feat] Guardrails Load Balancing - Allow Platform admins to load balance between guardrails (#18181) 2025-12-19 00:08:03 +05:30
fine_tuning_endpoints
google_endpoints [Feat] New Logging Integration - Azure Sentinel Logger (#18146) 2025-12-18 02:04:49 +05:30
guardrails lint 2025-12-27 07:23:07 +09:00
health_check_utils
health_endpoints add license endpoint (#18311) 2025-12-25 11:11:17 +05:30
hooks [Feat] Unified Skills API - works across Anthropic, Vertex, Azure, Bedrock (#18232) 2025-12-19 18:55:59 +05:30
image_endpoints Fix image edit endpoint (#17046) 2025-11-24 20:52:35 -08:00
management_endpoints Merge pull request #18583 from BerriAI/litellm_block_negative_budget 2026-01-02 21:52:15 +05:30
management_helpers
middleware
ocr_endpoints
openai_files_endpoints fix:No module named 'fastapi' 2025-12-19 15:20:01 +05:30
pass_through_endpoints Guardrails API - support LLM tool call response checks on /chat/completions, /v1/responses, /v1/messages on regular + streaming calls (#17619) 2025-12-15 18:19:52 +05:30
prompts
public_endpoints Feat/add watsonx fields (#18569) 2026-01-03 02:53:17 +05:30
rag_endpoints [Feat] RAG query endpoint - Add RAG Search / Query endpoint (#18376) 2025-12-23 22:30:37 +05:30
rerank_endpoints
response_api_endpoints Add cost tracking for responses api in background mode 2025-12-19 13:35:48 +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: test error 2026-01-02 16:25:37 +09:00
swagger
test_prompts
types_utils
ui_crud_endpoints Adding role mappings to SSOConfig DB 2025-12-16 15:48:26 -08:00
vector_store_endpoints resolve embeddings model config 2025-12-17 21:56:47 -08:00
vector_store_files_endpoints
vertex_ai_endpoints Move query params to create_pass_through_route call (#17660) 2025-12-08 12:57:49 -08:00
video_endpoints Fix : use litellm params for other video apis 2025-12-09 23:03:29 +05:30
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml Guardrails - LiteLLM Content Filter - add support for running content filters on images (#18044) 2025-12-18 16:46:14 +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 Update the logic to work with GET request 2026-01-02 20:49:12 +05:30
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py [Feat] AI Gateway - Add support for Platform Fee / Margins (#18427) 2025-12-25 11:07:27 +05:30
custom_auth_auto.py
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
custom_validate.py
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py fix: add headers to metadata for guardrails on pass-through endpoints (#17992) 2025-12-16 13:41:34 +05:30
llamaguard_prompt.txt
logo.jpg
mcp_tools.py
model_config.yaml
openapi.json
post_call_rules.py
prisma_migration.py
proxy_cli.py
proxy_config.yaml [Feat] Unified Skills API - works across Anthropic, Vertex, Azure, Bedrock (#18232) 2025-12-19 18:55:59 +05:30
proxy_server.py Lazy load 9 heavy imports in litellm/utils.py (#18595) 2026-01-02 14:54:09 -08:00
README.md
route_llm_request.py [Feat] Add New Google Interactions API on AI Gateway (#18081) 2025-12-17 02:20:23 +04:00
schema.prisma feat: add UI support for configuring meta URLs 2026-01-02 15:07:37 +09:00
start.sh
utils.py [Feat] Enable async_post_call_failure_hook to transform error responses (#18348) 2025-12-22 11:24:30 -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