cortex-hub / test_venv / lib / python3.9 / site-packages / litellm / proxy /
@Antigravity AI Antigravity AI authored 9 hours ago
..
_experimental Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
agent_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
analytics_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
anthropic_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
auth Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
batches_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
client Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
common_utils Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
config_management_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
container_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
credential_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
custom_hooks Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
db Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
discovery_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
example_config_yaml Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
fine_tuning_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
google_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
guardrails Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
health_check_utils Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
health_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
hooks Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
image_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
management_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
management_helpers Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
middleware Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
ocr_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
openai_evals_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
openai_files_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
pass_through_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
policy_engine Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
prompts Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
public_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
rag_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
realtime_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
rerank_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
response_api_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
response_polling Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
search_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
spend_tracking Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
swagger Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
test_prompts Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
types_utils Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
ui_crud_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
vector_store_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
vector_store_files_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
vertex_ai_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
video_endpoints Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
.gitignore Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
README.md Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
__init__.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
_logging.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
_new_new_secret_config.yaml Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
_new_secret_config.yaml Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
_super_secret_config.yaml Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
_types.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
cached_logo.jpg Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
caching_routes.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
common_request_processing.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
compliance_checks.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
custom_auth_auto.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
custom_prompt_management.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
custom_sso.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
custom_validate.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
dd_span_tagger.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
health_check.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
lambda.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
litellm_pre_call_utils.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
llamaguard_prompt.txt Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
logo.jpg Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
mcp_registry.json Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
mcp_tools.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
model_config.yaml Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
openapi.json Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
openapi_registry.json Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
post_call_rules.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
prisma_migration.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
prometheus_cleanup.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
proxy_cli.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
proxy_config.yaml Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
proxy_server.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
route_llm_request.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
schema.prisma Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
start.sh Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
utils.py Hardened Windows Agent Task Termination and Automatic Cleanup 9 hours ago
README.md

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