litellm/litellm/proxy
milan-berri e0a578fbdd
fix: remove leading space from license public_key.pem (#25339)
* fix: remove leading space from license public_key.pem

PEM must begin with -----BEGIN; a leading ASCII space breaks
cryptography.load_pem_public_key on older cryptography (e.g. 41.x),
causing OpenSSL no start line / deserialize errors.

Made-with: Cursor

* test: assert license public_key.pem loads as valid PEM

Regression guard for leading whitespace before -----BEGIN, which breaks
load_pem_public_key on older cryptography (e.g. 41.x).

Made-with: Cursor
2026-04-08 21:30:38 -07:00
..
_experimental fix(mcp): move inline imports to module level and enforce stdio allowlist 2026-04-08 21:28:43 +05:30
agent_endpoints
analytics_endpoints
anthropic_endpoints Litellm ishaan march 20 (#24303) 2026-03-21 12:40:11 -07:00
auth fix: remove leading space from license public_key.pem (#25339) 2026-04-08 21:30:38 -07:00
batches_endpoints Merge pull request #23957 from Sameerlite/litellm_vertex-cancel-batch 2026-03-20 23:32:50 +05:30
client
common_utils Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
config_management_endpoints
container_endpoints
credential_endpoints
custom_hooks
db cherry-pick: tag query fix + MCP metadata support (#25145) 2026-04-04 16:44:02 -07:00
discovery_endpoints feat: add control plane for multi-proxy worker management 2026-03-19 22:50:19 -07:00
example_config_yaml Litellm fix update bedrock models (#24947) 2026-04-01 19:22:54 -07:00
fine_tuning_endpoints
google_endpoints
guardrails Merge remote-tracking branch 'origin/main' into litellm_feat-add-guardrail 2026-04-04 16:17:38 -07:00
health_check_utils Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
health_endpoints Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
hooks Litellm ishaan march30 (#24887) (#25151) 2026-04-04 14:44:07 -07:00
image_endpoints
management_endpoints [Refactor] Align /v2/key/info response handling with v1 2026-04-07 15:21:42 -07:00
management_helpers Litellm ishaan march23 - MCP Toolsets + GCP Caching fix (#25146) (#25155) 2026-04-04 16:23:21 -07:00
middleware
ocr_endpoints
openai_evals_endpoints
openai_files_endpoints
pass_through_endpoints feat(proxy): add project_alias tracking through callback metadata pipeline 2026-03-23 10:44:17 -07:00
policy_engine Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
prompts Litellm ishaan april1 try2 (#25110) 2026-04-03 14:57:44 -07:00
public_endpoints feat(ui): expose Azure Entra ID credential fields in provider form 2026-04-04 11:19:45 -07:00
rag_endpoints
realtime_endpoints
rerank_endpoints
response_api_endpoints
response_polling
search_endpoints
spend_tracking Litellm ishaan march30 (#24887) (#25151) 2026-04-04 14:44:07 -07:00
swagger
test_prompts
types_utils
ui_crud_endpoints
vector_store_endpoints
vector_store_files_endpoints
vertex_ai_endpoints
video_endpoints
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml
_super_secret_config.yaml
_types.py fix(mcp): move inline imports to module level and enforce stdio allowlist 2026-04-08 21:28:43 +05:30
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py fix(guardrails): return HTTP 400 instead of 500 for Model Armor streaming blocks (#24693) 2026-04-02 21:28:52 -07:00
compliance_checks.py
custom_auth_auto.py
custom_prompt_management.py
custom_sso.py
custom_validate.py
dd_span_tagger.py
enterprise
health_check.py Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
lambda.py
litellm_pre_call_utils.py Litellm team model group name routing fix (#25148) (#25154) 2026-04-04 15:13:54 -07:00
llamaguard_prompt.txt
logo.jpg
mcp_registry.json
mcp_tools.py
model_config.yaml
openapi_registry.json
openapi.json
post_call_rules.py
prisma_migration.py
prometheus_cleanup.py
proxy_cli.py
proxy_config.yaml
proxy_server.py cherry-pick: tag query fix + MCP metadata support (#25145) 2026-04-04 16:44:02 -07:00
README.md
route_llm_request.py
schema.prisma Litellm ishaan march23 - MCP Toolsets + GCP Caching fix (#25146) (#25155) 2026-04-04 16:23:21 -07:00
start.sh
utils.py cherry-pick: tag query fix + MCP metadata support (#25145) 2026-04-04 16:44:02 -07: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