mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-16 08:17:51 +00:00
Merge pull request #5451 from BerriAI/litellm_fix_vertex
[Fix-Proxy] Vertex SDK pass through - pass all relevant vertex creds
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user