litellm/litellm/proxy
Yuneng Jiang e004876950
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_/wonderful-bouman
# Conflicts:
#	tests/test_litellm/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py
2026-04-17 21:32:09 -07:00
..
_experimental style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
agent_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
auth Merge pull request #25256 from BerriAI/litellm_ishaan_april6 2026-04-17 16:26:45 -07:00
batches_endpoints
client style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
common_utils style: run black formatter on files from main merge 2026-04-17 13:02:59 -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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
discovery_endpoints
example_config_yaml
fine_tuning_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
google_endpoints
guardrails style: run black formatter on files from main merge 2026-04-17 13:02:59 -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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
image_endpoints
management_endpoints fix(team_delete): exclude budget_limits and default_team_member_models from deleted team record 2026-04-17 14:42:09 -07:00
management_helpers Merge origin/main into litellm_ishaan_april6 2026-04-17 12:36:51 -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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
spend_tracking style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
swagger
test_prompts
types_utils
ui_crud_endpoints [Fix] UI - Settings: clarify Max-subscription vs BYOK toggle descriptions (independent of each other) 2026-04-17 21:21:43 -07:00
vector_store_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07: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
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml
_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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -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: 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
proxy_config.yaml
proxy_server.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
README.md
route_llm_request.py
schema.prisma fix(schema): add budget_limits Json? to LiteLLM_TeamTable and LiteLLM_VerificationToken 2026-04-17 14:47:12 -07:00
start.sh
utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -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