feat(gemini): update Gemini model types and implement rate limiting for free tier
- Changed Gemini model types to 'gemini-2.5-flash-lite', 'gemini-2.5-flash', and 'gemini-3-flash'. - Introduced RPM limits for free tier models with a maximum of 10 RPM for 'gemini-2.5-flash-lite' and 5 RPM for the others. - Added rate limiting enforcement in the GeminiAgent class, which waits based on the model's RPM limit. - Updated getGeminiConfig to include billingEnabled setting, allowing users to skip rate limiting if billing is enabled. - Modified ContextSettingsModal to reflect new model options and added a toggle for enabling billing. - Updated default settings to use the new model and billing configuration.
This commit is contained in:
@@ -471,14 +471,22 @@ export function ContextSettingsModal({
|
||||
tooltip="Gemini model used for generating observations"
|
||||
>
|
||||
<select
|
||||
value={formState.CLAUDE_MEM_GEMINI_MODEL || 'gemini-2.0-flash-exp'}
|
||||
value={formState.CLAUDE_MEM_GEMINI_MODEL || 'gemini-2.5-flash-lite'}
|
||||
onChange={(e) => updateSetting('CLAUDE_MEM_GEMINI_MODEL', e.target.value)}
|
||||
>
|
||||
<option value="gemini-2.0-flash-exp">gemini-2.0-flash-exp (fastest)</option>
|
||||
<option value="gemini-1.5-flash">gemini-1.5-flash (balanced)</option>
|
||||
<option value="gemini-1.5-pro">gemini-1.5-pro (highest quality)</option>
|
||||
<option value="gemini-2.5-flash-lite">gemini-2.5-flash-lite (10 RPM free)</option>
|
||||
<option value="gemini-2.5-flash">gemini-2.5-flash (5 RPM free)</option>
|
||||
<option value="gemini-3-flash">gemini-3-flash (5 RPM free)</option>
|
||||
</select>
|
||||
</FormField>
|
||||
<div className="toggle-group" style={{ marginTop: '8px' }}>
|
||||
<ToggleSwitch
|
||||
label="Billing Enabled"
|
||||
tooltip="Enable if you have billing set up on Google Cloud. Skips rate limiting (1000+ RPM available)."
|
||||
checked={formState.CLAUDE_MEM_GEMINI_BILLING_ENABLED === 'true'}
|
||||
onChange={(checked) => updateSetting('CLAUDE_MEM_GEMINI_BILLING_ENABLED', checked ? 'true' : 'false')}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user