litellm/litellm/proxy
Saar wintrov cfd35d3b14
Metadata: fix 401 when audio/transcriptions (#17023)
* Metadata: fix 401 when audio/transcriptions

* check if str, CR fixes
2025-11-24 20:56:27 -08:00
..
_experimental feat: add backend support for OAuth2 auth_type registration via UI (#17006) 2025-11-23 21:52:18 -08:00
agent_endpoints Agents - AI Hub, make agents discoverable on model hub page for internal discovery (#16678) 2025-11-15 18:25:16 -08:00
analytics_endpoints
anthropic_endpoints (fix) propagate x-litellm-model-id in responses (#16986) 2025-11-24 20:40:43 -08:00
auth Remove expired proxy admin keys from cache (#16894) 2025-11-22 14:23:28 -08:00
batches_endpoints Litellm sameer nov 3 stable branch (#16963) 2025-11-22 09:35:05 -08:00
client [Feat] AI Gateway Auth - Allow using JWTs for signing in with Proxy CLI (#16756) 2025-11-17 19:47:29 -08:00
common_utils Metadata: fix 401 when audio/transcriptions (#17023) 2025-11-24 20:56:27 -08:00
config_management_endpoints
container_endpoints Add E2E Container API Support (#16136) 2025-11-01 14:03:51 -07:00
credential_endpoints
custom_hooks
db [Fix] UI - Hide Default Team Settings From Proxy Admin Viewers (#16900) 2025-11-23 22:01:38 -08:00
discovery_endpoints
example_config_yaml feat: allow custom violation message for tool-permission guardrail (#16916) 2025-11-21 08:52:01 -08:00
fine_tuning_endpoints fix: Get custom_llm_provider from query param (#16731) 2025-11-17 19:56:41 -08:00
google_endpoints fix gemini cli by actually streaming the response (#15264) 2025-10-07 11:26:39 -07:00
guardrails feat: add UI support for configuring tool permission guardrails (#17050) 2025-11-24 17:13:07 -08:00
health_check_utils fix lint errors (#15406) 2025-10-10 14:16:23 -07:00
health_endpoints Add Langfuse OTEL and SQS to health check (#16514) 2025-11-12 18:25:30 -08:00
hooks fix: prompt injection not working (#16701) 2025-11-17 20:04:57 -08:00
image_endpoints Fix image edit endpoint (#17046) 2025-11-24 20:52:35 -08:00
management_endpoints Deleting a user from team deletes key user created for team (#17057) 2025-11-24 20:47:43 -08:00
management_helpers [Feat] Tag Management - Add support for setting tag based budgets (#15433) 2025-10-10 19:24:50 -07:00
middleware
ocr_endpoints [Feat] Native /ocr endpoint support (#15573) 2025-10-15 17:20:01 -07:00
openai_files_endpoints Litellm sameer nov 3 stable branch (#16963) 2025-11-22 09:35:05 -08:00
pass_through_endpoints Add cost tracking for cohere embed passthrough endpoint (#17029) 2025-11-24 17:39:26 -08:00
prompts [Feat] UI - Show "get code" section for prompt management + minor polish of showing version history (#16941) 2025-11-21 14:00:33 -08:00
public_endpoints Change provider create fields to JSON (#16985) 2025-11-23 21:57:22 -08:00
rerank_endpoints
response_api_endpoints [Fix] - Responses API - add /openai routes for responses API. (Azure OpenAI SDK Compatibility) (#15988) 2025-10-27 19:12:13 -07:00
search_endpoints fix to .debug 2025-10-23 18:08:56 -07:00
spend_tracking (fix) litellm_logging.py: fix mcp tool call response logging + (fix) responses_bridge: remove unmapped param error mid-stream - allows gpt-5 web search to work via responses api in .completion() (#16946) 2025-11-22 15:48:32 -08:00
swagger Change favicon (#16837) 2025-11-19 20:38:22 -08:00
test_prompts
types_utils
ui_crud_endpoints [Infra] Litellm Backend SSO Changes (#16029) 2025-10-30 14:32:08 -07:00
vector_store_endpoints Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
vector_store_files_endpoints Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
vertex_ai_endpoints
video_endpoints Add Vertex and Gemini Videos API with Cost Tracking + UI support (#16323) 2025-11-08 16:03:51 -08:00
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml Model Armor - Logging guardrail response on llm responses (#16977) 2025-11-22 15:44:28 -08:00
_super_secret_config.yaml
_types.py [Feat] New API - Claude Skills API (Anthropic) (#17042) 2025-11-24 15:01:40 -08:00
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py (fix) propagate x-litellm-model-id in responses (#16986) 2025-11-24 20:40:43 -08:00
custom_auth_auto.py
custom_prompt_management.py
custom_sso.py
custom_validate.py
enterprise
health_check.py Fix Azure DALL-E-3 health check content policy violation by using safe default prompt (#16329) 2025-11-07 15:30:56 -08:00
lambda.py
litellm_pre_call_utils.py Permission Management - disable global guardrails by key/team (#16983) 2025-11-22 15:43:50 -08:00
llamaguard_prompt.txt
logo.jpg
mcp_tools.py
model_config.yaml
openapi.json
post_call_rules.py
prisma_migration.py LiteLLM SDK <-> Proxy: support user param + Prisma - remove use_prisma_migrate flag - redundant as this is now default (#13555) 2025-08-12 22:03:39 -07:00
proxy_cli.py fix(proxy_cli.py): check for env var for IAM_TOKEN_DB_AUTH 2025-11-11 11:56:58 -08:00
proxy_config.yaml [Bug Fix]: Search APIs - error in firecrawl-search "Invalid request body" (#16943) 2025-11-21 14:56:19 -08:00
proxy_server.py [Feat] New API - Claude Skills API (Anthropic) (#17042) 2025-11-24 15:01:40 -08:00
README.md
route_llm_request.py [Feat] New API - Claude Skills API (Anthropic) (#17042) 2025-11-24 15:01:40 -08:00
schema.prisma [Feat] Prompt Management - Allow storing prompt version in DB (#16848) 2025-11-19 13:19:56 -08:00
start.sh
utils.py feat(proxy_server.py): preserve content field even if null (#16988) 2025-11-23 22:05:58 -08:00

litellm-proxy

A local, fast, and lightweight OpenAI-compatible server to call 100+ LLM APIs.

usage

$ pip 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