Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ public class GoogleAIConstants {
public static final String MESSAGES = "messages";
public static final String LABEL = "label";
public static final String VALUE = "value";
public static final List<String> GOOGLE_AI_MODELS = List.of("gemini-pro");
public static final List<String> GOOGLE_AI_MODELS = List.of(
"gemini-2.5-pro",
"gemini-2.5-flash",
"gemini-2.0-flash",
"gemini-flash-latest",
"gemini-flash-lite-latest");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please verify if these two are valid models?

  • gemini-flash-latest
  • gemini-flash-lite-latest
    Asking this because I didn't find any valid reference for these two models.

Copy link
Contributor Author

@tomjose92 tomjose92 Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@subrata71 , yes I had tested for these two models with the API. And also had verified it with this api that Lists all the models along with the commands each supports
https://generativelanguage.googleapis.com/v1beta/models?key=<GOOGLE_API_KEY>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add this info to the PR description as well for future reference if we want to update these models by checking the latest list

public static final ExchangeStrategies EXCHANGE_STRATEGIES = ExchangeStrategies.builder()
.codecs(configurer -> configurer.defaultCodecs().maxInMemorySize(/* 10MB */ 10 * 1024 * 1024))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ public void testCreateTriggerUri() {
@Test
public void testCreateExecutionUri() {
ActionConfiguration actionConfiguration = new ActionConfiguration();
actionConfiguration.setFormData(Map.of(GENERATE_CONTENT_MODEL, Map.of(DATA, "gemini-pro")));
actionConfiguration.setFormData(Map.of(GENERATE_CONTENT_MODEL, Map.of(DATA, "gemini-2.5-pro")));
URI uri = generateContentCommand.createExecutionUri(actionConfiguration);
Assertions.assertEquals(
"https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent", uri.toString());
"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent",
uri.toString());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void verifyDatasourceTriggerResultsForChatModels() {
apiKeyAuth.setValue("apiKey");
DatasourceConfiguration datasourceConfiguration = new DatasourceConfiguration();
datasourceConfiguration.setAuthentication(apiKeyAuth);
String responseBody = "[\"gemini-pro\"]";
String responseBody = "[\"gemini-2.5-pro\"]";
MockResponse mockResponse = new MockResponse().setBody(responseBody);
mockResponse.setResponseCode(200);
mockEndpoint.enqueue(mockResponse);
Expand All @@ -122,8 +122,15 @@ public void verifyDatasourceTriggerResultsForChatModels() {
StepVerifier.create(datasourceTriggerResultMono)
.assertNext(result -> {
assertTrue(result.getTrigger() instanceof List<?>);
assertEquals(((List) result.getTrigger()).size(), 1);
assertEquals(result.getTrigger(), getDataToMap(List.of("gemini-pro")));
assertEquals(((List) result.getTrigger()).size(), 5);
assertEquals(
result.getTrigger(),
getDataToMap(List.of(
"gemini-2.5-pro",
"gemini-2.5-flash",
"gemini-2.0-flash",
"gemini-flash-latest",
"gemini-flash-lite-latest")));
})
.verifyComplete();
}
Expand Down