litellm/litellm/proxy
Yassin Kortam 1aba849af2
fix(ui): surface env-var-sourced theme and logging-callback settings (#34156)
The UI theme and logging-callback read endpoints reported only stored
config while the features resolve their values from the process
environment, so a gateway configured purely through env vars showed
blank settings pages even though branding rendered and callbacks fired.

/get/ui_theme_settings read only litellm_settings.ui_theme_config;
logo_url and favicon_url now fall back to UI_LOGO_PATH and
LITELLM_FAVICON_URL when the stored config leaves them blank.

process_callback (the logging-callbacks block of /get/config/callbacks)
reported every callback env var as unset unless it lived in the config
environment_variables overlay; it now falls back to os.getenv, matching
the slack block. Secret values stay redacted for non-admins via the
existing callback role gate.

Stored values keep winning over the environment, so the UI-driven flow
is unchanged.

Resolves LIT-4667
2026-07-21 18:36:31 -07:00
..
_experimental fix(mcp): judge EMA retention only against the config and DB authorities, never the registry snapshot 2026-07-21 14:54:37 -07:00
a2a fix(a2a): reject malformed protocolVersion suffixes while keeping semver prereleases 2026-07-21 13:24:58 -07:00
agent_endpoints fix(a2a): accept semver protocolVersion values like 0.3.0 in agent cards 2026-07-21 13:03:47 -07:00
analytics_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
anthropic_endpoints feat: litellm oss staging (#31935) 2026-07-03 09:27:31 +05:30
auth chore(proxy): clean up request parameter validation and provider destination handling (#34189) 2026-07-22 00:57:58 +00:00
batches_endpoints test(e2e): add live batches suite across providers and routing scenarios (#30958) 2026-07-02 08:05:23 -07:00
client fix(cli): tolerate an unreadable prior config when carrying the autoroute key forward 2026-07-20 13:25:25 -07:00
common_utils fix(ui): surface env-var-sourced theme and logging-callback settings (#34156) 2026-07-21 18:36:31 -07:00
config_management_endpoints build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
container_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
credential_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_hooks style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
db feat(spend): track prompt compression saved tokens in daily spend aggregates (#33810) 2026-07-18 17:47:54 -07:00
discovery_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
enterprise_billing feat(proxy): push-based OTLP billable-request metering for enterprise deployments (#31592) 2026-07-15 12:12:52 -07:00
example_config_yaml Revert "chore(ci): sync litellm_internal_staging into daily OSS branch (#33337)" (#33339) 2026-07-14 19:32:25 -07:00
fine_tuning_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
google_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
guardrails fix(model_armor): sanitize error details by default (#33908) 2026-07-21 10:28:24 -07:00
health_check_utils style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
health_endpoints chore(lint): zero out crash-class pyright rules and ban new type: ignore comments (#32152) 2026-07-04 16:56:12 -07:00
hooks fix(proxy): enforce max_parallel_requests as a per-slot concurrency gauge (#32441) 2026-07-17 09:29:08 -07:00
image_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
logging_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
management_endpoints fix(ui): reflect REDIS_* env cache config and stop the UI overwriting the stored password (#34160) 2026-07-21 18:36:26 -07:00
management_helpers feat(mcp): add all-proxy-mcpservers sentinel to grant teams every MCP server (#32012) 2026-07-03 13:59:28 -07:00
memory style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
middleware feat(proxy): push-based OTLP billable-request metering for enterprise deployments (#31592) 2026-07-15 12:12:52 -07:00
ocr_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
openai_evals_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
openai_files_endpoints chore(lint): zero out crash-class pyright rules and ban new type: ignore comments (#32152) 2026-07-04 16:56:12 -07:00
pass_through_endpoints fix(passthrough): stop classifying plain 'predict'/'search' paths as Vertex (#33658) 2026-07-17 19:20:00 -07:00
policy_engine fix(policies): reject non-existent team/key/model scope entries on attachment create (#32131) 2026-07-04 11:58:29 -07:00
prompts style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
public_endpoints feat(a2a): support a2a-sdk 1.x proxy routing for 0.3 and 1.0 agents (#30950) 2026-06-29 09:32:39 +05:30
rag_endpoints fix(rag): track LLM completion usage and spend for /v1/rag/query (#32438) 2026-07-17 17:45:27 +00:00
realtime_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
rerank_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
response_api_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
response_polling style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
search_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
shutdown feat(proxy): native /health/drain preStop hook for graceful shutdown (#29439) 2026-06-02 16:30:44 -07:00
spend_tracking feat(spend): raise /spend/logs/v2 page_size cap to 1000 2026-07-20 09:55:38 -07:00
swagger
test_prompts
types_utils fix(proxy): resolve router_settings.plugins dotted paths and load plugins from installed packages (#33644) 2026-07-17 11:23:18 -07:00
ui_crud_endpoints fix(ui): surface env-var-sourced theme and logging-callback settings (#34156) 2026-07-21 18:36:31 -07:00
vector_store_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
vector_store_files_endpoints fix(proxy): resolve team wildcard credentials for vector store files 2026-07-16 21:14:45 -07:00
vertex_ai_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
video_endpoints style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
workflows feat(proxy): durable agent workflow run tracking via /v1/workflows/runs (#26793) 2026-04-29 17:12:18 -07:00
.gitignore
__init__.py
_lazy_features.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
_lazy_openapi_snapshot.json feat(guardrails): forward optional metadata on POST /guardrails/apply_guardrail (#33067) 2026-07-16 01:36:17 +03:00
_lazy_openapi_snapshot.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
_logging.py
_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 fix(proxy): populate user_email on UserAPIKeyAuth for JWT auth (#34174) 2026-07-21 16:11:47 -07:00
cached_logo.jpg
caching_routes.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
common_request_processing.py feat(complexity-router): add return_raw_model_name toggle for response model field (#33875) 2026-07-18 19:24:56 -07:00
compliance_checks.py Revert "chore(ci): sync litellm_internal_staging into daily OSS branch (#33337)" (#33339) 2026-07-14 19:32:25 -07:00
custom_auth_auto.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_prompt_management.py
custom_sso.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_validate.py
dd_span_tagger.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39: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 fix: skip health check for semantic auto_router deployments (#31668) 2026-06-29 19:47:20 -07:00
lambda.py
litellm_pre_call_utils.py chore(proxy): clean up request parameter validation and provider destination handling (#34189) 2026-07-22 00:57:58 +00:00
llamaguard_prompt.txt
logo.jpg
mcp_registry.json fix(mcp): default Linear MCP registry entry to streamable HTTP (#30396) 2026-06-13 14:45:47 -07:00
mcp_tools.py
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 style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -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 style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
prometheus_cleanup.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
proxy_cli.py chore(ci): merge oss branch (#33784) 2026-07-17 23:22:13 +00:00
proxy_config.yaml
proxy_server.py feat(proxy): make DB config-reload interval configurable via config.yaml and UI (#34130) 2026-07-21 22:03:22 +00:00
read_model_list.py feat: add minimal rust router + axum ai-gateway calling router.realtime (2/2) (#31135) 2026-06-23 19:16:34 -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 fix(router): apply team/key enable_tag_filtering to tag routing (#33436) 2026-07-16 14:41:24 -07:00
schema.prisma fix(mcp): make the EMA retention gate authoritative across pods and tighten the assertion store 2026-07-21 14:54:37 -07:00
start.sh
utils.py fix(budget): reset users/teams with NULL budget_reset_at (#33623) 2026-07-20 16:55:38 -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