Update Gemini 3 Flash to 3.5 Flash#73
Conversation
|
Droid encountered an error —— View job |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR renames Gemini Flash model identifiers and display names to gemini-3.5-flash, replaces AppPreferences keys/defaults with gemini35FlashThinkingLevel (default "medium"), updates ThinkingProxy mappings and SettingsView bindings, and synchronizes documentation and website references. ChangesGemini Model Version Migration
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Sources/AppPreferences.swift`:
- Around line 131-136: The getter gemini35FlashThinkingLevel currently only
checks gemini35FlashThinkingLevelKey and returns
defaultGemini35FlashThinkingLevel if missing, which wipes prior settings; update
the migration to check the legacy key (e.g., the previous stored key used before
migration) when gemini35FlashThinkingLevelKey is nil and return its value if
present, otherwise fall back to defaultGemini35FlashThinkingLevel; modify the
logic in the static var gemini35FlashThinkingLevel to read UserDefaults.standard
for gemini35FlashThinkingLevelKey first, then for the legacy key, and only
return defaultGemini35FlashThinkingLevel if neither exists.
In `@src/Sources/ThinkingProxy.swift`:
- Around line 701-702: The switch handling model IDs in ThinkingProxy.swift
currently maps "gemini-3.5-flash-preview" to
AppPreferences.gemini35FlashThinkingLevel but omits the legacy alias
"gemini-3-flash-preview", causing older configs to skip thinking-level
injection; add a case for "gemini-3-flash-preview" (or combine both labels in
the same case clause) so it returns AppPreferences.gemini35FlashThinkingLevel
alongside "gemini-3.5-flash-preview" in the function that selects thinking
levels.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 146283ce-65a6-4054-b0af-940730814561
📒 Files selected for processing (10)
AGENTS.mdCHANGELOG.mdREADME.mdSETUP.mdsrc/Sources/AppPreferences.swiftsrc/Sources/DroidProxyModelCatalog.swiftsrc/Sources/SettingsView.swiftsrc/Sources/ThinkingProxy.swiftwebsite/src/components/InstallSection.tsxwebsite/src/components/ModelsSection.tsx
| static var gemini35FlashThinkingLevel: String { | ||
| let defaults = UserDefaults.standard | ||
| guard defaults.object(forKey: gemini3FlashThinkingLevelKey) != nil else { | ||
| return defaultGemini3FlashThinkingLevel | ||
| guard defaults.object(forKey: gemini35FlashThinkingLevelKey) != nil else { | ||
| return defaultGemini35FlashThinkingLevel | ||
| } | ||
| return defaults.string(forKey: gemini3FlashThinkingLevelKey) ?? defaultGemini3FlashThinkingLevel | ||
| return defaults.string(forKey: gemini35FlashThinkingLevelKey) ?? defaultGemini35FlashThinkingLevel |
There was a problem hiding this comment.
Preserve existing Gemini Flash preference during key migration.
Reading only gemini35FlashThinkingLevelKey resets existing users to the new default (medium) even if they previously set a custom value on the old key. Add a fallback/migration path when the new key is absent.
💡 Suggested migration-safe change
+ // Keep for one-way migration from older builds.
+ private static let legacyGemini3FlashThinkingLevelKey = "gemini3FlashThinkingLevel"
+
static var gemini35FlashThinkingLevel: String {
let defaults = UserDefaults.standard
guard defaults.object(forKey: gemini35FlashThinkingLevelKey) != nil else {
- return defaultGemini35FlashThinkingLevel
+ if let legacy = defaults.string(forKey: legacyGemini3FlashThinkingLevelKey), !legacy.isEmpty {
+ return legacy
+ }
+ return defaultGemini35FlashThinkingLevel
}
return defaults.string(forKey: gemini35FlashThinkingLevelKey) ?? defaultGemini35FlashThinkingLevel
}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/Sources/AppPreferences.swift` around lines 131 - 136, The getter
gemini35FlashThinkingLevel currently only checks gemini35FlashThinkingLevelKey
and returns defaultGemini35FlashThinkingLevel if missing, which wipes prior
settings; update the migration to check the legacy key (e.g., the previous
stored key used before migration) when gemini35FlashThinkingLevelKey is nil and
return its value if present, otherwise fall back to
defaultGemini35FlashThinkingLevel; modify the logic in the static var
gemini35FlashThinkingLevel to read UserDefaults.standard for
gemini35FlashThinkingLevelKey first, then for the legacy key, and only return
defaultGemini35FlashThinkingLevel if neither exists.
| case "gemini-3.5-flash-preview": | ||
| return AppPreferences.gemini35FlashThinkingLevel |
There was a problem hiding this comment.
Keep legacy Gemini 3 Flash alias during transition.
Older Factory/manual configs using gemini-3-flash-preview will now bypass thinking-level injection. Consider temporarily mapping both model IDs to the same preference to avoid silent behavior regressions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/Sources/ThinkingProxy.swift` around lines 701 - 702, The switch handling
model IDs in ThinkingProxy.swift currently maps "gemini-3.5-flash-preview" to
AppPreferences.gemini35FlashThinkingLevel but omits the legacy alias
"gemini-3-flash-preview", causing older configs to skip thinking-level
injection; add a case for "gemini-3-flash-preview" (or combine both labels in
the same case clause) so it returns AppPreferences.gemini35FlashThinkingLevel
alongside "gemini-3.5-flash-preview" in the function that selects thinking
levels.
There was a problem hiding this comment.
Code Review
This pull request updates the Gemini Flash model to version 3.5 across the application, including documentation, configuration keys, and UI components. The default thinking level for this model has also been adjusted from "high" to "medium". The review feedback highlights several potential breaking changes for existing users: the removal of the old model name from thinking injection logic, the loss of user preferences due to a renamed UserDefaults key, and the breakage of existing configurations caused by changing the model's idSlug.
| case "gemini-3.5-flash-preview": | ||
| return AppPreferences.gemini35FlashThinkingLevel |
There was a problem hiding this comment.
The update to Gemini 3.5 Flash removes support for the previous model name gemini-3-flash-preview in the thinking injection logic. If the upstream provider still supports the older model name, requests using it will no longer receive thinking injection. It is recommended to maintain backward compatibility for the older model name during a transition period.
| case "gemini-3.5-flash-preview": | |
| return AppPreferences.gemini35FlashThinkingLevel | |
| case "gemini-3-flash-preview", "gemini-3.5-flash-preview": | |
| return AppPreferences.gemini35FlashThinkingLevel |
| static let gpt55FastModeKey = "gpt55FastMode" | ||
| static let gemini31ProThinkingLevelKey = "gemini31ProThinkingLevel" | ||
| static let gemini3FlashThinkingLevelKey = "gemini3FlashThinkingLevel" | ||
| static let gemini35FlashThinkingLevelKey = "gemini35FlashThinkingLevel" |
There was a problem hiding this comment.
Renaming the UserDefaults key from gemini3FlashThinkingLevel to gemini35FlashThinkingLevel will cause existing users to lose their saved thinking level preference for this model, reverting them to the new default ("medium"). Unless a fresh start is intentionally desired for all users, it is generally better to keep the existing key value to preserve user settings during the upgrade.
| static let gemini35FlashThinkingLevelKey = "gemini35FlashThinkingLevel" | |
| static let gemini35FlashThinkingLevelKey = "gemini3FlashThinkingLevel" |
| idSlug: "gemini-3-flash", | ||
| displayName: "Gemini 3 Flash", | ||
| baseModel: "gemini-3.5-flash-preview", | ||
| idSlug: "gemini-3.5-flash", |
There was a problem hiding this comment.
Changing the idSlug from gemini-3-flash to gemini-3.5-flash will change the generated model ID in Factory's settings.json (from custom:droidproxy:gemini-3-flash to custom:droidproxy:gemini-3.5-flash). This is a breaking change for existing users, as their current droids configured with the old ID will stop working until they manually update their configuration or re-apply the Factory models. Consider keeping the existing idSlug to ensure a smoother transition for existing configurations.
| idSlug: "gemini-3.5-flash", | |
| idSlug: "gemini-3-flash", |
This PR updates Gemini 3 Flash to 3.5 Flash across the codebase, including app logic, UI, website, and documentation. It also updates the thinking levels and sets the default level for 3.5 Flash to medium.