litellm/litellm/proxy
jesus-berri 4f06ca217f
feat(team): let default_team_params attach access_group_ids to every new team (#49908)
* feat(team): let default_team_params attach access_group_ids to every new team

* fix(types): keep default access_group_ids as Sequence for the type discipline gate

* fix(settings): chunk the default access group existence lookup

* test(team): prove default access groups reach the saved team row and type the settings fixtures

* fix(team): check default access groups on the writer so a fresh group is not rejected behind a read replica
2026-11-05 19:58:51 -08:00
..
_experimental chore(proxy): use neutral example names for baggage tag mappings (#50011) 2026-11-04 14:49:55 +00:00
a2a fix(agents): show non-admin callers the proxy URL in agent cards (#49483) 2026-10-31 16:17:11 -07:00
agent_endpoints fix(azure)!: answer 401 when Entra rejects the deployment's credential (#49863) 2026-11-04 20:44:55 +00:00
alerting_endpoints feat(proxy): add model deprecation alerts with daily requests by key (#50022) 2026-11-05 04:03:42 +00:00
analytics_endpoints fix(proxy): cancel the Admin UI's raw spend-log reads in Postgres after 30s (#49965) 2026-11-03 16:07:00 -08:00
anthropic_endpoints feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
auth feat(proxy)!: only let clients pick S3 buckets the admin allowed (#47496) 2026-11-06 02:50:15 +00:00
batches_endpoints feat(proxy)!: only let clients pick S3 buckets the admin allowed (#47496) 2026-11-06 02:50:15 +00:00
client feat(proxy)!: honor model_info.max_input_tokens in the Codex catalog for stock models (#49701) 2026-11-02 13:27:58 -08:00
common_utils feat(proxy): give Codex accurate model entries for every model in /v1/models (#49825) 2026-11-05 19:31:32 -08:00
config_management_endpoints
config_resolvers feat: email affected owners before model deprecations (#50172) 2026-11-05 16:14:12 +08:00
container_endpoints refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
credential_endpoints fix(credentials): preserve stored info when patching credentials (#49919) 2026-11-03 16:15:09 -08:00
custom_hooks refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
db feat(accounting)!: make the SpendLogs ledger the default accounting path (#49872) 2026-11-05 09:14:10 -08:00
decisions_endpoints fix(decisions): remove the System One question count cap (#47985) 2026-10-23 18:11:40 +00:00
deps feat(skills)!: add portable submissions and admin review (#50160) 2026-11-05 00:56:51 -08:00
discovery_endpoints feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
enterprise_billing feat(proxy): authenticate billing metrics with a cognito bearer token (#49852) 2026-11-04 14:08:40 -08:00
example_config_yaml refactor(types): replace Any with proven types in 21 files (#48921) 2026-10-29 18:43:24 -07:00
fine_tuning_endpoints fix(managed_files): send provider file ids when creating a fine-tuning job from managed files (#46552) 2026-10-19 14:40:15 -07:00
google_endpoints fix(google_genai): read one-object and null spellings of repeated fields in countTokens and generateContent (#48771) 2026-10-28 21:46:06 -07:00
guardrails fix(zscaler_ai_guard)!: scan only the last user turn on requests (#50139) 2026-11-05 13:00:21 -08:00
health_check_utils refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
health_endpoints refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
hooks refactor(prompt_templates): move JSON schema helpers out of common_utils into json_schema_utils (#50241) 2026-11-05 17:25:53 -08:00
image_endpoints fix(proxy): log each endpoint's own call type on failed audio, moderation, image, and rerank spend rows (#49684) 2026-11-02 23:57:11 +00:00
lens refactor(lens): connect LiteLLM to the independent Lens service (#45529) 2026-10-09 16:17:05 -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 157 files (#44798) 2026-10-06 15:31:54 +00:00
management fix(ui): take the dashboard's user role and identity from the server (#47025) 2026-10-17 14:39:33 -07:00
management_endpoints feat(team): let default_team_params attach access_group_ids to every new team (#49908) 2026-11-05 19:58:51 -08:00
management_helpers feat(accounting)!: make the SpendLogs ledger the default accounting path (#49872) 2026-11-05 09:14:10 -08:00
mcp_server refactor: clean up fresh tech debt in proxy auth reads, chatgpt credential forwarding, messages drop_params reads, router context signatures and spend log reads (#46643) 2026-11-04 09:09:50 +00:00
memory refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
middleware feat(skills)!: add portable submissions and admin review (#50160) 2026-11-05 00:56:51 -08:00
ocr_endpoints fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00
openai_evals_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
openai_files_endpoints feat(proxy)!: only let clients pick S3 buckets the admin allowed (#47496) 2026-11-06 02:50:15 +00:00
pass_through_endpoints fix(azure)!: answer 401 when Entra rejects the deployment's credential (#49863) 2026-11-04 20:44:55 +00:00
policy_engine refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
prompts refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
public_endpoints feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
rag_endpoints feat(vector_stores): add OpenSearch k-NN search as a vector store provider (#47759) 2026-10-29 08:15:05 -07:00
realtime_endpoints feat(realtime)!: support latest OpenAI audio models (#35600) 2026-11-03 07:27:52 +00:00
rerank_endpoints fix(proxy): log each endpoint's own call type on failed audio, moderation, image, and rerank spend rows (#49684) 2026-11-02 23:57:11 +00:00
response_api_endpoints fix(guardrails)!: check Anthropic and Responses request tools in tool_permission pre_call (#41011) 2026-11-04 20:34:34 +00:00
response_polling feat(chat): resume replies after browser disconnects (#49461) 2026-10-31 14:43:24 -07:00
roi_calculator perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
search_endpoints refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
shutdown feat(proxy): configure the request header buffer size (#49883) 2026-11-03 16:11:46 -08:00
spend_tracking feat(spend-logs): opt-in latest_turn mode that stores only the current turn of stateless requests (#49544) 2026-11-05 19:41:15 -08:00
swagger feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
telemetry refactor: clean up fresh tech debt in per-user Copilot auth, Ternary FOCUS export and telemetry (#45769) 2026-10-15 04:29:27 +00:00
test_prompts
types_utils chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
ui_crud_endpoints feat(team): let default_team_params attach access_group_ids to every new team (#49908) 2026-11-05 19:58:51 -08:00
vector_store_endpoints feat(vector_stores): add OpenSearch k-NN search as a vector store provider (#47759) 2026-10-29 08:15:05 -07:00
vector_store_files_endpoints refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
vertex_ai_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
video_endpoints refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +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 refactor(logging): load enterprise alerting loggers lazily so import litellm skips proxy types (#44762) 2026-10-05 22:06:53 -07:00
_lazy_features.py feat(skills): add optional manual security scans (#50194) 2026-11-05 01:57:39 -08:00
_lazy_openapi_snapshot.json feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
_lazy_openapi_snapshot.py refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
_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
_router_host.py refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
_super_secret_config.yaml
_types.py feat(spend-logs): opt-in latest_turn mode that stores only the current turn of stateless requests (#49544) 2026-11-05 19:41:15 -08:00
admin_mcp.py fix: enforce LiteAdmin MCP route permissions (#48080) 2026-10-30 02:00:04 +00:00
bug_report_config.py refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
cached_logo.jpg
caching_routes.py refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
collector.py
common_request_processing.py fix(proxy): answer an upstream overload with 503 server_is_overloaded on OpenAI routes (#49993) 2026-11-04 16:37:55 -08: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 feat: forward-port dd user_email span tag and model hub description from internal staging (#42749) 2026-10-10 16:48:49 -07:00
dev_config.yaml Merge pull request #42071 from BerriAI/litellm_remove_dead_telemetry_flag 2026-09-19 21:48:02 -07:00
dev_reload.py fix(proxy)!: support reload with multiple workers (#45909) 2026-11-01 00:57:32 +00:00
enterprise
health_check.py refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
lambda.py
litellm_pre_call_utils.py refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07: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 chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
model_config.yaml
model_insights_tasks.json feat: add model leaderboard page (#43649) 2026-09-28 19:40:04 -07:00
moyai_endpoints.py refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -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(types): replace Any with proven types in 14 files (#48928) 2026-10-29 07:26:07 -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 feat(prometheus): cap series per metric for every labeled metric (#44420) 2026-10-06 01:28:44 +00:00
prometheus_metrics_server.py perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
proxy_cli.py feat(proxy): configure the request header buffer size (#49883) 2026-11-03 16:11:46 -08: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(spend-logs): opt-in latest_turn mode that stores only the current turn of stateless requests (#49544) 2026-11-05 19:41:15 -08:00
read_model_list.py chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
README.md
route_llm_request.py feat(interactions): forward continuation_token and type requires_continuation so callers can resume a long decode (#50151) 2026-11-05 15:38:44 -08:00
route_priority.py fix(proxy): let configured pass-through endpoints outrank built-in provider prefix routes (#44133) 2026-10-10 12:26:17 -07:00
schema.prisma feat(skills): show download counts and downloader history (#50165) 2026-11-05 05:25:08 -08:00
start.sh
tracing_endpoints.py refactor(lens): connect LiteLLM to the independent Lens service (#45529) 2026-10-09 16:17:05 -07:00
tracing_runtime.py fix(proxy): cooldown errors carry 429, Sentry starts at boot without request bodies, tracing failures log at ERROR, exporter counters exported (#46344) 2026-10-16 00:53:52 +00:00
utils.py fix(users)!: validate custom IDs and reject concurrent duplicate creation (#49748) 2026-11-05 17:07:19 -08: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