Skip to content

Commit a7c5f0d

Browse files
authored
[Vertex AI] Temporarily disable proxied Dev API integration tests (#14722)
1 parent 5e436a7 commit a7c5f0d

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

FirebaseVertexAI/Tests/TestApp/Tests/Integration/CountTokensIntegrationTests.swift

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,10 @@ struct CountTokensIntegrationTests {
6969
#expect(promptTokensDetails.tokenCount == response.totalTokens)
7070
}
7171

72-
@Test(arguments: [
73-
InstanceConfig.vertexV1,
74-
InstanceConfig.vertexV1Staging,
75-
InstanceConfig.vertexV1Beta,
76-
InstanceConfig.vertexV1BetaStaging,
72+
@Test(
7773
/* System instructions are not supported on the v1 Developer API. */
78-
InstanceConfig.developerV1Beta,
79-
])
74+
arguments: InstanceConfig.allConfigsExceptDeveloperV1
75+
)
8076
func countTokens_text_systemInstruction(_ config: InstanceConfig) async throws {
8177
let model = VertexAI.componentInstance(config).generativeModel(
8278
modelName: ModelNames.gemini2Flash,
@@ -122,14 +118,10 @@ struct CountTokensIntegrationTests {
122118
)
123119
}
124120

125-
@Test(arguments: [
126-
InstanceConfig.vertexV1,
127-
InstanceConfig.vertexV1Staging,
128-
InstanceConfig.vertexV1Beta,
129-
InstanceConfig.vertexV1BetaStaging,
121+
@Test(
130122
/* System instructions are not supported on the v1 Developer API. */
131-
InstanceConfig.developerV1Beta,
132-
])
123+
arguments: InstanceConfig.allConfigsExceptDeveloperV1
124+
)
133125
func countTokens_jsonSchema(_ config: InstanceConfig) async throws {
134126
let model = VertexAI.componentInstance(config).generativeModel(
135127
modelName: ModelNames.gemini2Flash,
@@ -151,7 +143,7 @@ struct CountTokensIntegrationTests {
151143
switch config.apiConfig.service {
152144
case .vertexAI:
153145
#expect(response.totalTokens == 65)
154-
#expect(response.totalBillableCharacters == 165)
146+
#expect(response.totalBillableCharacters == 170)
155147
case .developer:
156148
// The Developer API erroneously ignores the `responseSchema` when counting tokens, resulting
157149
// in a lower total count than Vertex AI.

FirebaseVertexAI/Tests/TestApp/Tests/Integration/GenerateContentIntegrationTests.swift

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,8 @@ struct GenerateContentIntegrationTests {
7777

7878
@Test(
7979
"Generate an enum and provide a system instruction",
80-
arguments: [
81-
InstanceConfig.vertexV1,
82-
InstanceConfig.vertexV1Staging,
83-
InstanceConfig.vertexV1Beta,
84-
InstanceConfig.vertexV1BetaStaging,
85-
/* System instructions are not supported on the v1 Developer API. */
86-
InstanceConfig.developerV1Beta,
87-
]
80+
/* System instructions are not supported on the v1 Developer API. */
81+
arguments: InstanceConfig.allConfigsExceptDeveloperV1
8882
)
8983
func generateContentEnum(_ config: InstanceConfig) async throws {
9084
let model = VertexAI.componentInstance(config).generativeModel(
@@ -122,7 +116,8 @@ struct GenerateContentIntegrationTests {
122116

123117
@Test(arguments: [
124118
InstanceConfig.vertexV1Beta,
125-
InstanceConfig.developerV1Beta,
119+
// Temporarily disabled due to Firebase Proxy issues.
120+
// InstanceConfig.developerV1Beta,
126121
])
127122
func generateImage(_ config: InstanceConfig) async throws {
128123
let generationConfig = GenerationConfig(

FirebaseVertexAI/Tests/TestApp/Tests/Utilities/InstanceConfig.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ struct InstanceConfig {
3535
static let developerV1Beta = InstanceConfig(
3636
apiConfig: APIConfig(service: .developer(endpoint: .firebaseVertexAIProd), version: .v1beta)
3737
)
38+
static let developerV1BetaStaging = InstanceConfig(
39+
apiConfig: APIConfig(service: .developer(endpoint: .firebaseVertexAIStaging), version: .v1beta)
40+
)
3841
static let developerV1Spark = InstanceConfig(
3942
appName: FirebaseAppNames.spark,
4043
apiConfig: APIConfig(service: .developer(endpoint: .generativeLanguage), version: .v1)
@@ -48,7 +51,9 @@ struct InstanceConfig {
4851
vertexV1Staging,
4952
vertexV1Beta,
5053
vertexV1BetaStaging,
51-
developerV1Beta,
54+
// Temporarily disabled due to Firebase Proxy issues:
55+
// developerV1Beta,
56+
// developerV1BetaStaging,
5257
developerV1Spark,
5358
developerV1BetaSpark,
5459
]
@@ -58,6 +63,9 @@ struct InstanceConfig {
5863
vertexV1Staging,
5964
vertexV1Beta,
6065
vertexV1BetaStaging,
66+
// Temporarily disabled due to Firebase Proxy issues:
67+
// developerV1Beta,
68+
// developerV1BetaStaging,
6169
developerV1BetaSpark,
6270
]
6371

0 commit comments

Comments
 (0)