diff --git a/README.md b/README.md index 56edaf2..553473b 100644 --- a/README.md +++ b/README.md @@ -200,12 +200,13 @@ Note, this will use more tokens as it generates more results. Default: `gemini-2.5-flash` The Gemini model to use. Supported models include: +- `gemini-3.1-pro-preview` - Gemini 3.1 Pro Preview (State-of-the-art) +- `gemini-3.1-flash-lite-preview` - Gemini 3.1 Flash Lite Preview (High-volume) +- `gemini-3-flash-preview` - Gemini 3 Flash Preview (Fast and capable) - `gemini-2.5-flash` (default) - Fast and efficient - `gemini-2.5-pro` - More capable but slower -- `gemini-1.5-flash` - Previous generation fast model -- `gemini-1.5-pro` - Previous generation capable model -> Tip: `gemini-2.5-pro` provides more sophisticated code analysis but may be slower and more expensive than `gemini-2.5-flash`. +> Tip: `gemini-3.1-pro-preview` provides state-of-the-art reasoning but may be slower than Flash models. #### timeout diff --git a/src/utils/config.ts b/src/utils/config.ts index 4c5f6ae..3e50e3f 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -86,10 +86,11 @@ const configParsers = { // Validate that it's a supported Gemini model const supportedModels = [ + 'gemini-3.1-pro-preview', + 'gemini-3.1-flash-lite-preview', + 'gemini-3-flash-preview', 'gemini-2.5-flash', - 'gemini-2.5-pro', - 'gemini-1.5-flash', - 'gemini-1.5-pro' + 'gemini-2.5-pro' ]; if (!supportedModels.includes(model)) { diff --git a/src/utils/gemini.ts b/src/utils/gemini.ts index 606a4d4..fec60c4 100644 --- a/src/utils/gemini.ts +++ b/src/utils/gemini.ts @@ -55,6 +55,11 @@ export const generateCommitMessage = async ( ...generationConfig, systemInstruction, ...(model.includes('2.5') && model.toLowerCase().includes('flash') ? { thinkingConfig: { thinkingBudget: 0 } } : {}), + ...(model.startsWith('gemini-3') ? { + thinkingConfig: { + thinkingLevel: model.includes('pro') ? 'low' : 'minimal' + } + } : {}), } });