litellm/litellm/proxy
Krish Dholakia b9621c760d
Merge pull request #13836 from BerriAI/litellm_dev_08_16_2025_p1
Add OTEL tracing for actual LLM API call
2025-08-20 19:10:10 -07:00
..
_experimental fix(litellm_pre_call_utils.py): forward headers by model group at litellm pre call utils level 2025-08-18 21:13:52 -07:00
analytics_endpoints
anthropic_endpoints [Feat] GEMINI CLI Integration - Add /countTokens endpoint support (#13545) 2025-08-12 16:19:58 -07:00
auth [Feat] UI QA for Team Member Rate Limits (#13664) 2025-08-15 16:21:11 -07:00
batches_endpoints Batches - support batch retrieve with target model Query Param + Anthropic - completion bridge, yield content_block_stop chunk (#12228) 2025-07-01 22:13:48 -07:00
client Fixed incorrect key info endpoint (#13633) 2025-08-15 11:10:06 -07:00
common_utils [Fix] Hide sensitive data in /model/info - azure entra client_secret (#13577) 2025-08-13 07:35:53 -07:00
config_management_endpoints
credential_endpoints added support to credential delete to support slashes in the curl (#10987) 2025-05-20 19:08:48 -07:00
custom_hooks [Feat] SSO - Allow users to run a custom sso login handler (#12465) 2025-07-09 16:36:30 -07:00
db LiteLLM SDK <-> Proxy: support user param + Prisma - remove use_prisma_migrate flag - redundant as this is now default (#13555) 2025-08-12 22:03:39 -07:00
discovery_endpoints fix code qa check 2025-07-11 22:35:27 -07:00
example_config_yaml [MCP Gateway] Litellm mcp pre and during guardrails (#13188) 2025-08-01 20:02:25 -07:00
fine_tuning_endpoints Litellm managed file updates combined (#11040) 2025-05-22 17:20:41 -07:00
google_endpoints [Feat] GEMINI CLI Integration - Add /countTokens endpoint support (#13545) 2025-08-12 16:19:58 -07:00
guardrails migrate stream ws 2025-08-19 12:36:29 +03:00
health_endpoints fix(health_check_helpers.py): set max tokens for wildcard call to 10, fixes calling gpt-5-nano via wildcard on openai (#13482) 2025-08-10 09:23:36 -07:00
hooks [Feat] Team Member Rate Limits + Support for using with JWT Auth (#13601) 2025-08-13 17:21:36 -07:00
image_endpoints Feat: add add azure endpoint for image endpoints (#11482) 2025-06-06 10:38:37 -07:00
management_endpoints [Feat] UI - Allow editing team member rpm/tpm limits (#13669) 2025-08-15 17:29:44 -07:00
management_helpers Enhance team member permission error message with guidance for key creation (#13443) 2025-08-08 14:35:06 -07:00
middleware
openai_files_endpoints Store batch output file id in DB + Store batch file status in DB + (experimental) BATCH API COST TRACKING 2025-06-25 22:41:22 -07:00
pass_through_endpoints test: update test - anthropic returns input tokens in final usage chunk now 2025-08-16 12:31:52 -07:00
prompts Prompt Management - add prompts on UI (#13240) 2025-08-02 22:33:37 -07:00
public_endpoints build(ui/): UI - Public Model Hub v2 (#12532) 2025-07-11 22:24:31 -07:00
rerank_endpoints
response_api_endpoints [Feat] New LLM API Endpoint - Add List input items for Responses API (#11602) 2025-06-10 15:47:16 -07:00
spend_tracking [Bug fix] - Error creating standard logging object - can't register atexit after shutdownLitellm fixes standard logging payload (#13436) 2025-08-08 12:38:26 -07:00
swagger Swagger - bump DOMPurify version + add back Support local swagger bundle (good for airgapped environments) + support local swagger on custom root paths (#12911) 2025-07-23 11:22:56 -07: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 feat: Add logo customization for LiteLLM admin UI (#12958) 2025-08-06 08:10:08 -07:00
vector_store_endpoints [Feat] LLM API Endpoint - Expose OpenAI Compatible /vector_stores/{vector_store_id}/search endpoint (#12749) 2025-07-18 18:18:53 -07:00
vertex_ai_endpoints
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml Merge pull request #13836 from BerriAI/litellm_dev_08_16_2025_p1 2025-08-20 19:10:10 -07:00
_super_secret_config.yaml
_types.py [Feat] UI - Allow editing team member rpm/tpm limits (#13669) 2025-08-15 17:29:44 -07:00
.gitignore
cached_logo.jpg
caching_routes.py fix install on python 2025-06-14 15:42:06 -07:00
common_request_processing.py Prompt Management (2/2) - New /prompt/list endpoint + key-based access to prompt templates (#13218) 2025-08-02 10:36:38 -07:00
custom_auth_auto.py Custom Auth - bubble up custom exceptions (#13093) 2025-07-29 16:28:25 -07:00
custom_prompt_management.py Litellm dev 07 03 2025 p2 (#12301) 2025-07-03 22:40:21 -07:00
custom_sso.py
custom_validate.py
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py fix(litellm_pre_call_utils.py): forward headers by model group at litellm pre call utils level 2025-08-18 21:13:52 -07:00
llamaguard_prompt.txt
logo.jpg
mcp_tools.py
model_config.yaml
openapi.json
post_call_rules.py
prisma_migration.py LiteLLM SDK <-> Proxy: support user param + Prisma - remove use_prisma_migrate flag - redundant as this is now default (#13555) 2025-08-12 22:03:39 -07:00
proxy_cli.py LiteLLM SDK <-> Proxy: support user param + Prisma - remove use_prisma_migrate flag - redundant as this is now default (#13555) 2025-08-12 22:03:39 -07:00
proxy_config.yaml [Feat] DD LLM Observability - Add time to first token, litellm overhead, guardrail overhead latency metrics (#13734) 2025-08-18 17:38:04 -07:00
proxy_server.py [LLM Translation] Fix Realtime API endpoint for no intent (#13476) 2025-08-14 16:24:14 -07:00
README.md
route_llm_request.py Fix create, search vector store error (#13285) 2025-08-06 11:15:17 -07:00
schema.prisma Prompt Management - add prompts on UI (#13240) 2025-08-02 22:33:37 -07:00
start.sh
utils.py Router - reduce p99 latency w/ redis enabled by 50% + OTEL - track pre_call hook latency (#13362) 2025-08-09 16:09:51 -07: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