@@ -109,16 +109,11 @@ struct InstanceConfig: Equatable, Encodable {
109
109
]
110
110
111
111
let appName : String ?
112
- let location : String ?
113
112
let useLimitedUseAppCheckTokens : Bool
114
113
let apiConfig : APIConfig
115
114
116
- init ( appName: String ? = nil ,
117
- location: String ? = nil ,
118
- useLimitedUseAppCheckTokens: Bool = false ,
119
- apiConfig: APIConfig ) {
115
+ init ( appName: String ? = nil , useLimitedUseAppCheckTokens: Bool = false , apiConfig: APIConfig ) {
120
116
self . appName = appName
121
- self . location = location
122
117
self . useLimitedUseAppCheckTokens = useLimitedUseAppCheckTokens
123
118
self . apiConfig = apiConfig
124
119
}
@@ -152,7 +147,12 @@ extension InstanceConfig: CustomTestStringConvertible {
152
147
case . googleAIBypassProxy:
153
148
" - Bypass Proxy "
154
149
}
155
- let locationSuffix = location. map { " - \( $0) " } ?? " "
150
+ let locationSuffix : String
151
+ if case let . vertexAI( _, location: location) = apiConfig. service {
152
+ locationSuffix = location
153
+ } else {
154
+ locationSuffix = " "
155
+ }
156
156
let appCheckLimitedUseDesignator = useLimitedUseAppCheckTokens ? " - FAC Limited-Use " : " "
157
157
158
158
return """
@@ -172,10 +172,6 @@ extension FirebaseAI {
172
172
useLimitedUseAppCheckTokens: instanceConfig. useLimitedUseAppCheckTokens
173
173
)
174
174
case . googleAI:
175
- assert (
176
- instanceConfig. location == nil ,
177
- " The Developer API is global and does not support `location`. "
178
- )
179
175
return FirebaseAI . createInstance (
180
176
app: instanceConfig. app,
181
177
apiConfig: instanceConfig. apiConfig,
0 commit comments