feat - allow sending tags on vertex pass through requests (#6876)

* feat - allow tagging vertex JS SDK request

* add unit testing for passing headers for pass through endpoints

* fix allow using vertex_ai as the primary way for pass through vertex endpoints

* docs on vertex js pass tags

* add e2e test for vertex pass through with spend tags

* add e2e tests for streaming vertex JS with tags

* fix vertex ai testing
This commit is contained in:
Ishaan Jaff 2024-11-25 12:12:09 -08:00 committed by GitHub
parent c73ce95c01
commit f77bf49772
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 548 additions and 77 deletions

View file

@ -99,7 +99,7 @@ async def test_basic_vertex_ai_pass_through_with_spendlog():
vertexai.init(
project="adroit-crow-413218",
location="us-central1",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex-ai",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai",
api_transport="rest",
)
@ -131,7 +131,7 @@ async def test_basic_vertex_ai_pass_through_streaming_with_spendlog():
vertexai.init(
project="adroit-crow-413218",
location="us-central1",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex-ai",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai",
api_transport="rest",
)
@ -170,7 +170,7 @@ async def test_vertex_ai_pass_through_endpoint_context_caching():
vertexai.init(
project="adroit-crow-413218",
location="us-central1",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex-ai",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai",
api_transport="rest",
)