(feat) pass through llm endpoints - add PATCH support (vertex context caching requires for update ops) (#6924)

* add PATCH for pass through endpoints

* test_pass_through_routes_support_all_methods
This commit is contained in:
Ishaan Jaff 2024-11-26 14:39:13 -08:00 committed by GitHub
parent 8673f2541e
commit 8fd3bf34d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 45 additions and 8 deletions

View file

@ -143,12 +143,14 @@ def construct_target_url(
@router.api_route(
"/vertex-ai/{endpoint:path}",
methods=["GET", "POST", "PUT", "DELETE"],
methods=["GET", "POST", "PUT", "DELETE", "PATCH"],
tags=["Vertex AI Pass-through", "pass-through"],
include_in_schema=False,
)
@router.api_route(
"/vertex_ai/{endpoint:path}", methods=["GET", "POST", "PUT", "DELETE"], tags=["Vertex AI Pass-through", "pass-through"]
"/vertex_ai/{endpoint:path}",
methods=["GET", "POST", "PUT", "DELETE", "PATCH"],
tags=["Vertex AI Pass-through", "pass-through"],
)
async def vertex_proxy_route(
endpoint: str,