litellm/litellm/proxy
2025-11-08 11:14:19 -08:00
..
_experimental Building UI (#16158) 2025-11-01 09:26:52 -07:00
analytics_endpoints (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
anthropic_endpoints [Feat] Add Guardrails for /v1/messages and /v1/responses API (#15686) 2025-10-17 18:09:00 -07:00
auth Org level tpm/rpm limits + Team tpm/rpm validation when assigned to org (#15549) 2025-10-25 13:40:29 -07:00
batches_endpoints [Feat] Add Azure AVA TTS integration (#15749) 2025-10-20 16:52:23 -07:00
client [Feat] Proxy CLI - dont store existing key in the URL, store it in the state param (#15290) 2025-10-07 12:36:17 -07:00
common_utils mypy lint fix 2025-11-01 09:21:25 -07:00
config_management_endpoints (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
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 attempt to avoid/minimize deadlocks (#15281) 2025-10-24 12:22:38 -07:00
discovery_endpoints fix code qa check 2025-07-11 22:35:27 -07:00
example_config_yaml pt tests fix 2025-10-25 11:08:33 -07:00
fine_tuning_endpoints Litellm managed file updates combined (#11040) 2025-05-22 17:20:41 -07:00
google_endpoints fix gemini cli by actually streaming the response (#15264) 2025-10-07 11:26:39 -07:00
guardrails revert noma apply guard (#16214) 2025-11-03 14:58:27 -08:00
health_check_utils fix lint errors (#15406) 2025-10-10 14:16:23 -07:00
health_endpoints Add license metadata to health/readiness endpoint. (#15997) 2025-10-28 19:21:54 -07:00
hooks fixes code QA check 2025-10-31 17:55:49 -07:00
image_endpoints feat: add guardrail for image generation (#15619) 2025-10-16 21:50:30 -07:00
management_endpoints [Feat] UI - Allow setting cache settings on UI (#16143) 2025-10-31 17:43:59 -07: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 feat: read from custom-llm-provider header (#15528) 2025-10-18 22:04:53 -07:00
pass_through_endpoints fix linting 2025-11-08 11:14:19 -08:00
prompts Gitlab based Prompt manager (#14988) 2025-10-01 18:13:11 -07:00
public_endpoints build(ui/): UI - Public Model Hub v2 (#12532) 2025-07-11 22:24:31 -07:00
rerank_endpoints use correct get custom headers 2025-03-12 17:16:51 -07:00
response_api_endpoints [Fix] - Responses API - add /openai routes for responses API. (Azure OpenAI SDK Compatibility) (#15988) 2025-10-27 19:12:13 -07:00
search_endpoints fix to .debug 2025-10-23 18:08:56 -07:00
spend_tracking fix _extract_usage_for_ocr_call 2025-10-31 20:31:53 -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 [Infra] Litellm Backend SSO Changes (#16029) 2025-10-30 14:32: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 build(pyproject.toml): add new dev dependencies - for type checking (#9631) 2025-03-29 11:02:13 -07:00
video_endpoints Litellm sameer oct staging (#15806) 2025-10-24 12:17:22 -07:00
.gitignore fix(gitmodules): remapping to new proxy 2023-10-12 21:23:53 -07:00
__init__.py refactor: add black formatting 2023-12-25 14:11:20 +05:30
_logging.py fix(_logging.py): fix timestamp format for json logs 2024-06-20 15:20:21 -07:00
_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 Guardrails - Responses API, Image Gen, Text completions, Audio transcriptions, Audio Speech, Rerank, Anthropic Messages API support via the unified apply_guardrails function (#15706) 2025-10-25 13:38:57 -07:00
_super_secret_config.yaml docs(enterprise.md): cleanup docs 2024-07-15 14:52:08 -07:00
_types.py Org level tpm/rpm limits + Team tpm/rpm validation when assigned to org (#15549) 2025-10-25 13:40:29 -07: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 fixes exception handling 2025-10-25 16:55:16 -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 (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 feat(llama_guard.py): add llama guard support for content moderation + new async_moderation_hook endpoint 2024-02-17 19:13:04 -08:00
health_check.py fix: Preserve Bedrock inference profile IDs in health checks (#15947) 2025-10-27 19:44:45 -07:00
lambda.py Add mangum. 2023-11-23 00:04:47 -05:00
litellm_pre_call_utils.py fix linting 2025-10-28 16:46:44 -07:00
llamaguard_prompt.txt feat(llama_guard.py): allow user to define custom unsafe content categories 2024-02-17 17:42:47 -08:00
logo.jpg (feat) admin ui custom branding 2024-02-21 17:34:42 -08:00
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 (feat) add swagger.json for litellm proxy 2023-10-13 20:41:04 -07:00
post_call_rules.py (docs) add example post call rules to proxy 2024-01-15 20:58:50 -08:00
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 feature/add max requests env var 2025-09-28 19:18:56 +01:00
proxy_config.yaml [Feat] Add support for Batch API Rate limiting - PR1 adds support for input based rate limits (#16075) 2025-10-29 18:28:52 -07:00
proxy_server.py fix: fix batch_writing_interval 2025-11-01 10:01:55 -07:00
README.md [Feat-Proxy] Allow using custom sso handler (#5809) 2024-09-20 19:14:33 -07:00
route_llm_request.py Litellm sameer oct staging (#15806) 2025-10-24 12:17:22 -07:00
schema.prisma [Feat] UI - Allow setting cache settings on UI (#16143) 2025-10-31 17:43:59 -07:00
start.sh fix(factory.py): fixing llama-2 non-chat models prompt templating 2023-11-07 21:33:54 -08:00
utils.py Changes to fix frequency_penalty and presence_penalty issue for gemini-2.5-pro model (#16041) 2025-10-30 20:02:58 -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