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
Add documentation for adding method
Sameer Kankute5bd7bf1b3e77
diff --git a/docs/my-website/docs/proxy/pass_through.md b/docs/my-website/docs/proxy/pass_through.mdindex cf8168764b8..e9c1d796969 100644--- a/docs/my-website/docs/proxy/pass_through.md+++ b/docs/my-website/docs/proxy/pass_through.md@@ -166,6 +166,7 @@ general_settings:auth: boolean # Enable LiteLLM authentication (Enterprise)forward_headers: boolean # Forward all incoming headersinclude_subpath: boolean # If true, forwards requests to sub-paths (default: false)+ methods: list[string] # Optional: HTTP methods (e.g., ["GET", "POST"]). If not specified, all methods are supported.headers: # Custom headers to addAuthorization: string # Auth header for target APIcontent-type: string # Request content type@@ -201,6 +202,48 @@ general_settings:---+### Method-Specific Routing++You can configure different target URLs for the same path using different HTTP methods. This is useful when different backends handle different operations:++<Image+ img={require('../../img/passthrough_method_setup.png')}+ style={{width: '60%', display: 'block', margin: '2rem auto'}}+/>++```yaml+general_settings:+ pass_through_endpoints:+ # GET requests to /azure/kb go to read API+ - path: "/azure/kb"+ target: "https://read-api.example.com/knowledge-base"+ methods: ["GET"]+ headers:+ Authorization: "bearer os.environ/READ_API_KEY"++ # POST requests to /azure/kb go to write API+ - path: "/azure/kb"+ target: "https://write-api.example.com/knowledge-base"+ methods: ["POST"]+ headers:+ Authorization: "bearer os.environ/WRITE_API_KEY"++ # PUT requests to /azure/kb go to update API+ - path: "/azure/kb"+ target: "https://update-api.example.com/knowledge-base"+ methods: ["PUT"]+ headers:+ Authorization: "bearer os.environ/UPDATE_API_KEY"+```++**Key Points:**+- If `methods` is not specified, the endpoint supports all HTTP methods (GET, POST, PUT, DELETE, PATCH)+- Multiple endpoints can share the same path as long as they have different methods+- You can specify multiple methods for a single endpoint: `methods: ["GET", "POST"]`+- This allows you to route to different backends based on the operation type++---+## Advanced: Custom AdaptersFor complex integrations (like Anthropic/Bedrock clients), you can create custom adapters that translate between different API schemas.diff --git a/docs/my-website/img/passthrough_method_setup.png b/docs/my-website/img/passthrough_method_setup.pngnew file mode 100644index 00000000000..584e3b966c6Binary files /dev/null and b/docs/my-website/img/passthrough_method_setup.png differ