litellm/litellm/proxy
2025-12-10 21:31:35 -08:00
..
_experimental fix: resolve UI session MCP permissions across real teams (#17620) 2025-12-08 19:03:01 -08:00
agent_endpoints [Feat] Agent Gateway - allow adding langgraph, bedrock agent core agents (#17802) 2025-12-10 19:13: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 Passthrough in response (#17102) 2025-12-09 10:45:45 -08:00
auth Return 403 instead of 503 for unauthorized routes (#17723) 2025-12-09 15:16:11 -08:00
batches_endpoints Respect custom llm provider in header 2025-12-01 08:36:29 +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 Change deprecation banner to only show on /sso/key/generate 2025-12-08 16:30:37 -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 Change credential encryption to only affect db credentials 2025-12-09 13:36:40 -08:00
custom_hooks
db [Perf] - Cut memory leak in half (#17784) 2025-12-10 12:31:58 -08:00
discovery_endpoints Change is_sso_configured to auto_redirect_to_sso 2025-12-03 15:48:50 -08:00
example_config_yaml
fine_tuning_endpoints
google_endpoints Support model names with slashes on Gemini endpoints (#17743) 2025-12-09 18:40:51 -08:00
guardrails fix: Avoid error when we have just the tool_calls in input (#17753) 2025-12-09 22:59:59 -08:00
health_check_utils
health_endpoints Revert "Add license metadata to health/readiness endpoint. (#15997)" 2025-12-05 19:31:30 -08:00
hooks Merge pull request #17707 from raghav-stripe/raghav-fix-responsesapi-rl 2025-12-11 08:57:16 +05:30
image_endpoints
management_endpoints [Feat] UI SSO - allow fetching role from generic SSO provider (Keycloak) (#17787) 2025-12-10 13:09:28 -08:00
management_helpers
middleware
ocr_endpoints
openai_files_endpoints
pass_through_endpoints fix Azure AI Anthropic api-key header and passthrough cost calculation (#17656) 2025-12-08 18:50:26 -08:00
prompts
public_endpoints [Feat] Agent Gateway - allow adding langgraph, bedrock agent core agents (#17802) 2025-12-10 19:13:50 -08:00
rag_endpoints
rerank_endpoints
response_api_endpoints Merge pull request #16862 from xianzongxie-stripe/add_polling_via_cache_feature 2025-12-08 08:41:25 +05:30
response_polling Fix lint and mypy error for response api polling 2025-12-08 20:42:23 +05:30
search_endpoints
spend_tracking [Feat] Agent Gateway - Track agent_id in SpendLogs (#17795) 2025-12-10 16:09:56 -08:00
swagger
test_prompts
types_utils
ui_crud_endpoints Fix UI settings 2025-12-10 21:31:35 -08:00
vector_store_endpoints [Bug fix] Vector Store List Endpoint Returns 404 (#17229) 2025-11-27 12:51:51 -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 Arize Phoenix OSS - Prompt Management Integration (#17750) 2025-12-09 22:53:42 -08:00
_super_secret_config.yaml
_types.py Fix UI settings 2025-12-10 21:31:35 -08:00
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py fix(unified_guardrail.py): correctly map a v1/messages call to the anthropic unified guardrail (#17424) 2025-12-03 20:54:56 -08:00
custom_auth_auto.py
custom_prompt_management.py Arize Phoenix OSS - Prompt Management Integration (#17750) 2025-12-09 22:53:42 -08:00
custom_sso.py
custom_validate.py
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py Fix: litellm user auth not passing issue 2025-12-02 11:25:32 +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] Agent Gateway - allow adding langgraph, bedrock agent core agents (#17802) 2025-12-10 19:13:50 -08:00
proxy_server.py [Feat] Agent Gateway - Add cost per query for agent invocations (#17774) 2025-12-10 10:43:52 -08:00
README.md
route_llm_request.py Merge pull request #17732 from BerriAI/litellm_videos_bugs_2 2025-12-10 07:49:55 +05:30
schema.prisma [Feat] Agent Gateway - Track agent_id in SpendLogs (#17795) 2025-12-10 16:09:56 -08:00
start.sh
utils.py [Perf] - Cut memory leak in half (#17784) 2025-12-10 12:31:58 -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