litellm/litellm/proxy
Sameer Kankute b97ea585b2
Add method for extracting vector store ids from path params (#16566)
* Add method for extracting vector store ids from path params

* Add vector id handling from path

* Move method to utils
2025-11-26 14:19:30 -08:00
..
_experimental fix: missing await (#17103) 2025-11-25 14:33:38 -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 Add method for extracting vector store ids from path params (#16566) 2025-11-26 14:19:30 -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 Add method for extracting vector store ids from path params (#16566) 2025-11-26 14:19:30 -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 Updating spend writer 2025-11-26 13:31:04 -08:00
discovery_endpoints
example_config_yaml Add enforce user param functionality (#17088) 2025-11-25 09:36:24 -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(pillar): add automatic LiteLLM context headers (#17076) 2025-11-25 19:35:39 -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 Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-24 21:14:05 -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 fix code qa checks 2025-11-26 11:34:22 -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 fix api_key (#17153) 2025-11-26 11:17:11 -08:00
rag_endpoints [Feat] Add new RAG API on LiteLLM AI Gateway (#17109) 2025-11-25 17:54:29 -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 Add cost tracking and logging support 2025-11-25 17:14:59 +05:30
spend_tracking Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-26 12:23:43 -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 Add gemini file search support 2025-11-26 11:17:30 +05:30
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 Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-26 12:23:43 -08:00
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py [Feat] Add new RAG API on LiteLLM AI Gateway (#17109) 2025-11-25 17:54:29 -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
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 [Feat] Add OpenAI compatible bedrock imported models. - qwen etc (#17097) 2025-11-25 12:20:39 -08:00
proxy_server.py Fix db logging for proxy 2025-11-26 17:01:19 +05:30
README.md
route_llm_request.py [Feat] Add new RAG API on LiteLLM AI Gateway (#17109) 2025-11-25 17:54:29 -08:00
schema.prisma Add organization_id to spend logs table 2025-11-22 12:54:49 -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