litellm/litellm/proxy
ryan-crabbe-berri 9da0b30888
Merge pull request #38843 from BerriAI/litellm_mag_budget_ui
feat(ui): set a model access group's shared budget from the dashboard
2026-08-29 17:27:17 -07:00
..
_experimental Merge pull request #38444 from BerriAI/litellm_mcp_connector_bulk_import 2026-08-29 17:21:57 -07:00
a2a chore(lint): clear grandfathered over-limit lint drift and ratchet budgets down 2026-08-05 12:18:13 -07:00
agent_endpoints Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5_0826 2026-08-29 03:29:39 -07:00
analytics_endpoints feat(ui): add error-code drilldown for failed requests on caching page 2026-08-24 15:45:45 -07:00
anthropic_endpoints fix(anthropic_endpoints): serialize dict-detail HTTPExceptions on /v1/messages like sibling surfaces 2026-08-29 00:48:14 -07:00
auth Merge branch 'litellm_window_spend_writer' into litellm_window_spend_reader 2026-08-29 16:24:07 -07:00
batches_endpoints Merge pull request #37198 from BerriAI/litellm_lit5660_batches_limit_400 2026-08-17 15:53:46 -07:00
client fix(proxy): give the remaining CLI clients a request timeout 2026-08-29 13:32:39 -07:00
common_utils Merge branch 'litellm_window_spend_schema' into litellm_window_spend_writer 2026-08-29 16:23:45 -07:00
config_management_endpoints feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
config_resolvers feat(alerting): add native Microsoft Teams alerting destination (#38367) 2026-08-27 16:19:22 -07:00
container_endpoints refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
credential_endpoints refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
custom_hooks feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
db Merge pull request #35887 from BerriAI/litellm_window_spend_reader 2026-08-29 16:44:53 -07:00
discovery_endpoints feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
enterprise_billing chore(lint): clear grandfathered over-limit lint drift and ratchet budgets down 2026-08-05 12:18:13 -07:00
example_config_yaml fix(search): harden bing_grounding auth, result cap, status, and cost 2026-08-24 12:26:07 -07:00
fine_tuning_endpoints fix(proxy): authenticate managed ids before routing 2026-08-08 02:42:34 -07:00
google_endpoints feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
guardrails fix(guardrails): stop Lakera monitor mode forwarding unmasked PII on Responses-API bodies (#38841) 2026-08-29 17:07:39 -07:00
health_check_utils fix(proxy): derive auto-router health from its underlying models (#38174) 2026-08-26 16:41:54 -07:00
health_endpoints fix(health): honor allow_requests_on_db_unavailable in readiness probe (#37640) 2026-08-29 10:17:12 -07:00
hooks Merge branch 'litellm_window_spend_schema' into litellm_window_spend_writer 2026-08-29 16:23:45 -07:00
image_endpoints fix(videos): forward uploaded source file on /v1/videos/edits to the provider 2026-08-24 15:34:21 -07:00
list_api feat(proxy): add paginated GET /public/v1/model_hub (#38636) 2026-08-28 10:02:59 -07:00
logging_endpoints feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
management_endpoints Merge pull request #38843 from BerriAI/litellm_mag_budget_ui 2026-08-29 17:27:17 -07:00
management_helpers fix(key_management): allow /key/update to keep or shrink MCP server grants the key already holds (#38463) 2026-08-27 12:51:17 -07:00
memory fix(memory): return 404 when the memory row vanishes before delete 2026-08-25 16:20:17 -07:00
middleware feat(proxy): add Amazon Comprehend Medical passthrough provider 2026-08-17 15:44:06 -07:00
ocr_endpoints fix(ocr): reject invalid req_format values as 400 on the SDK path 2026-08-17 15:49:18 -07:00
openai_evals_endpoints feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
openai_files_endpoints fix(bedrock): map real batch record counts and guard zero-count retire 2026-08-29 01:05:36 -07:00
pass_through_endpoints feat(budgets): enforce shared budgets on model access groups 2026-08-29 12:13:55 -07:00
policy_engine refactor: replace fresh getattr/setattr and test type-ignores with typed access 2026-08-29 07:59:27 +00:00
prompts fix(prompts): propagate prompt deletes to every worker and pod 2026-08-26 18:01:08 -07:00
public_endpoints feat(proxy): add paginated GET /public/v1/model_hub (#38636) 2026-08-28 10:02:59 -07:00
rag_endpoints fix(rag): tighten shebang and ASCII-magic content classification 2026-08-24 20:17:36 +00:00
realtime_endpoints chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
rerank_endpoints fix(rerank): emit latency and cost headers on /rerank (#35419) 2026-08-25 15:54:25 -07:00
response_api_endpoints fix(responses_api): map bridged chat usage on guardrail-blocked replies 2026-08-14 17:04:27 -07:00
response_polling chore(typing): drop 1.3k basedpyright errors across 30 Any hotspot files 2026-08-16 03:56:02 +00:00
search_endpoints fix(proxy): sync search tools into the router on management writes 2026-08-26 11:46:54 -07:00
shutdown feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
spend_tracking Merge pull request #35887 from BerriAI/litellm_window_spend_reader 2026-08-29 16:44:53 -07:00
swagger
test_prompts
types_utils chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
ui_crud_endpoints refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
vector_store_endpoints refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
vector_store_files_endpoints feat(proxy): enforce vector-store upload security controls on /v1/rag/ingest 2026-08-24 12:41:15 -07:00
vertex_ai_endpoints chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
video_endpoints fix(videos): forward uploaded source file on /v1/videos/edits to the provider 2026-08-24 15:34:21 -07:00
workflows
.gitignore
__init__.py
_lazy_features.py feat(mcp_gateway): add RFC 7662 introspection for gateway session tokens (#38726) 2026-08-29 12:56:04 -07:00
_lazy_openapi_snapshot.json Merge pull request #38843 from BerriAI/litellm_mag_budget_ui 2026-08-29 17:27:17 -07:00
_lazy_openapi_snapshot.py chore(techdebt): type new signatures and drop slop comments from the last 24h 2026-08-28 07:59:32 +00:00
_logging.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
_new_new_secret_config.yaml Revert "chore: remove _experimental/out (#31546)" 2026-07-01 13:25:47 -07:00
_new_secret_config.yaml Revert "chore: remove _experimental/out (#31546)" 2026-07-01 13:25:47 -07:00
_super_secret_config.yaml Revert "chore: remove _experimental/out (#31546)" 2026-07-01 13:25:47 -07:00
_types.py Merge pull request #38444 from BerriAI/litellm_mcp_connector_bulk_import 2026-08-29 17:21:57 -07:00
cached_logo.jpg
caching_routes.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
common_request_processing.py Merge pull request #38835 from BerriAI/litellm_38816_classifier_cost_savings 2026-08-29 16:23:50 -07:00
compliance_checks.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
custom_auth_auto.py refactor(lint): apply every safe ruff autofix and zero 28 strict-rule budgets 2026-08-01 15:43:29 -07:00
custom_prompt_management.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
custom_sso.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
custom_validate.py
dd_span_tagger.py refactor(lint): apply every safe ruff autofix and zero 28 strict-rule budgets 2026-08-01 15:43:29 -07:00
dev_config.yaml Revert "chore(ci): sync litellm_internal_staging into daily OSS branch (#33337)" (#33339) 2026-07-14 19:32:25 -07:00
enterprise
health_check.py feat(health): opt-in model-group allowlist for background health checks and health-check routing (#38539) 2026-08-27 12:25:56 -07:00
lambda.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
litellm_pre_call_utils.py Merge pull request #38784 from BerriAI/litellm_model_access_group_budgets 2026-08-29 16:06:54 -07:00
llamaguard_prompt.txt
logo.jpg
logo_dark.png feat(ui): serve a dark-mode variant of the LiteLLM logo (#37656) 2026-08-20 11:26:10 -07:00
mcp_registry.json fix(mcp): use official Google Drive streamable HTTP MCP server (#34322) 2026-07-22 23:41:51 +00:00
mcp_tools.py refactor(lint): apply every safe ruff autofix and zero 28 strict-rule budgets 2026-08-01 15:43:29 -07:00
model_config.yaml
openapi.json
openapi_registry.json fix(mcp): add Google Sheets, Drive, Calendar, and Docs to the OpenAPI registry 2026-07-20 19:02:00 -07:00
plugin_routes.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
post_call_rules.py ci(lint): add blanket-noqa, dataclass-default, and unused-noqa Ruff rules (#30516) 2026-06-16 12:07:22 -07:00
prisma_migration.py fix(proxy): keep a failed prisma generate from failing the migration entrypoint (#37947) 2026-08-22 11:45:19 -07:00
prometheus_cleanup.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
proxy_cli.py fix: keep schema reconciliation from fighting a partitioned LiteLLM_SpendLogs (#38452) 2026-08-27 12:52:52 -07:00
proxy_config.yaml
proxy_server.py Merge pull request #38249 from BerriAI/litellm_fix_empty_user_models_visibility 2026-08-29 17:04:28 -07:00
read_model_list.py fix(proxy): initialize the secret manager before resolving os.environ config references (#37544) 2026-08-19 17:00:26 -07:00
README.md
route_llm_request.py fix(proxy): serialize read-through with reloads, gate db object types 2026-08-18 22:43:44 -07:00
schema.prisma feat(proxy): add LiteLLM_BudgetWindowSpend table for per-window budget spend 2026-08-29 16:17:14 -07:00
start.sh
utils.py fix(proxy): run SMTP send_email off the event loop with a connection timeout (#38473) 2026-08-29 16:05:57 -07:00
wildcard_config.yaml feat: add dev and wildcard proxy configs for local testing (#30556) 2026-06-17 06:47:11 -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