litellm/litellm/proxy
Ishaan Jaff ce113f4e4b
[Docs] Add docs on using pydantic ai agents with LiteLLM A2a gateway (#18026)
* init A2AProviderConfigManager

* move file

* move file

* add pydnatic ai folder

* init providers

* test_pydantic_ai_non_streaming

* fix import

* INIT pydantic

* use_a2a_form_fields

* test_vertex_agent_engine_streaming

* add agent_engine

* init transform for agent engine

* init agent engine

* VertexAgentEngineSSEStreamIterator

* sample

* ui add new fields

* fix vertex_credentials

* working SSE iterator

* TestVertexAgentEngineTransformRequest

* fix code QA check

* stash docs

* docs fix

* fix logo

* docs fix

* doc pydantic ai

* docs pydantic ai

* new provider

* docs fix
2025-12-15 19:43:12 -08:00
..
_experimental [Docs] Add docs on using pydantic ai agents with LiteLLM A2a gateway (#18026) 2025-12-15 19:43:12 -08:00
agent_endpoints Merge pull request #17781 from BerriAI/litellm_daily_agent_table 2025-12-11 15:01:50 -08:00
analytics_endpoints fix(sql): Optimize SpendLogs queries to use timestamp filtering for index usage (#17504) 2025-12-04 21:52:57 -08:00
anthropic_endpoints [Fix] CI/CD – Clean Up Performance PR Changes & others (#17838) 2025-12-11 12:50:03 -08:00
auth [Feat] JWT Auth - auth allow selecting team_id from request header (#17884) 2025-12-12 10:18:20 -08:00
batches_endpoints Respect custom llm provider in header 2025-12-01 08:36:29 +05:30
client add a new feature fix to expose the team alias when authenticating th… (#17725) 2025-12-10 10:10:28 -08:00
common_utils [feat]: Add opt-in evidence results for Pillar Security guardrail during monitoring (#17812) 2025-12-12 04:09:13 -08:00
config_management_endpoints
container_endpoints [Feat] Containers API - add new container API file management + UI Interface (#17745) 2025-12-09 17:33:26 -08:00
credential_endpoints Change credential encryption to only affect db credentials 2025-12-09 13:36:40 -08:00
custom_hooks
db Merge pull request #16764 from BerriAI/litellm_tag_spend_dedupe 2025-12-11 15:20:16 -08:00
discovery_endpoints Change is_sso_configured to auto_redirect_to_sso 2025-12-03 15:48:50 -08:00
example_config_yaml Add enforce user param functionality (#17088) 2025-11-25 09:36:24 -08:00
fine_tuning_endpoints
google_endpoints Support model names with slashes on Gemini endpoints (#17743) 2025-12-09 18:40:51 -08:00
guardrails Revert "Revert "Litellm bedrock guardrails block precedence over masking (#17…" (#18023) 2025-12-16 08:42:10 +05:30
health_check_utils
health_endpoints Revert "Add license metadata to health/readiness endpoint. (#15997)" 2025-12-05 19:31:30 -08:00
hooks Merge pull request #17707 from raghav-stripe/raghav-fix-responsesapi-rl 2025-12-11 08:57:16 +05:30
image_endpoints Fix image edit endpoint (#17046) 2025-11-24 20:52:35 -08:00
management_endpoints Merge pull request #16764 from BerriAI/litellm_tag_spend_dedupe 2025-12-11 15:20:16 -08:00
management_helpers
middleware
ocr_endpoints
openai_files_endpoints [Fix] CI/CD - mypy & check_code_and_doc_quality & mcp_testing (#17920) 2025-12-13 08:18:43 -08:00
pass_through_endpoints Guardrails API - support LLM tool call response checks on /chat/completions, /v1/responses, /v1/messages on regular + streaming calls (#17619) 2025-12-15 18:19:52 +05:30
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 [Feat] New Provider - VertexAI Agent Engine (#18014) 2025-12-15 19:14:49 -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 [QA] Cursor Integration x LiteLLM (#17855) 2025-12-13 12:49:45 -08:00
response_polling Fix lint and mypy error for response api polling 2025-12-08 20:42:23 +05:30
search_endpoints Add cost tracking and logging support 2025-11-25 17:14:59 +05:30
spend_tracking [Fix] CI/CD – Docs & Spend logs (#17843) 2025-12-11 14:00:33 -08:00
swagger
test_prompts
types_utils
ui_crud_endpoints Merge pull request #17668 from BerriAI/litellm_sso_config_2 2025-12-11 15:17:33 -08:00
vector_store_endpoints [Bug fix] Vector Store List Endpoint Returns 404 (#17229) 2025-11-27 12:51:51 -08:00
vector_store_files_endpoints
vertex_ai_endpoints Move query params to create_pass_through_route call (#17660) 2025-12-08 12:57:49 -08:00
video_endpoints Fix : use litellm params for other video apis 2025-12-09 23:03:29 +05:30
__init__.py
_logging.py
_new_new_secret_config.yaml
_new_secret_config.yaml Guardrails API - support LLM tool call response checks on /chat/completions, /v1/responses, /v1/messages on regular + streaming calls (#17619) 2025-12-15 18:19:52 +05:30
_super_secret_config.yaml
_types.py Merge pull request #17940 from BerriAI/litellm_ui_mcp_headers 2025-12-13 15:20:55 -08:00
.gitignore
cached_logo.jpg
caching_routes.py
common_request_processing.py Fix x-litellm-key-spend update 2025-12-12 11:44:51 +05:30
custom_auth_auto.py
custom_prompt_management.py [Fix] CI/CD - mypy & check_code_and_doc_quality & mcp_testing (#17920) 2025-12-13 08:18:43 -08:00
custom_sso.py
custom_validate.py
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py Fix: litellm user auth not passing issue 2025-12-02 11:25:32 +05:30
llamaguard_prompt.txt
logo.jpg
mcp_tools.py
model_config.yaml
openapi.json
post_call_rules.py
prisma_migration.py
proxy_cli.py
proxy_config.yaml [Feat] Agent Gateway - allow adding langgraph, bedrock agent core agents (#17802) 2025-12-10 19:13:50 -08:00
proxy_server.py Update proxy_server.py (#17468) 2025-12-12 04:34:43 -08:00
README.md
route_llm_request.py Merge pull request #17732 from BerriAI/litellm_videos_bugs_2 2025-12-10 07:49:55 +05:30
schema.prisma fix: add storage_backend and storage_url columns to schema.prisma files (#17936) 2025-12-13 13:28:34 -08:00
start.sh
utils.py Prompt Management - new API for integrating providers (#17829) 2025-12-11 15:43:40 -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