@@ -21,19 +21,29 @@ import Testing
21
21
22
22
struct InstanceConfig : Equatable , Encodable {
23
23
static let vertexAI_v1beta = InstanceConfig (
24
- apiConfig: APIConfig ( service: . vertexAI( endpoint: . firebaseProxyProd) , version: . v1beta)
24
+ apiConfig: APIConfig (
25
+ service: . vertexAI( endpoint: . firebaseProxyProd, location: " us-central1 " ) ,
26
+ version: . v1beta
27
+ )
25
28
)
26
29
static let vertexAI_v1beta_global = InstanceConfig (
27
- location: " global " ,
28
- apiConfig: APIConfig ( service: . vertexAI( endpoint: . firebaseProxyProd) , version: . v1beta)
30
+ apiConfig: APIConfig (
31
+ service: . vertexAI( endpoint: . firebaseProxyProd, location: " global " ) ,
32
+ version: . v1beta
33
+ )
29
34
)
30
35
static let vertexAI_v1beta_global_appCheckLimitedUse = InstanceConfig (
31
- location: " global " ,
32
36
useLimitedUseAppCheckTokens: true ,
33
- apiConfig: APIConfig ( service: . vertexAI( endpoint: . firebaseProxyProd) , version: . v1beta)
37
+ apiConfig: APIConfig (
38
+ service: . vertexAI( endpoint: . firebaseProxyProd, location: " global " ) ,
39
+ version: . v1beta
40
+ )
34
41
)
35
42
static let vertexAI_v1beta_staging = InstanceConfig (
36
- apiConfig: APIConfig ( service: . vertexAI( endpoint: . firebaseProxyStaging) , version: . v1beta)
43
+ apiConfig: APIConfig (
44
+ service: . vertexAI( endpoint: . firebaseProxyStaging, location: " us-central1 " ) ,
45
+ version: . v1beta
46
+ )
37
47
)
38
48
static let googleAI_v1beta = InstanceConfig (
39
49
apiConfig: APIConfig ( service: . googleAI( endpoint: . firebaseProxyProd) , version: . v1beta)
@@ -68,12 +78,18 @@ struct InstanceConfig: Equatable, Encodable {
68
78
69
79
static let vertexAI_v1beta_appCheckNotConfigured = InstanceConfig (
70
80
appName: FirebaseAppNames . appCheckNotConfigured,
71
- apiConfig: APIConfig ( service: . vertexAI( endpoint: . firebaseProxyProd) , version: . v1beta)
81
+ apiConfig: APIConfig (
82
+ service: . vertexAI( endpoint: . firebaseProxyProd, location: " us-central1 " ) ,
83
+ version: . v1beta
84
+ )
72
85
)
73
86
static let vertexAI_v1beta_appCheckNotConfigured_limitedUseTokens = InstanceConfig (
74
87
appName: FirebaseAppNames . appCheckNotConfigured,
75
88
useLimitedUseAppCheckTokens: true ,
76
- apiConfig: APIConfig ( service: . vertexAI( endpoint: . firebaseProxyProd) , version: . v1beta)
89
+ apiConfig: APIConfig (
90
+ service: . vertexAI( endpoint: . firebaseProxyProd, location: " us-central1 " ) ,
91
+ version: . v1beta
92
+ )
77
93
)
78
94
static let googleAI_v1beta_appCheckNotConfigured = InstanceConfig (
79
95
appName: FirebaseAppNames . appCheckNotConfigured,
@@ -150,10 +166,8 @@ extension FirebaseAI {
150
166
static func componentInstance( _ instanceConfig: InstanceConfig ) -> FirebaseAI {
151
167
switch instanceConfig. apiConfig. service {
152
168
case . vertexAI:
153
- let location = instanceConfig. location ?? " us-central1 "
154
169
return FirebaseAI . createInstance (
155
170
app: instanceConfig. app,
156
- location: location,
157
171
apiConfig: instanceConfig. apiConfig,
158
172
useLimitedUseAppCheckTokens: instanceConfig. useLimitedUseAppCheckTokens
159
173
)
@@ -164,7 +178,6 @@ extension FirebaseAI {
164
178
)
165
179
return FirebaseAI . createInstance (
166
180
app: instanceConfig. app,
167
- location: nil ,
168
181
apiConfig: instanceConfig. apiConfig,
169
182
useLimitedUseAppCheckTokens: instanceConfig. useLimitedUseAppCheckTokens
170
183
)
0 commit comments