litellm/litellm/proxy
moe-berri cb00dbecd7
feat(ui): improve trace inspection and ROI estimation (#44351)
* feat(lens): simplify trace inspection in the gateway drawer

* feat(lens): add a conversation view for full traces

* test(lens): keep normalized message fixtures type safe

* refactor(lens): make conversation view read like a chat

* refactor(lens): use a quiet trace view menu

* refactor(lens): make trace view tabs explicit

* refactor(lens): restore compact trace view switch

* fix(lens): preserve complete conversation history and tool types

* feat(lens): add trace full-screen and close controls

* fix(lens): show forwarded answers and agent errors once

* fix(lens): reset full screen when closing a trace

* fix(roi): estimate linked authors and clarify model selection

* fix: preserve trace errors and ROI results across partial failures

* fix(roi): correct pagination variable typing

* fix(ui): place loaded root failures in conversation order

* fix(roi): read estimator recommendations from model catalog

* revert: remove catalog-driven ROI recommendations
2026-10-03 01:18:16 -07:00
..
_experimental refactor(mcp): extract upstream preparation and support modern clients (#44232) 2026-10-02 16:04:11 -07:00
a2a refactor(types): replace Any with proven types in 32 files 2026-09-21 10:51:46 +00:00
agent_endpoints feat(proxy): bounded daily activity routes for all usage entities (#43408) 2026-10-01 16:57:23 -07: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 chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
auth feat: add Bespoke Nimble gateway and OSS classifier support (#44246) 2026-10-02 19:37:08 -07:00
batches_endpoints fix(proxy): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids (#43787) 2026-10-02 22:48:53 -07:00
client chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
common_utils fix(guardrails): encrypt guardrail litellm_params secrets at rest (#43627) 2026-10-02 22:49:41 -07:00
config_management_endpoints
config_resolvers fix(proxy): restore pre-config-wins handling of pass-through endpoints (#43962) 2026-09-30 22:09:29 -07:00
container_endpoints
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 fix(search_tools): encrypt search tool litellm_params at rest (#43631) 2026-10-02 22:53:18 -07:00
discovery_endpoints feat(mcp)!: disable stdio MCP servers by default (#44066) 2026-10-02 10:28:04 -07:00
enterprise_billing
example_config_yaml chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
fine_tuning_endpoints
google_endpoints
guardrails fix(guardrails): encrypt guardrail litellm_params secrets at rest (#43627) 2026-10-02 22:49:41 -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 chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
hooks chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
image_endpoints fix(proxy): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids (#43787) 2026-10-02 22:48:53 -07:00
lens feat(lens): issue briefs with problem, user goal, outcome and test cases (#44311) 2026-10-03 03:00:29 +00: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 refactor(proxy): answer every team access check with TeamAccess.allows (#43364) 2026-09-30 15:27:33 -07:00
management_endpoints feat(ui): improve trace inspection and ROI estimation (#44351) 2026-10-03 01:18:16 -07:00
management_helpers feat: add Bespoke Nimble gateway and OSS classifier support (#44246) 2026-10-02 19:37:08 -07:00
memory refactor(proxy): answer every team access check with TeamAccess.allows (#43364) 2026-09-30 15:27:33 -07:00
middleware feat(proxy): gzip buffered responses for clients that accept it (#44052) 2026-10-01 13:43:18 -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
openai_files_endpoints fix(vector_stores): return managed file ids from vector store file list (#43800) 2026-10-02 21:28:50 -07:00
pass_through_endpoints fix(vector_stores): return managed file ids from vector store file list (#43800) 2026-10-02 21:28:50 -07:00
policy_engine chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
prompts
public_endpoints fix(ui): register tencent in the Add Model provider dropdown (#40924) 2026-10-02 10:15:41 -07:00
rag_endpoints chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
realtime_endpoints
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 fix(proxy): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids (#43787) 2026-10-02 22:48:53 -07:00
response_polling fix(proxy): record response.failed frames in background polling 2026-09-18 15:58:15 -07:00
roi_calculator feat(ui): improve trace inspection and ROI estimation (#44351) 2026-10-03 01:18:16 -07:00
search_endpoints fix(search_tools): encrypt search tool litellm_params at rest (#43631) 2026-10-02 22:53:18 -07:00
shutdown style(proxy): format scheduled job timeout configuration 2026-09-21 19:43:11 +00:00
spend_tracking feat(roi): add GitLab sources and branch cost attribution (#44324) 2026-10-03 06:01:43 +00:00
swagger feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
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 chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
vector_store_endpoints fix(proxy): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids (#43787) 2026-10-02 22:48:53 -07:00
vector_store_files_endpoints fix(vector_stores): return managed file ids from vector store file list (#43800) 2026-10-02 21:28:50 -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
_lazy_features.py feat: add Bespoke Nimble gateway and OSS classifier support (#44246) 2026-10-02 19:37:08 -07:00
_lazy_openapi_snapshot.json feat(ui): improve trace inspection and ROI estimation (#44351) 2026-10-03 01:18:16 -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(roi): add GitLab sources and branch cost attribution (#44324) 2026-10-03 06:01:43 +00: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
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): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids (#43787) 2026-10-02 22:48:53 -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 chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
lambda.py
litellm_pre_call_utils.py feat(roi): add GitLab sources and branch cost attribution (#44324) 2026-10-03 06:01:43 +00:00
llamaguard_prompt.txt
logo.png feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
logo_dark.png feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
logo_monogram.png feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
logo_monogram_dark.png feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
mcp_registry.json feat(mcp): add Microsoft 365 (Graph) server to the MCP catalog (#43099) 2026-10-02 02:50:29 +00:00
mcp_tools.py
model_config.yaml
model_insights_tasks.json feat: add model leaderboard page (#43649) 2026-09-28 19:40:04 -07:00
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): always exit when database setup fails at boot (#44141) 2026-10-01 21:51:06 -07:00
prometheus_cleanup.py
prometheus_metrics_server.py
proxy_cli.py fix(proxy): exit when DATABASE_URL is set but the Prisma toolchain is missing (#44207) 2026-10-02 10:32:04 -07: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 fix(proxy): stamp the client alias on a copy of each streamed chunk so pricing sees the deployment model (#44341) 2026-10-03 06:44:52 +00:00
read_model_list.py
README.md
route_llm_request.py fix(proxy): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids (#43787) 2026-10-02 22:48:53 -07:00
route_priority.py perf(proxy): register liveness and core inference routes first (#40687) 2026-09-11 17:10:38 +00:00
schema.prisma fix(vector_stores): return managed file ids from vector store file list (#43800) 2026-10-02 21:28:50 -07:00
start.sh
tracing_endpoints.py fix(proxy): share ownership permissions for spend logs and traces (#44239) 2026-10-03 01:38:54 +00:00
tracing_runtime.py fix(tracing): unify ClickHouse storage configuration (#43941) 2026-10-02 16:31:26 +00:00
utils.py perf(proxy): batch daily model usage writes instead of upserting per request (#44243) 2026-10-02 16:07:18 -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