mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
add test for vertex sdk foward headers
This commit is contained in:
parent
9fb188a3b6
commit
41a5daf20c
2 changed files with 14 additions and 8 deletions
|
|
@ -13,14 +13,6 @@ model_list:
|
|||
model: cohere/rerank-english-v3.0
|
||||
api_key: os.environ/COHERE_API_KEY
|
||||
|
||||
general_settings:
|
||||
enable_oauth2_proxy_auth: True
|
||||
oauth2_config_mappings:
|
||||
token: X-Auth-Token
|
||||
user_id: X-Auth-Client-ID
|
||||
team_id: X-Auth-Team-ID
|
||||
max_budget: X-Auth-Max-Budget
|
||||
models: X-Auth-Allowed-Models
|
||||
|
||||
# default off mode
|
||||
litellm_settings:
|
||||
|
|
|
|||
14
litellm/proxy/tests/test_vertex_sdk_forward_headers.py
Normal file
14
litellm/proxy/tests/test_vertex_sdk_forward_headers.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import vertexai
|
||||
from vertexai.preview.generative_models import GenerativeModel
|
||||
|
||||
LITE_LLM_ENDPOINT = "http://localhost:4000"
|
||||
|
||||
vertexai.init(
|
||||
project="adroit-crow-413218",
|
||||
location="us-central1",
|
||||
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex-ai",
|
||||
api_transport="rest",
|
||||
)
|
||||
|
||||
model = GenerativeModel(model_name="gemini-1.0-pro")
|
||||
model.generate_content("hi")
|
||||
Loading…
Add table
Reference in a new issue