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
2 changes: 1 addition & 1 deletion ai-sample-catalog/samples/gemini-chatbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here is the key snippet of code that calls the generative model:

```kotlin
private val generativeModel by lazy {
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel("gemini-2.5-flash")
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel("gemini-3.6-flash")
}
private val chat = generativeModel.startChat()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class GeminiChatbotViewModel @Inject constructor() : ViewModel() {

private val generativeModel by lazy {
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
"gemini-2.5-flash",
"gemini-3.6-flash",
generationConfig = generationConfig {
temperature = 0.9f
topK = 32
Expand Down
2 changes: 1 addition & 1 deletion ai-sample-catalog/samples/gemini-hybrid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here is how the model is instantiated to leverage hybrid inference:
```kotlin
val model = Firebase.ai(backend = GenerativeBackend.googleAI())
.generativeModel(
"gemini-2.5-flash-lite",
"gemini-3.5-flash-lite",
onDeviceConfig = OnDeviceConfig(mode = InferenceMode.PREFER_ON_DEVICE)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class GeminiHybridViewModel @Inject constructor() : ViewModel() {
try {
val model = Firebase.ai(backend = GenerativeBackend.googleAI())
.generativeModel(
"gemini-2.5-flash-lite",
"gemini-3.5-flash-lite",
onDeviceConfig = OnDeviceConfig(
mode = InferenceMode.ONLY_ON_DEVICE,
modelOption = OnDeviceModelOption.PREVIEW,
Expand Down Expand Up @@ -162,7 +162,7 @@ class GeminiHybridViewModel @Inject constructor() : ViewModel() {

val model = Firebase.ai(backend = GenerativeBackend.googleAI())
.generativeModel(
"gemini-2.5-flash-lite",
"gemini-3.5-flash-lite",
onDeviceConfig = OnDeviceConfig(
mode = _uiState.value.selectedMode,
modelOption = _uiState.value.selectedModelOption,
Expand Down Expand Up @@ -235,7 +235,7 @@ class GeminiHybridViewModel @Inject constructor() : ViewModel() {

val model = Firebase.ai(backend = GenerativeBackend.googleAI())
.generativeModel(
"gemini-2.5-flash-lite",
"gemini-3.5-flash-lite",
onDeviceConfig = OnDeviceConfig(
mode = _uiState.value.selectedMode,
modelOption = _uiState.value.selectedModelOption,
Expand Down
2 changes: 1 addition & 1 deletion ai-sample-catalog/samples/gemini-image-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The application uses the Firebase AI SDK (see [How to run](../../#how-to-run)) f
Here is how the model is instantiated:
```kotlin
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
"gemini-3-pro-image-preview",
"gemini-3-pro-image",
generationConfig = generationConfig {
temperature = 0.9f
topK = 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class GeminiImageChatViewModel @Inject constructor() : ViewModel() {

private val generativeModel by lazy {
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
"gemini-3-pro-image-preview",
"gemini-3-pro-image",
generationConfig = generationConfig {
temperature = 0.9f
topK = 32
Expand Down
2 changes: 1 addition & 1 deletion ai-sample-catalog/samples/gemini-multimodal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Here is the key snippet of code that initializes the generative model:
```kotlin
private val generativeModel by lazy {
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
"gemini-2.5-flash",
"gemini-3.6-flash",
generationConfig = generationConfig {
temperature = 0.9f
topK = 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import javax.inject.Singleton
class GeminiDataSource @Inject constructor() {
private val generativeModel by lazy {
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
"gemini-2.5-flash",
"gemini-3.6-flash",
generationConfig = generationConfig {
temperature = 0.9f
topK = 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Here is a key snippet of code that generates a video description:
```kotlin
suspend fun generateDescription(videoUri: Uri): @Composable () -> Unit {
val response = Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel(modelName = "gemini-2.5-flash")
.generativeModel(modelName = "gemini-3.6-flash")
.generateContent(
content {
fileData(videoUri.toString(), "video/mp4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private val accountTagsSchema = Schema.array(
* for generating account tags.
*
* This model is specifically set up with:
* - `modelName = "gemini-2.5-flash"`: Specifies the underlying Gemini model to use.
* - `modelName = "gemini-3.6-flash"`: Specifies the underlying Gemini model to use.
* - `responseMimeType = "application/json"`: Indicates that the model is expected to
* return its response in JSON format.
* - `responseSchema = accountTagsSchema`: Defines the expected structure of the JSON
Expand All @@ -69,7 +69,7 @@ private val accountTagsSchema = Schema.array(
*/
private val accountTagsModel = Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel(
modelName = "gemini-2.5-flash",
modelName = "gemini-3.6-flash",
// Tell Firebase AI the exact format of the response.
generationConfig {
responseMimeType = "application/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ private val chaptersSchema = Schema.array(
/**
* The configured generative model for creating video chapters.
*
* This model is initialized with the "gemini-2.5-flash" model name and
* This model is initialized with the "gemini-3.6-flash" model name and
* configured to expect a JSON response. The `responseSchema` ensures that
* the output conforms to the `Chapters` data structure.
*/
private val chaptersModel = Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel(
modelName = "gemini-2.5-flash",
modelName = "gemini-3.6-flash",
// Tell Firebase AI the exact format of the response.
generationConfig {
responseMimeType = "application/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import com.google.firebase.ai.type.content
*/
suspend fun generateDescription(videoUri: Uri): @Composable () -> Unit {
val response = Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel(modelName = "gemini-2.5-flash")
.generativeModel(modelName = "gemini-3.6-flash")
.generateContent(
content {
fileData(videoUri.toString(), "video/mp4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ private val hashtagSchema = Schema.array(items = Schema.string("Hashtag"))
/**
* A generative model instance configured to generate hashtags for video content.
*
* This model uses the "gemini-2.5-flash" model from Vertex AI and is specifically configured
* This model uses the "gemini-3.6-flash" model from Vertex AI and is specifically configured
* to return a JSON array of strings, where each string represents a hashtag.
* The `responseMimeType` is set to "application/json" and the `responseSchema` defines
* the expected output format as an array of strings with the item name "Hashtag".
*/
private val hashtagsModel = Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel(
modelName = "gemini-2.5-flash",
modelName = "gemini-3.6-flash",
// Tell Firebase AI the exact format of the response.
generationConfig {
responseMimeType = "application/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ private val linksSchema = Schema.array(items = Schema.string("Link"))
* The configured generative model for extracting links.
*
* This model is specifically configured to:
* - Use the "gemini-2.5-flash" model.
* - Use the "gemini-3.6-flash" model.
* - Expect a response in "application/json" format.
* - Adhere to the `linksSchema`, which defines the expected JSON structure as an array of strings (links).
*/
private val linksModel = Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel(
modelName = "gemini-2.5-flash",
modelName = "gemini-3.6-flash",
// Tell Firebase AI the exact format of the response.
generationConfig {
responseMimeType = "application/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ private val thumbnailsSchema = Schema.array(items = Schema.long("thumbnail times

/**
* Initializes the generative model for thumbnail generation.
* This model uses the "gemini-2.5-flash" model via the Vertex AI backend.
* This model uses the "gemini-3.6-flash" model via the Vertex AI backend.
* It's configured to expect a JSON response with a specific schema (`thumbnailsSchema`)
* defining an array of long integers representing thumbnail timestamps.
*/
private val thumbnailsModel = Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel(
modelName = "gemini-2.5-flash",
modelName = "gemini-3.6-flash",
// Tell Firebase AI the exact format of the response.
generationConfig {
responseMimeType = "application/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Here is the key snippet of code that calls the generative model:
```kotlin
val generativeModel =
Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel("gemini-2.5-flash")
.generativeModel("gemini-3.6-flash")

val requestContent = content {
fileData(videoSource.toString(), "video/mp4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class VideoSummarizationViewModel @Inject constructor() : ViewModel() {
try {
val generativeModel =
Firebase.ai(backend = GenerativeBackend.vertexAI())
.generativeModel("gemini-2.5-flash")
.generativeModel("gemini-3.6-flash")

val requestContent = content {
fileData(videoSource.toString(), "video/mp4")
Expand Down
2 changes: 1 addition & 1 deletion ai-sample-catalog/samples/magic-selfie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This sample is part of the [AI Sample Catalog](../../). To build and run this sa

## Description

This sample demonstrates how to create a "magic selfie" by replacing the background of a user's photo with a generated image. It uses the Nano Banana 2 (`gemini-3.1-flash-image-preview`) model to perform semantic image editing, transforming the background based on a text prompt while preserving the subject.
This sample demonstrates how to create a "magic selfie" by replacing the background of a user's photo with a generated image. It uses the Nano Banana 2 (`gemini-3.1-flash-image`) model to perform semantic image editing, transforming the background based on a text prompt while preserving the subject.

<div style="text-align: center;">
<img width="320" alt="Magic Selfie in action" src="magic_selfie.png" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import javax.inject.Singleton
class MagicSelfieRepository @Inject constructor() {
private val generativeModel by lazy {
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
modelName = "gemini-3.1-flash-image-preview",
modelName = "gemini-3.1-flash-image",
generationConfig = generationConfig {
responseModalities = listOf(ResponseModality.TEXT, ResponseModality.IMAGE)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import javax.inject.Singleton
class NanobananaDataSource @Inject constructor() {
private val generativeModel by lazy {
Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
modelName = "gemini-3.1-flash-image-preview",
modelName = "gemini-3.1-flash-image",
generationConfig = generationConfig {
responseModalities = listOf(ResponseModality.IMAGE)
},
Expand Down
4 changes: 2 additions & 2 deletions jetpacker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ JetPacker integrates local on-device AI capabilities using ML Kit. These feature

## Cloud-Hybrid & Online AI Features
JetPacker also integrates online hybrid features using Firebase AI Logic (Gemini API) and ML Kit:
- **ENABLE_MUSEUM_ASSISTANT**: Museum Assistant chatbot with URL, Maps, and Search grounding (uses Gemini 2.5 flash-lite).
- **ENABLE_REVIEW_GENERATION**: Topic-selected review generator (uses Gemini 2.5 flash-lite on-device with cloud fallback).
- **ENABLE_MUSEUM_ASSISTANT**: Museum Assistant chatbot with URL, Maps, and Search grounding (uses Gemini 3.5 flash-lite).
- **ENABLE_REVIEW_GENERATION**: Topic-selected review generator (uses Gemini 3.5 flash-lite on-device with cloud fallback).
- **Hotel Support Chat**: Receives hotel receptionist assistance with real-time ML Kit + Gemini translation.

## AppFunctions Integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class HotelSupportChatViewModel(val hotelName: String = "Hotel", val language: S
private val hybridTranslationModel =
Firebase.ai(backend = GenerativeBackend.googleAI())
.generativeModel(
modelName = "gemini-3-flash-preview",
modelName = "gemini-3.6-flash",
onDeviceConfig = OnDeviceConfig(mode = InferenceMode.PREFER_ON_DEVICE),
)

Expand All @@ -74,7 +74,7 @@ class HotelSupportChatViewModel(val hotelName: String = "Hotel", val language: S
private val cloudTranslationModel =
Firebase.ai(backend = GenerativeBackend.googleAI())
.generativeModel(
modelName = "gemini-3-flash-preview", // Represents cloud TranslateGemma
modelName = "gemini-3.6-flash", // Represents cloud TranslateGemma
)

// Firebase AI for chat
Expand All @@ -87,7 +87,7 @@ class HotelSupportChatViewModel(val hotelName: String = "Hotel", val language: S
"You are a helpful hotel receptionist at $hotelName only speaking $language. Answer politely in $language. The bar closes at 10pm and breakfast is from 7am to 10am. There's someone at the desk 24/7. You can retrieve your luggage from the storage room at the back of the lobby at any time."
)
},
modelName = "gemini-3-flash-preview",
modelName = "gemini-3.6-flash",
)

private val chat = generativeModel.startChat()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ constructor(savedStateHandle: SavedStateHandle, private val eventDao: EventDao)
"You are a helpful museum assistant, answering questions about a museum. Never use markdown, use plain text."
)
},
modelName = "gemini-3.1-flash-lite",
modelName = "gemini-3.5-flash-lite",
tools = toolList,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ReviewScreenViewModel @Inject constructor(savedStateHandle: SavedStateHand
private val generativeModel =
Firebase.ai(backend = GenerativeBackend.googleAI())
.generativeModel(
modelName = "gemini-2.5-flash-lite",
modelName = "gemini-3.5-flash-lite",
onDeviceConfig = OnDeviceConfig(mode = InferenceMode.PREFER_ON_DEVICE),
)

Expand Down
Loading