mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
Support litellm.api_base
for vertex_ai + gemini/ across completion, embedding, image_generation (#9516)
* test(tests): add unit testing for litellm_proxy integration * fix(cost_calculator.py): fix tracking cost in sdk when calling proxy * fix(main.py): respect litellm.api_base on `vertex_ai/` and `gemini/` routes * fix(main.py): consistently support custom api base across gemini + vertexai on embedding + completion * feat(vertex_ai/): test * fix: fix linting error * test: set api base as None before starting loadtest
This commit is contained in:
parent
8657816477
commit
6fd18651d1
10 changed files with 223 additions and 43 deletions
|
@ -111,7 +111,7 @@ class VertexEmbedding(VertexBase):
|
|||
)
|
||||
|
||||
try:
|
||||
response = client.post(api_base, headers=headers, json=vertex_request) # type: ignore
|
||||
response = client.post(url=api_base, headers=headers, json=vertex_request) # type: ignore
|
||||
response.raise_for_status()
|
||||
except httpx.HTTPStatusError as err:
|
||||
error_code = err.response.status_code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue