The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
feat(pass_through_endpoints.py): initial commit of crud endpoints for pass through endpoints
Krrish Dholakia28faafadb11e
diff --git a/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py b/litellm/proxy/pass_through_endpoints/pass_through_endpoints.pyindex 15129854a30..1d9f6911771 100644--- a/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py+++ b/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py@@ -23,6 +23,8 @@ from litellm.integrations.custom_logger import CustomLoggerfrom litellm.proxy._types import ProxyException, UserAPIKeyAuthfrom litellm.proxy.auth.user_api_key_auth import user_api_key_auth+router = APIRouter()+async def set_env_variables_in_header(custom_headers: dict):"""@@ -476,3 +478,41 @@ async def initialize_pass_through_endpoints(pass_through_endpoints: list):)verbose_proxy_logger.debug("Added new pass through endpoint: %s", _path)+++ "/config/pass_through_endpoint/{endpoint_id}",+ tags=["Internal User management"],+ dependencies=[Depends(user_api_key_auth)],+)+async def get_pass_through_endpoints(request: Request, endpoint_id: str):+ """+ GET configured pass through endpoint.++ If no endpoint_id given, return all configured endpoints.+ """+ pass+++ "/config/pass_through_endpoint",+ tags=["Internal User management"],+ dependencies=[Depends(user_api_key_auth)],+)+async def create_pass_through_endpoints(request: Request):+ """+ Create new pass-through endpoint+ """+ pass+++ "/config/pass_through_endpoint",+ tags=["Internal User management"],+ dependencies=[Depends(user_api_key_auth)],+)+async def delete_pass_through_endpoints(request: Request):+ """+ Create new pass-through endpoint+ """+ passdiff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex 2213e348d1a..6483a61b53b 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -194,6 +194,9 @@ from litellm.proxy.openai_files_endpoints.files_endpoints import set_files_confifrom litellm.proxy.pass_through_endpoints.pass_through_endpoints import (initialize_pass_through_endpoints,)+from litellm.proxy.pass_through_endpoints.pass_through_endpoints import (+ router as pass_through_router,+)from litellm.proxy.secret_managers.aws_secret_manager import (load_aws_kms,load_aws_secret_manager,@@ -9895,6 +9898,7 @@ def cleanup_router_config_variables():app.include_router(router)app.include_router(fine_tuning_router)app.include_router(vertex_router)+app.include_router(pass_through_router)app.include_router(health_router)app.include_router(key_management_router)app.include_router(internal_user_router)