mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
Merge pull request #21685 from BerriAI/fix/mypy-type-errors-logging-utils-vertex
fix(types): resolve MyPy assignment type errors in logging_utils and vertex transformation
This commit is contained in:
commit
8356dfa045
2 changed files with 3 additions and 2 deletions
|
|
@ -101,7 +101,7 @@ def _truncate_base64_in_value(value: Any) -> Any:
|
|||
if isinstance(v, str):
|
||||
container[k] = _truncate_base64_in_string(v)
|
||||
elif isinstance(v, dict):
|
||||
copy = {ck: cv for ck, cv in v.items()}
|
||||
copy: Union[dict, list] = {ck: cv for ck, cv in v.items()}
|
||||
container[k] = copy
|
||||
stack.append((copy, depth + 1))
|
||||
elif isinstance(v, list):
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class VertexAIPartnerModelsAnthropicMessagesConfig(AnthropicMessagesConfig, Vert
|
|||
vertex_ai_project = VertexBase.safe_get_vertex_ai_project(litellm_params)
|
||||
vertex_ai_location = VertexBase.safe_get_vertex_ai_location(litellm_params)
|
||||
|
||||
project_id: Optional[str] = None
|
||||
if "Authorization" not in headers:
|
||||
vertex_credentials = VertexBase.safe_get_vertex_ai_credentials(litellm_params)
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ class VertexAIPartnerModelsAnthropicMessagesConfig(AnthropicMessagesConfig, Vert
|
|||
custom_api_base=api_base,
|
||||
vertex_location=vertex_ai_location,
|
||||
vertex_project=vertex_ai_project,
|
||||
project_id=project_id,
|
||||
project_id=project_id or "",
|
||||
partner=VertexPartnerProvider.claude,
|
||||
stream=optional_params.get("stream", False),
|
||||
model=model,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue