vertex ai anthropic thinking param support (#8853)

* fix(vertex_llm_base.py): handle credentials passed in as dictionary

* fix(router.py): support vertex credentials as json dict

* test(test_vertex.py): allows easier testing

mock anthropic thinking response for vertex ai

* test(vertex_ai_partner_models/): don't remove "@" from model

breaks anthropic cost calculation

* test: move testing

* fix: fix linting error

* fix: fix linting error

* fix(vertex_ai_partner_models/main.py): split @ for codestral model

* test: fix test

* fix: fix stripping "@" on mistral models

* fix: fix test

* test: fix test
This commit is contained in:
Krish Dholakia 2025-02-26 21:37:18 -08:00 committed by GitHub
parent 992e78dfd8
commit 88eedb22b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 135 additions and 45 deletions

View file

@ -6,6 +6,7 @@ from litellm._logging import verbose_proxy_logger
from litellm.proxy.vertex_ai_endpoints.vertex_endpoints import (
VertexPassThroughCredentials,
)
from litellm.types.llms.vertex_ai import VERTEX_CREDENTIALS_TYPES
class VertexPassThroughRouter:
@ -58,7 +59,7 @@ class VertexPassThroughRouter:
self,
project_id: str,
location: str,
vertex_credentials: str,
vertex_credentials: VERTEX_CREDENTIALS_TYPES,
):
"""
Add the vertex credentials for the given project-id, location