litellm/litellm/proxy
2026-04-30 17:25:12 -07:00
..
_experimental Merge pull request #26849 from stuxf/fix/mcp-oauth-discovery-ssrf 2026-04-30 13:44:16 -07:00
agent_endpoints feat(guardrails): LLM-as-a-Judge guardrail (#26360) 2026-04-24 17:15:32 -07:00
analytics_endpoints
anthropic_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
auth Merge branch 'litellm_internal_staging' into litellm_token_verification_query_opt 2026-04-30 17:25:12 -07:00
batches_endpoints fix(proxy/batches): forward model to retrieve_batch for bedrock 2026-04-29 22:48:03 +02:00
client fix cli auth test expectations 2026-04-29 17:24:17 -07:00
common_utils Merge branch 'litellm_internal_staging' into litellm_token_verification_query_opt 2026-04-30 17:25:12 -07:00
config_management_endpoints
container_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
credential_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
custom_hooks
db Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_dbReconnectNonBlocking_local 2026-04-29 13:57:35 -07:00
discovery_endpoints
example_config_yaml fix(adaptive_router): 3 P1 review defects 2026-04-20 15:22:18 -07:00
fine_tuning_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
google_endpoints feat(proxy): LiteLLM headers on Google native generateContent routes (#25500) 2026-04-29 12:34:14 -07:00
guardrails chore(proxy): harden request control fields 2026-04-29 22:35:17 -07:00
health_check_utils Optimize database query which fetches latest model_id, model_name pairs and dedupes them in memory. 2026-04-15 00:54:37 +00:00
health_endpoints fix: /health/readiness 503 loop when DB is unreachable (#26134) 2026-04-20 15:29:43 -07:00
hooks chore(proxy): harden request control fields 2026-04-29 22:35:17 -07:00
image_endpoints fix: tighten file input handling in image edit endpoints 2026-04-22 18:04:39 -07:00
management_endpoints Merge branch 'litellm_internal_staging' into litellm_token_verification_query_opt 2026-04-30 17:25:12 -07:00
management_helpers Merge branch 'litellm_internal_staging' into litellm_token_verification_query_opt 2026-04-30 17:25:12 -07:00
memory Litellm memory improvements v2 (#26541) 2026-04-25 19:03:43 -07:00
middleware style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
ocr_endpoints
openai_evals_endpoints
openai_files_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
pass_through_endpoints Merge pull request #26827 from stuxf/fix/passthrough-auth-default 2026-04-30 17:06:37 -07:00
policy_engine style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
prompts style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
public_endpoints Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_/wonderful-bouman 2026-04-17 21:32:09 -07:00
rag_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
realtime_endpoints
rerank_endpoints
response_api_endpoints
response_polling style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
search_endpoints feat(proxy): move search tool access to object permissions 2026-04-29 12:29:20 +05:30
spend_tracking fix(spend-tracking): drop orphaned imports; align tests with alias contract 2026-04-29 18:53:12 +00:00
swagger
test_prompts
types_utils
ui_crud_endpoints Merge pull request #26442 from BerriAI/litellm_feat-restrict-org-admin-permissions 2026-04-25 08:50:26 -07:00
vector_store_endpoints fix(vector-stores): re-raise HTTPException from get_vector_store_info; allowlist recursion 2026-04-29 18:56:55 +00:00
vector_store_files_endpoints
vertex_ai_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
video_endpoints
workflows feat(proxy): durable agent workflow run tracking via /v1/workflows/runs (#26793) 2026-04-29 17:12:18 -07:00
__init__.py
_lazy_features.py fix ruff: APIRouter type-checking import, replace print with sys.std* writes 2026-04-29 17:23:10 -07:00
_lazy_openapi_snapshot.json add openapi snapshotting to CI pipeline 2026-04-29 17:20:56 -07:00
_lazy_openapi_snapshot.py fix ruff: APIRouter type-checking import, replace print with sys.std* writes 2026-04-29 17:23:10 -07:00
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml Litellm krrish staging 04 20 2026 (#26138) 2026-04-20 16:22:12 -07:00
_super_secret_config.yaml
_types.py Merge pull request #26827 from stuxf/fix/passthrough-auth-default 2026-04-30 17:06:37 -07:00
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py feat(proxy): LiteLLM headers on Google native generateContent routes (#25500) 2026-04-29 12:34:14 -07:00
compliance_checks.py
custom_auth_auto.py
custom_prompt_management.py
custom_sso.py
custom_validate.py
dd_span_tagger.py
enterprise
health_check.py style: apply black formatting 2026-04-20 16:02:21 -07:00
lambda.py
litellm_pre_call_utils.py Merge pull request #26851 from stuxf/codex/fix-callback-env-secret-resolution 2026-04-30 13:11:32 -07:00
llamaguard_prompt.txt
logo.jpg
mcp_registry.json
mcp_tools.py
model_config.yaml
openapi_registry.json
openapi.json
post_call_rules.py
prisma_migration.py
prometheus_cleanup.py
proxy_cli.py feat(proxy): add --timeout_worker_healthcheck flag for uvicorn worker triage 2026-04-27 11:06:56 -07:00
proxy_config.yaml
proxy_server.py Merge branch 'litellm_internal_staging' into litellm_token_verification_query_opt 2026-04-30 17:25:12 -07:00
README.md
route_llm_request.py fix: align agent endpoint and routing permission checks with existing pattern 2026-04-16 17:22:28 -07:00
schema.prisma Merge pull request #26691 from BerriAI/litellm_team_search_credentials_metadata 2026-04-30 08:35:17 +05:30
start.sh
utils.py refactor: replace DualCache with UserApiKeyCache in multiple modules 2026-04-30 22:40:52 +00:00

litellm-proxy

A local, fast, and lightweight OpenAI-compatible server to call 100+ LLM APIs.

usage

$ uv tool 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