You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -215,10 +215,14 @@ fun MenuScreen(
215
215
}
216
216
val normalModels = allModels.filter {
217
217
it !=ModelOption.MISTRAL_MEDIUM_3_1&&
218
+
it !=ModelOption.PUTER_GPT_5_4_NANO&&
218
219
it.apiProvider !=ApiProvider.VERCEL&&
219
220
!STRIKETHROUGH_MODELS.contains(it)
220
221
}
221
-
val orderedModels =listOf(ModelOption.MISTRAL_MEDIUM_3_1) +
222
+
val orderedModels =listOf(
223
+
ModelOption.PUTER_GPT_5_4_NANO,
224
+
ModelOption.MISTRAL_MEDIUM_3_1
225
+
) +
222
226
normalModels +
223
227
vercelModels +
224
228
STRIKETHROUGH_MODELS
@@ -288,7 +292,7 @@ fun MenuScreen(
288
292
ModelOption.GPT_OSS_120B->"This is a pure text model\nCerebras sometimes discontinues free access in the Free Tier, displaying an \"Error 404: gpt-oss-120b does not exist or you do not have access to it\" message, or changes the rate limits."
289
293
ModelOption.MISTRAL_LARGE_3->"Mistral AI rejects requests containing non-black images with a 429 Error: Rate limit exceeded response"
290
294
ModelOption.GEMINI_3_FLASH->"Google often rejects requests to this model with a 503 Model is exhausted error"
291
-
ModelOption.PUTER_GLM5->"This model is expensive and uses up the free quota quickly. Consider GPT5.4 nano"
295
+
ModelOption.PUTER_GLM5->"This model is expensive and uses up the free quota quickly. Consider GPT-5.4 Nano."
292
296
ModelOption.GPT_5_1_CODEX_MAX,
293
297
ModelOption.GPT_5_1_CODEX_MINI,
294
298
ModelOption.GPT_5_NANO->"Vercel requires a credit card"
Copy file name to clipboardExpand all lines: app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt
+4-23Lines changed: 4 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1191,7 +1191,8 @@ class PhotoReasoningViewModel(
1191
1191
}
1192
1192
1193
1193
// CerebrasRequest braucht stream-Feld — inline als JSON-String um Datenklasse nicht zu ändern
1194
-
val streamingBody ="""{"model":"$modelName","messages":${Json.encodeToString(apiMessages)},"max_completion_tokens":1024,"temperature":0.2,"top_p":1.0,"stream":true}"""
1194
+
val selectedModelName = com.google.ai.sample.GenerativeAiViewModelFactory.getCurrentModel().modelName
1195
+
val streamingBody ="""{"model":"$selectedModelName","messages":${Json.encodeToString(apiMessages)},"max_completion_tokens":1024,"temperature":0.2,"top_p":1.0,"stream":true}"""
1195
1196
val mediaType ="application/json".toMediaType()
1196
1197
val client =OkHttpClient()
1197
1198
@@ -1859,7 +1860,7 @@ class PhotoReasoningViewModel(
1859
1860
context = context,
1860
1861
inputContentJson = inputContentJson,
1861
1862
chatHistoryJson = chatHistoryJson,
1862
-
modelName =generativeModel.modelName,
1863
+
modelName =currentModel.modelName,
1863
1864
apiKey = apiKey,
1864
1865
apiProvider = currentModel.apiProvider,
1865
1866
tempFilePaths = tempFilePaths
@@ -2168,30 +2169,10 @@ class PhotoReasoningViewModel(
0 commit comments