litellm/litellm/proxy
2026-04-17 12:55:33 -07:00
..
_experimental chore: merge litellm_internal_staging, resolve uv.lock conflict 2026-04-15 18:51:19 -07:00
agent_endpoints fix: align v1 guardrail and agent list responses with v2 field handling 2026-04-10 00:00:53 -07:00
analytics_endpoints fix(spend): session-TZ-independent date filtering for spend/error log queries 2026-04-10 17:04:52 -07:00
anthropic_endpoints fix(lint): extract _validate_plugin_source to reduce register_plugin statement count 2026-04-07 09:42:10 -07:00
auth Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -07:00
batches_endpoints Merge pull request #23957 from Sameerlite/litellm_vertex-cancel-batch 2026-03-20 23:32:50 +05:30
client build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
common_utils Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -07:00
config_management_endpoints
container_endpoints feat(containers): Azure routing, managed container IDs, delete response parsing (#25287) 2026-04-11 09:21:01 -07:00
credential_endpoints fix(credentials): sync in-memory credential_list after update (#25758) 2026-04-16 19:04:26 +05:30
custom_hooks
db fix: make PodLockManager.release_lock atomic compare-and-delete (re-land #21226) (#24466) 2026-04-15 17:33:21 -07:00
discovery_endpoints feat: add control plane for multi-proxy worker management 2026-03-19 22:50:19 -07:00
example_config_yaml Litellm fix update bedrock models (#24947) 2026-04-01 19:22:54 -07:00
fine_tuning_endpoints
google_endpoints
guardrails Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_yj_apr15 2026-04-16 09:17:20 -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 document new env var and fix type hint 2026-04-11 22:17:32 -07:00
hooks fix(proxy): use model_group for model_max_budget spend tracking cache key (#25549) 2026-04-11 19:37:58 -07:00
image_endpoints
management_endpoints docs(team_management): add budget_limits and default_team_member_models params to new_team docstring 2026-04-17 12:55:33 -07:00
management_helpers Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -07:00
middleware
ocr_endpoints
openai_evals_endpoints
openai_files_endpoints Merge pull request #25450 from harish876/oom-file-fix-openai 2026-04-11 12:25:36 -07:00
pass_through_endpoints refactor: define pass-through custom body state key in types module 2026-04-11 15:26:44 -07:00
policy_engine Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
prompts style: fix import ordering in prompt_endpoints 2026-04-16 03:26:31 +00:00
public_endpoints feat: multiple concurrent budget windows per API key and team (#24883) (#25109) 2026-04-06 14:02:04 -07:00
rag_endpoints
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 fix: address Greptile review comments 2026-03-19 14:10:58 +05:30
response_polling feat(polling): check rate limits before creating polling ID 2026-03-19 13:59:59 +05:30
search_endpoints
spend_tracking refactor: rename filter var to satisfy mypy 2026-04-11 23:40:59 -07:00
swagger
test_prompts
types_utils
ui_crud_endpoints fix(proxy): improve input validation on management endpoints 2026-04-09 14:14:53 -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
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 Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -07:00
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py security: prevent API key leaks in error tracebacks, logs, and alerts 2026-04-14 23:09:17 +00: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: black format health_check.py 2026-04-15 18:18:36 -07:00
lambda.py
litellm_pre_call_utils.py fix(proxy): harden request parameter handling 2026-04-16 01:38:12 +00: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): use AZURE_DEFAULT_API_VERSION for proxy --api_version default 2026-03-19 15:57:03 +05:30
proxy_config.yaml
proxy_server.py Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -07:00
README.md build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
route_llm_request.py style: apply black formatting to fix CI lint check 2026-03-17 18:52:57 +00:00
schema.prisma Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -07:00
start.sh
utils.py Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -07: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