litellm/litellm/proxy
tin-berri 5d777c16d9
fix(mcp): align hub publication status and controls (#43241)
* fix(mcp): align hub publication status and controls

* refactor(mcp): keep hub visibility guard outside table rendering

---------

Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
2026-09-26 16:53:02 -07:00
..
_experimental fix(mcp): align hub publication status and controls (#43241) 2026-09-26 16:53:02 -07:00
a2a refactor(types): replace Any with proven types in 32 files 2026-09-21 10:51:46 +00:00
agent_endpoints feat(agents): add optional per-agent kill switch webhook (#42841) 2026-09-24 18:26:50 -05:00
analytics_endpoints Merge remote-tracking branch 'origin/main' into litellm_decrease_anys_opus5_r5 2026-09-14 07:27:54 +00:00
anthropic_endpoints refactor(anthropic): rename experimental_pass_through to pass_through (#43329) 2026-09-26 13:00:50 -07:00
auth feat(proxy): email alerts at configured percentages of a team member budget (#42665) 2026-09-26 02:42:45 +00:00
batches_endpoints fix(spend): attribute CLI session spend to the per-user cli-session alias instead of the hashed session token (#40541) 2026-09-24 18:21:47 -07:00
client feat(lint): add LIT013 flagging *-ok suppressions that suppress nothing and remove the 240 stale ones (#42793) 2026-09-23 17:50:09 -07:00
common_utils refactor: daily fresh tech debt cleanup, rolling PR (2026-09-25) (#43151) 2026-09-26 01:32:55 -07:00
config_management_endpoints
config_resolvers fix: enforce disable_custom_api_keys from general_settings (#42437) 2026-09-22 13:28:31 -07:00
container_endpoints refactor(types): replace Any with real types across 54 more backend files 2026-09-08 12:41:07 +00:00
credential_endpoints fix(credentials): answer 409 on a name collision, let PATCH resolve values from model_id 2026-09-15 10:41:43 -07:00
custom_hooks
db feat(proxy): add maximum_daily_tag_spend_retention_period cleanup setting (#39221) 2026-09-26 15:07:56 -07:00
discovery_endpoints fix(proxy): move credentials hint helper into a leaf html_forms module to clear CodeQL cyclic import 2026-09-14 20:34:58 +00:00
enterprise_billing
example_config_yaml Merge pull request #42071 from BerriAI/litellm_remove_dead_telemetry_flag 2026-09-19 21:48:02 -07:00
fine_tuning_endpoints
google_endpoints
guardrails feat(guardrails): scan retrieved vector store chunks with the request's pre-call guardrails (#43271) 2026-09-26 14:18:38 -07:00
health_check_utils fix(health): keep team public names to the owning team and let model_id win over model 2026-09-11 19:49:37 -07:00
health_endpoints feat(langfuse): migrate the sdk callback to langfuse v4 (#36741) 2026-09-24 23:22:56 -07:00
hooks feat(proxy): add fail_closed_rate_limit_enforcement to reject requests with 503 while Redis rate limit counters are unreachable (#43251) 2026-09-26 12:11:26 -07:00
image_endpoints Merge remote-tracking branch 'origin/main' into litellm_fix_image_edits_bracketed_alias 2026-09-17 14:49:54 -07:00
list_api fix(proxy): keep the submitted body out of 422 validation errors (#43231) 2026-09-25 17:05:53 -07:00
logging_endpoints refactor(types): replace Any with proven types in 32 files 2026-09-21 10:51:46 +00:00
management_endpoints fix(mcp): align hub publication status and controls (#43241) 2026-09-26 16:53:02 -07:00
management_helpers fix(key_management): count team unified access group MCP servers when validating key MCP grants (#41231) 2026-09-24 23:34:15 -07:00
memory feat(proxy): add a search param to key, memory, audit, and spend log listings 2026-09-03 15:20:13 -07:00
middleware fix(proxy): release unclaimed budget reservations at request end (#42304) 2026-09-21 19:51:12 -07:00
ocr_endpoints refactor(ocr): remove the Python OCR execution path and require the Rust route (#43081) 2026-09-24 18:18:50 -07:00
openai_evals_endpoints refactor(typing): replace Any with proven types in 65 backend files 2026-09-02 09:11:36 +00:00
openai_files_endpoints feat(vertex): native batch JSONL passthrough with cost tracking (#42810) 2026-09-24 12:35:34 -07:00
pass_through_endpoints refactor(anthropic): rename experimental_pass_through to pass_through (#43329) 2026-09-26 13:00:50 -07:00
policy_engine feat(lint): add LIT013 flagging *-ok suppressions that suppress nothing and remove the 240 stale ones (#42793) 2026-09-23 17:50:09 -07:00
prompts Merge pull request #38440 from BerriAI/litellm_prompt_registry_env 2026-09-03 14:09:26 -07:00
public_endpoints fix(mcp): align hub publication status and controls (#43241) 2026-09-26 16:53:02 -07:00
rag_endpoints feat(lint): add LIT013 flagging *-ok suppressions that suppress nothing and remove the 240 stale ones (#42793) 2026-09-23 17:50:09 -07:00
realtime_endpoints Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_openai_error_payload_non_llm_routes 2026-09-08 11:09:54 -07:00
rerank_endpoints fix(proxy): seed litellm_call_id into request data before parsing can fail 2026-09-16 20:55:32 +00:00
response_api_endpoints refactor: daily fresh tech debt cleanup, rolling PR (#42710) 2026-09-24 04:17:23 -07:00
response_polling fix(proxy): record response.failed frames in background polling 2026-09-18 15:58:15 -07:00
search_endpoints
shutdown style(proxy): format scheduled job timeout configuration 2026-09-21 19:43:11 +00:00
spend_tracking ci: fail on new unbounded SQL IN lists and add a Prisma chunking helper (#42629) 2026-09-26 13:40:44 -07:00
swagger
test_prompts
types_utils refactor(types): replace Any with proven types in 5 files (#42722) 2026-09-23 03:14:45 -07:00
ui_crud_endpoints fix(proxy): keep the submitted body out of 422 validation errors (#43231) 2026-09-25 17:05:53 -07:00
vector_store_endpoints fix(vector_stores): keep config-defined vector stores listed and read-only (#42574) 2026-09-23 04:02:16 +00:00
vector_store_files_endpoints Merge remote-tracking branch 'origin/main' into litellm_decrease_anys_opus5_r5 2026-09-21 12:57:38 -07:00
vertex_ai_endpoints
video_endpoints refactor: replace Any with precise types across 54 modules 2026-09-14 11:13:39 +00:00
workflows docs: stop advertising sk-1234 as the master key in shipped configs and examples 2026-09-19 12:59:48 -07:00
.gitignore
__init__.py Revert "perf: lazy-load SDK symbols so import litellm stays under 60 MB RSS (…" 2026-09-05 16:07:09 -07:00
_lazy_features.py feat(proxy): add TinyFish Agent API passthrough with per-step billing (#41099) 2026-09-21 21:21:43 -07:00
_lazy_openapi_snapshot.json fix(mcp): report reachability without stored credentials (#43240) 2026-09-26 16:44:49 -07:00
_lazy_openapi_snapshot.py
_new_new_secret_config.yaml
_new_secret_config.yaml docs: stop advertising sk-1234 as the master key in shipped configs and examples 2026-09-19 12:59:48 -07:00
_super_secret_config.yaml
_types.py feat(proxy): add maximum_daily_tag_spend_retention_period cleanup setting (#39221) 2026-09-26 15:07:56 -07:00
bug_report_config.py feat(proxy): admin-only /debug/report sharing the bug report environment (#42440) 2026-09-22 12:05:23 -07:00
cached_logo.jpg
caching_routes.py refactor(typing): replace Any with proven types in 89 more backend files 2026-09-02 23:08:42 +00:00
collector.py feat(proxy): offload spend tracking to a pod-local collector sidecar (#40545) 2026-09-10 17:14:13 -07:00
common_request_processing.py fix(proxy): send a real error event when a /v1/messages stream fails (#41826) 2026-09-25 15:36:35 -07:00
compliance_checks.py fix(guardrails): record not_run when a skipped role mixes text and images 2026-09-15 05:20:56 +00:00
custom_auth_auto.py
custom_prompt_management.py
custom_sso.py
custom_validate.py
dd_span_tagger.py
dev_config.yaml Merge pull request #42071 from BerriAI/litellm_remove_dead_telemetry_flag 2026-09-19 21:48:02 -07:00
enterprise
health_check.py feat(auto-router): integrate JEV context and usage accounting 2026-09-18 21:38:15 +00:00
lambda.py
litellm_pre_call_utils.py fix(spend): attribute CLI session spend to the per-user cli-session alias instead of the hashed session token (#40541) 2026-09-24 18:21:47 -07:00
llamaguard_prompt.txt
logo.jpg
logo_dark.png
mcp_registry.json fix(ui): restore MCP catalog provider logos (#40781) 2026-09-12 11:56:59 -07:00
mcp_tools.py
model_config.yaml
native_compaction.py feat(router): native compact-to-fit across conversation APIs (#42074) 2026-09-21 22:52:29 -07:00
openapi.json
openapi_registry.json
plugin_routes.py refactor(proxy): resolve config and DB settings precedence in one SettingsStore 2026-09-17 23:36:27 -07:00
post_call_rules.py
prisma_migration.py fix(proxy): run migrations through python -m prisma when the prisma console script is not on PATH 2026-09-09 18:17:12 -07:00
prometheus_cleanup.py feat(deploy): metrics sidecar and separate metrics port in Helm and Terraform (#40163) 2026-09-08 13:31:07 -07:00
prometheus_metrics_server.py feat(deploy): metrics sidecar and separate metrics port in Helm and Terraform (#40163) 2026-09-08 13:31:07 -07:00
proxy_cli.py feat(proxy_cli): add --validate_config dry-run flag (#41705) 2026-09-24 17:07:10 -05:00
proxy_config.yaml docs: stop advertising sk-1234 as the master key in shipped configs and examples 2026-09-19 12:59:48 -07:00
proxy_server.py feat(proxy): add maximum_daily_tag_spend_retention_period cleanup setting (#39221) 2026-09-26 15:07:56 -07:00
read_model_list.py
README.md
route_llm_request.py fix(proxy): return 400 instead of 500 for /v1/responses without input 2026-09-19 08:01:33 +00:00
route_priority.py perf(proxy): register liveness and core inference routes first (#40687) 2026-09-11 17:10:38 +00:00
schema.prisma feat(agents): add optional per-agent kill switch webhook (#42841) 2026-09-24 18:26:50 -05:00
start.sh
utils.py feat(guardrails): scan retrieved vector store chunks with the request's pre-call guardrails (#43271) 2026-09-26 14:18:38 -07:00
wildcard_config.yaml Merge pull request #42071 from BerriAI/litellm_remove_dead_telemetry_flag 2026-09-19 21:48:02 -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