mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
vertex forward all headers from vertex
This commit is contained in:
parent
1bd2b2fc92
commit
50014aa78e
2 changed files with 4 additions and 5 deletions
|
|
@ -11,4 +11,6 @@ vertexai.init(
|
|||
)
|
||||
|
||||
model = GenerativeModel(model_name="gemini-1.0-pro")
|
||||
model.generate_content("hi")
|
||||
response = model.generate_content("hi")
|
||||
|
||||
print("response", response)
|
||||
|
|
|
|||
|
|
@ -102,10 +102,7 @@ async def vertex_proxy_route(
|
|||
vertex_location = match.group(1) if match else None
|
||||
base_target_url = f"https://{vertex_location}-aiplatform.googleapis.com/"
|
||||
headers.pop("content-length", None)
|
||||
_new_headers = {
|
||||
"Authorization": headers.get("authorization"),
|
||||
}
|
||||
headers = _new_headers
|
||||
headers.pop("host", None)
|
||||
else:
|
||||
vertex_project = default_vertex_config.get("vertex_project")
|
||||
vertex_location = default_vertex_config.get("vertex_location")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue