Add new /vertex_ai/discovery route - enables calling AgentBuilder API routes (#10084)

* feat(llm_passthrough_endpoints.py): expose new `/vertex_ai/discovery/` endpoint

Allows calling vertex ai discovery endpoints via passthrough

 For agentbuilder api calls

* refactor(llm_passthrough_endpoints.py): use common _base_vertex_proxy_route

Prevents duplicate code

* feat(llm_passthrough_endpoints.py): add vertex endpoint specific passthrough handlers
This commit is contained in:
Krish Dholakia 2025-04-16 21:45:51 -07:00 committed by GitHub
parent 198922b26f
commit c73a6a8d1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 256 additions and 19 deletions

View file

@ -401,6 +401,7 @@ def construct_target_url(
Constructed Url:
POST https://LOCATION-aiplatform.googleapis.com/{version}/projects/PROJECT_ID/locations/LOCATION/cachedContents
"""
new_base_url = httpx.URL(base_url)
if "locations" in requested_route: # contains the target project id + location
if vertex_project and vertex_location: