Skip to content

Commit 7ff5d36

Browse files
authored
[Firebase AI] Update error domain constant for renamed SDK (#14829)
1 parent 95c7059 commit 7ff5d36

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

FirebaseAI/Sources/Constants.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ enum Constants {
1919
/// The base reverse-DNS name for `NSError` or `CustomNSError` error domains.
2020
///
2121
/// - Important: A suffix must be appended to produce an error domain (e.g.,
22-
/// "com.google.firebase.vertexai.ExampleError").
23-
static let baseErrorDomain = "com.google.firebase.vertexai"
22+
/// "com.google.firebase.firebaseai.ExampleError").
23+
static let baseErrorDomain = "com.google.firebase.firebaseai"
2424
}

FirebaseAI/Tests/TestApp/Sources/Constants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ public enum ModelNames {
2424
public static let gemini2Flash = "gemini-2.0-flash-001"
2525
public static let gemini2FlashLite = "gemini-2.0-flash-lite-001"
2626
public static let gemini2FlashExperimental = "gemini-2.0-flash-exp"
27-
public static let gemma3_27B = "gemma-3-27b-it"
27+
public static let gemma3_4B = "gemma-3-4b-it"
2828
}

FirebaseAI/Tests/TestApp/Tests/Integration/GenerateContentIntegrationTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ struct GenerateContentIntegrationTests {
5353
(InstanceConfig.vertexAI_v1beta, ModelNames.gemini2FlashLite),
5454
(InstanceConfig.vertexAI_v1beta_staging, ModelNames.gemini2FlashLite),
5555
(InstanceConfig.googleAI_v1beta, ModelNames.gemini2FlashLite),
56-
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_27B),
56+
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_4B),
5757
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemini2FlashLite),
58-
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_27B),
58+
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_4B),
5959
(InstanceConfig.googleAI_v1_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
6060
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
61-
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_27B),
61+
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_4B),
6262
])
6363
func generateContent(_ config: InstanceConfig, modelName: String) async throws {
6464
let model = FirebaseAI.componentInstance(config).generativeModel(
@@ -82,7 +82,7 @@ struct GenerateContentIntegrationTests {
8282
#expect(promptTokensDetails.modality == .text)
8383
#expect(promptTokensDetails.tokenCount == usageMetadata.promptTokenCount)
8484
// The field `candidatesTokensDetails` is not included when using Gemma models.
85-
if modelName == ModelNames.gemma3_27B {
85+
if modelName == ModelNames.gemma3_4B {
8686
#expect(usageMetadata.candidatesTokensDetails.isEmpty)
8787
} else {
8888
#expect(usageMetadata.candidatesTokensDetails.count == 1)
@@ -191,12 +191,12 @@ struct GenerateContentIntegrationTests {
191191
(InstanceConfig.vertexAI_v1beta, ModelNames.gemini2FlashLite),
192192
(InstanceConfig.vertexAI_v1beta_staging, ModelNames.gemini2FlashLite),
193193
(InstanceConfig.googleAI_v1beta, ModelNames.gemini2FlashLite),
194-
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_27B),
194+
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_4B),
195195
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemini2FlashLite),
196-
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_27B),
196+
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_4B),
197197
(InstanceConfig.googleAI_v1_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
198198
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
199-
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_27B),
199+
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_4B),
200200
])
201201
func generateContentStream(_ config: InstanceConfig, modelName: String) async throws {
202202
let expectedResponse = [

scripts/quickstart_spm_xcodeproj.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ XCODEPROJ=${SAMPLE}/${SAMPLE}Example.xcodeproj/project.pbxproj
2525

2626
if grep -q "branch = main;" "$XCODEPROJ"; then
2727
sed -i "" "s#branch = main;#branch = $BRANCH_NAME;#" "$XCODEPROJ"
28+
29+
# Point SPM CI to the tip of `main` of
30+
# https://github.com/google/GoogleAppMeasurement so that the release process
31+
# can defer publishing the `GoogleAppMeasurement` tag until after testing.
32+
export FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT=1
2833
else
2934
echo "Failed to update quickstart's Xcode project to the current branch"
3035
exit 1

0 commit comments

Comments
 (0)