litellm/litellm/proxy
2026-03-18 20:58:41 -07:00
..
_experimental [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
agent_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
analytics_endpoints
anthropic_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
auth [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
batches_endpoints [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
client Merge remote-tracking branch 'origin' into litellm_internal_dev_03_12_2026 2026-03-13 15:11:49 -07:00
common_utils style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
config_management_endpoints
container_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
credential_endpoints style: run black formatter on 52 non-enterprise files 2026-03-12 14:23:50 -03:00
custom_hooks style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
db style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
discovery_endpoints Support auto_redirect_ui_login_to_sso in config.yaml general_settings 2026-03-11 11:34:17 -07:00
example_config_yaml [Infra] Merging RC Branch with Main (#23786) 2026-03-16 15:32:20 -07:00
fine_tuning_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
google_endpoints
guardrails [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
health_check_utils
health_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
hooks Merge branch 'main' into litellm_langfuse-session-trace-fix 2026-03-15 01:09:49 +05:30
image_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
management_endpoints Merge branch 'main' into litellm_yj_march_17_2026 2026-03-18 15:13:41 -07:00
management_helpers [Feature] UI - Default Team Settings: Modernize page and fix defaults application 2026-03-14 00:01:25 -07:00
middleware Fix inflight mypy 2026-03-02 19:41:32 +05:30
ocr_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
openai_evals_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
openai_files_endpoints [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
pass_through_endpoints fix: fix logging for response incomplete streaming 2026-03-18 20:58:41 -07:00
policy_engine style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
prompts
public_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
rag_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
realtime_endpoints [Fix] Use type:ignore instead of Union return type for realtime endpoint 2026-03-13 11:42:26 -07:00
rerank_endpoints
response_api_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
response_polling [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
search_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
spend_tracking [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
swagger
test_prompts
types_utils style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
ui_crud_endpoints [Fix] Remove "API" from custom key description text 2026-03-16 22:35:44 -07:00
vector_store_endpoints fix(mypy): sync route_type Literals, fix BFL params and signatures 2026-03-12 23:51:35 +00:00
vector_store_files_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
vertex_ai_endpoints
video_endpoints [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml fix: fix responses cost calc 2026-03-18 19:52:59 -07:00
_super_secret_config.yaml
_types.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py Add new videos transformation 2026-03-16 17:56:21 +05:30
compliance_checks.py
custom_auth_auto.py
custom_prompt_management.py
custom_sso.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
custom_validate.py
dd_span_tagger.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
llamaguard_prompt.txt
logo.jpg
mcp_registry.json feat(ui): group MCP tools by CRUD risk category in allowlist panels (#23403) 2026-03-11 21:15:25 -07:00
mcp_tools.py
model_config.yaml
openapi_registry.json feat(ui): OpenAPI MCP server support with popular API quick-picker (#23200) 2026-03-10 13:59:52 -07:00
openapi.json
post_call_rules.py
prisma_migration.py
prometheus_cleanup.py
proxy_cli.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
proxy_config.yaml
proxy_server.py Merge pull request #23333 from Harshit28j/litellm_FOCUS_preserve-summary 2026-03-14 10:15:05 -07:00
README.md
route_llm_request.py style: apply black formatting to fix CI lint check 2026-03-17 18:52:57 +00:00
schema.prisma [Feature] /v2/team/list: Add org admin access control, members_count, and indexes 2026-03-17 20:34:15 -07:00
start.sh
utils.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -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