22
33from __future__ import annotations
44
5- from typing import Dict
5+ from typing import Dict , Union
66from typing_extensions import Literal , Required , Annotated , TypedDict
77
8+ from .._types import SequenceNotStr
89from .._utils import PropertyInfo
910
10- __all__ = ["ModelConfigParam" ]
11+ __all__ = ["ModelConfigParam" , "GoogleAuthOptions" , "GoogleAuthOptionsCredentials" ]
12+
13+
14+ class GoogleAuthOptionsCredentials (TypedDict , total = False ):
15+ """Google Cloud service account credentials"""
16+
17+ client_email : Required [str ]
18+
19+ private_key : Required [str ]
20+
21+ auth_provider_x509_cert_url : str
22+
23+ auth_uri : str
24+
25+ client_id : str
26+
27+ client_x509_cert_url : str
28+
29+ private_key_id : str
30+
31+ project_id : str
32+
33+ token_uri : str
34+
35+ type : Literal ["service_account" ]
36+
37+ universe_domain : str
38+
39+
40+ class GoogleAuthOptions (TypedDict , total = False ):
41+ """google-auth-library options used to authenticate Vertex AI models"""
42+
43+ credentials : GoogleAuthOptionsCredentials
44+ """Google Cloud service account credentials"""
45+
46+ project_id : Annotated [str , PropertyInfo (alias = "projectId" )]
47+ """Google Cloud project ID used by google-auth-library"""
48+
49+ scopes : Union [str , SequenceNotStr [str ]]
50+ """Google auth scopes for the desired API request"""
51+
52+ universe_domain : Annotated [str , PropertyInfo (alias = "universeDomain" )]
53+ """Google Cloud universe domain"""
1154
1255
1356class ModelConfigParam (TypedDict , total = False ):
@@ -20,8 +63,17 @@ class ModelConfigParam(TypedDict, total=False):
2063 base_url : Annotated [str , PropertyInfo (alias = "baseURL" )]
2164 """Base URL for the model provider"""
2265
66+ google_auth_options : Annotated [GoogleAuthOptions , PropertyInfo (alias = "googleAuthOptions" )]
67+ """google-auth-library options used to authenticate Vertex AI models"""
68+
2369 headers : Dict [str , str ]
2470 """Custom headers sent with every request to the model provider"""
2571
26- provider : Literal ["openai" , "anthropic" , "google" , "microsoft" , "bedrock" ]
72+ location : str
73+ """Google Cloud location for Vertex AI models"""
74+
75+ project : str
76+ """Google Cloud project ID for Vertex AI models"""
77+
78+ provider : Literal ["openai" , "anthropic" , "google" , "microsoft" , "bedrock" , "vertex" ]
2779 """AI provider for the model (or provide a baseURL endpoint instead)"""
0 commit comments