Add support for Gemini 3 models#8
Conversation
- Add gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview, and gemini-3-flash-preview to supported models in config.ts - Update gemini.ts to use thinkingLevel: 'minimal' for Gemini 3 models for fast commit message generation - Update README.md to include new Gemini 3 models and descriptions
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdded three Gemini model variants to the supported list, removed older Gemini 1.5 entries, updated README recommendation, and added model-based Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/utils/gemini.ts`:
- Around line 57-58: The added thinkingConfig with thinkingLevel is incompatible
with the pinned `@google/genai` types; inspect package.json for the pinned
`@google/genai` version and either (A) upgrade `@google/genai` to a version that
defines GenerateContentConfig.thinkingConfig.thinkingLevel and run npm/yarn
install, or (B) keep the pinned SDK and remove/replace thinkingLevel in
src/utils/gemini.ts (the branch that checks model.startsWith('gemini-3')) with
only supported properties (e.g., thinkingBudget) so the config object matches
the GenerateContentConfig typing; verify by searching for
thinkingConfig/thinkingLevel/thinkingBudget usages and running TypeScript build
to confirm TS2322 is resolved.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b7128ae1-5c0f-4344-be29-8f4b5148114b
📒 Files selected for processing (3)
README.mdsrc/utils/config.tssrc/utils/gemini.ts
| ...(model.includes('2.5') && model.toLowerCase().includes('flash') ? { thinkingConfig: { thinkingBudget: 0 } } : {}), | ||
| ...(model.startsWith('gemini-3') ? { thinkingConfig: { thinkingLevel: 'minimal' } } : {}), |
There was a problem hiding this comment.
Build blocker: thinkingConfig shape is not compatible with current SDK typings.
Line 58 introduces thinkingLevel, and CI already fails with TS2322 on the config object. Please align this with the @google/genai version in the repo (either upgrade SDK/types to one that supports thinkingLevel, or use a supported thinkingConfig field for the pinned version).
#!/bin/bash
set -euo pipefail
# 1) Print pinned `@google/genai` version from repo config
python - <<'PY'
import json
with open('package.json') as f:
p = json.load(f)
deps = {}
deps.update(p.get('dependencies', {}))
deps.update(p.get('devDependencies', {}))
print("Pinned `@google/genai`:", deps.get('@google/genai', 'NOT_FOUND'))
PY
# 2) Confirm all thinkingConfig usages in source
rg -n -C3 'thinkingConfig|thinkingLevel|thinkingBudget' srcFor the exact `@google/genai` version pinned in this repository, what properties are allowed in GenerateContentConfig.thinkingConfig? Is thinkingLevel supported?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/utils/gemini.ts` around lines 57 - 58, The added thinkingConfig with
thinkingLevel is incompatible with the pinned `@google/genai` types; inspect
package.json for the pinned `@google/genai` version and either (A) upgrade
`@google/genai` to a version that defines
GenerateContentConfig.thinkingConfig.thinkingLevel and run npm/yarn install, or
(B) keep the pinned SDK and remove/replace thinkingLevel in src/utils/gemini.ts
(the branch that checks model.startsWith('gemini-3')) with only supported
properties (e.g., thinkingBudget) so the config object matches the
GenerateContentConfig typing; verify by searching for
thinkingConfig/thinkingLevel/thinkingBudget usages and running TypeScript build
to confirm TS2322 is resolved.
- Added support for Gemini 3.1 Pro Preview, 3.1 Flash Lite Preview, and 3 Flash Preview - Removed support for Gemini 1.5 Flash and 1.5 Pro models - Implemented thinkingLevel: 'low' for Pro models and 'minimal' for Flash models to ensure optimal performance and cost-efficiency - Updated README.md and config validation to reflect these changes
Added support for the latest Gemini 3 models: Gemini 3.1 Pro Preview, Gemini 3.1 Flash Lite Preview, and Gemini 3 Flash Preview. Updated configuration validation, API call parameters (setting thinkingLevel to 'minimal' for high-volume efficiency), and README documentation.
PR created automatically by Jules for task 18165654933649868291 started by @mzazakeith
Summary by CodeRabbit
New Features
Documentation