litellm/litellm/proxy
fzowl f663794fcd
feat(voyage): rebrand to VoyageAI by MongoDB and route MongoDB keys to ai.mongodb.com (#41812)
* feat(voyage): rebrand to VoyageAI by MongoDB, refresh model list, support both contextual input shapes

* fix(voyage): send auto-chunking params for flat contextual inputs

A flat list[str] or bare str for the contextualized embeddings endpoint is
only valid as documents with enable_auto_chunking=True and input_type=document,
or as queries with input_type=query. Default those params for non-query flat
inputs so the request matches the live API contract, while letting caller-set
values win. Nested list[list[str]] still passes through unchanged.

Tests now assert the auto-chunking params instead of only echoing inputs.

* feat(voyage): route MongoDB-issued keys to ai.mongodb.com

Mirror voyageai.util.get_default_base_url from the official SDK: a key with
the `al-` prefix is issued by MongoDB and is only valid on ai.mongodb.com,
every other key on api.voyageai.com. The choice now lives in one shared
helper that the embedding, contextual, multimodal, and rerank configs all
use for both the default base URL and the Authorization header, so the host
and the key always agree.

Also drops the voyage-4-nano and voyage-multilingual-2 model map entries:
voyage-4-nano is not served on the Voyage API and voyage-multilingual-2 is
an older model, so neither belongs in this change.

* fix(voyage): restore MongoDB routing on contextual endpoint and re-add voyage-4-nano after upstream merge

The upstream merge replaced the contextual config's get_complete_url with a
Voyage-only host and dropped voyage-4-nano from the model map. Reapply the
al- key routing via get_default_base_url and add voyage-4-nano (open-weight,
per docs.voyageai.com) so the branch keeps its task changes on top of upstream.

* fix(voyage): drop voyage-4-nano and the contextual tests upstream already covers

voyage-4-nano is not served on the Voyage API, so it does not belong in the
model map. The contextual input tests duplicate
tests/test_litellm/llms/voyage/test_voyage_contextual_embedding.py, which
landed upstream with the auto-chunking fix this branch was carrying.

* test(voyage): drop sys.path.insert from the voyage common utils test

* fix(voyage): route rerank on the key it authenticates with

get_complete_url picked the rerank host from the environment while the auth
header carried the request key, so an explicit MongoDB-issued key was posted
to api.voyageai.com. validate_environment now hands the resolved key to the
config instance and get_complete_url reads it back, so the host and the
credential always come from one key. The config is built per request, so
nothing carries over between them.

* test: allow ultrafast pricing keys in model prices schema

* test: drop ultrafast schema keys now added upstream

* test(integration): prove voyage key-based host routing on the wire

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-08 13:12:47 -07:00
..
_experimental fix(mcp): preserve elicitation context and report relay failures (#45255) 2026-10-08 10:18:25 -07:00
a2a perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
agent_endpoints feat(decisions): serve System One format at /v1/systemone and OpenAI format at /v1/decisions (#45184) 2026-10-07 21:41:03 -07:00
analytics_endpoints perf(types): defer pydantic schema builds via shared LiteLLMBaseModel (#44720) 2026-10-05 22:10:08 -07:00
anthropic_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
auth feat(fireworks_ai): forward the LiteLLM user id as user behind fireworks_forward_user_id (#45265) 2026-10-08 12:48:16 -07:00
batches_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
client fix(cli): show full-session auto-router cost comparison (#44959) 2026-10-06 16:24:14 -07:00
common_utils fix(proxy): answer a rejected websocket handshake without crashing the HTTP exception handler (#45251) 2026-10-07 22:27:46 -07:00
config_management_endpoints
config_resolvers fix(proxy): enforce internal-user model creation prohibition (#44438) 2026-10-05 11:32:05 -07:00
container_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
credential_endpoints refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
custom_hooks refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
db fix(proxy): retry lock-timed-out daily spend batches in place so the shutdown flush keeps them (#45273) 2026-10-08 12:05:47 -07:00
decisions_endpoints feat(decisions): add OpenAI as a Decisions provider behind a shared decisions format (#45214) 2026-10-08 04:57:41 +00:00
discovery_endpoints feat(mcp)!: disable stdio MCP servers by default (#44066) 2026-10-02 10:28:04 -07:00
enterprise_billing
example_config_yaml chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
fine_tuning_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
google_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
guardrails refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
health_check_utils fix(otel): nest cache spans under their operation and name service spans by purpose (#44150) 2026-10-03 09:20:27 -07:00
health_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
hooks refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
image_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
lens fix(lens): block teamless feedback writes and fix retention test (#45266) 2026-10-08 07:54:11 -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(projects): show Projects to team and org admins and scope it correctly (#41325) 2026-10-06 14:33:31 -07:00
management_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
management_helpers refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
memory refactor(proxy): rename management/teams/access.py to authz.py (#44624) 2026-10-05 19:11:20 +00:00
middleware refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
ocr_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -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 refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
pass_through_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
policy_engine refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
prompts refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
public_endpoints feat(voyage): rebrand to VoyageAI by MongoDB and route MongoDB keys to ai.mongodb.com (#41812) 2026-10-08 13:12:47 -07:00
rag_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
realtime_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
rerank_endpoints fix(proxy): seed litellm_call_id into request data before parsing can fail 2026-09-16 20:55:32 +00:00
response_api_endpoints fix(proxy): keep idle responses websockets open until a configurable session limit (#44433) 2026-10-07 19:26:30 -07:00
response_polling fix(otel): nest cache spans under their operation and name service spans by purpose (#44150) 2026-10-03 09:20:27 -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(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
shutdown style(proxy): format scheduled job timeout configuration 2026-09-21 19:43:11 +00:00
spend_tracking refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
swagger feat(ui): adopt the new LiteLLM logo and monogram (#43913) 2026-09-30 14:51:06 -07:00
test_prompts
types_utils refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
ui_crud_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
vector_store_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
vector_store_files_endpoints refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07: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(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07: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(mcp): support upstream OAuth client metadata identities (#45231) 2026-10-08 04:10:34 -07:00
_lazy_openapi_snapshot.json feat(decisions): serve System One format at /v1/systemone and OpenAI format at /v1/decisions (#45184) 2026-10-07 21:41:03 -07:00
_lazy_openapi_snapshot.py
_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
_super_secret_config.yaml
_types.py feat(mcp): support upstream OAuth client metadata identities (#45231) 2026-10-08 04:10:34 -07:00
admin_mcp.py feat(proxy): embed enterprise LiteAdmin MCP in LiteLLM images (#44610) 2026-10-05 15:24:34 -07:00
bug_report_config.py feat(proxy): admin-only /debug/report sharing the bug report environment (#42440) 2026-09-22 12:05:23 -07:00
cached_logo.jpg
caching_routes.py fix(security): remove the publicly known master key from the repo (#44718) 2026-10-06 10:55:24 -07:00
collector.py
common_request_processing.py refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07: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
dev_config.yaml Merge pull request #42071 from BerriAI/litellm_remove_dead_telemetry_flag 2026-09-19 21:48:02 -07:00
enterprise
health_check.py refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
lambda.py
litellm_pre_call_utils.py fix(proxy): traceparent/baggage fallback must not override caller metadata (#43688) 2026-10-07 19:24:50 -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
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(proxy): type fresh Moyai connect helpers and drop MCP rpm getattr (#45315) 2026-10-08 01:31:59 -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(proxy): resolve config and DB settings precedence in one SettingsStore 2026-09-17 23:36:27 -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 refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07: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 fix(proxy): use budget reset window for projected spend alerts (#31942) 2026-10-08 12:02:40 -07:00
read_model_list.py
README.md
route_llm_request.py fix(router): honor a per-request fallbacks list on a mid-stream fallback (#45227) 2026-10-07 22:25:22 -07:00
route_priority.py
schema.prisma feat(lens): isolate ingestion and investigations in a Rust service (#45148) 2026-10-07 17:18:58 -07:00
start.sh
tracing_endpoints.py feat(lens): isolate ingestion and investigations in a Rust service (#45148) 2026-10-07 17:18:58 -07:00
tracing_runtime.py feat(lens): isolate ingestion and investigations in a Rust service (#45148) 2026-10-07 17:18:58 -07:00
utils.py fix(proxy): use budget reset window for projected spend alerts (#31942) 2026-10-08 12:02:40 -07: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