316d9cf96b
* feat(docs): Add analysis reports for issues #514, #517, #520, #527, and #532 - Issue #514: Documented analysis of orphaned observer session files, including root cause, evidence, and recommended fixes. - Issue #517: Analyzed PowerShell escaping issues in cleanupOrphanedProcesses() on Windows, with recommended fixes using WMIC. - Issue #520: Confirmed resolution of stuck messages issue through architectural changes to a claim-and-delete pattern. - Issue #527: Identified detection failure of uv on Apple Silicon Macs with Homebrew installation, proposed path updates for detection. - Issue #532: Analyzed memory leak issues in SessionManager, detailing session cleanup and conversationHistory growth concerns, with recommended fixes. * fix: address GitHub issues #511, #517, #527, #531 - #511: Add gemini-3-flash model to GeminiAgent (type, RPM limits, validation) - #517: Replace PowerShell with WMIC for Windows process management (fixes Git Bash/WSL) - #527: Add Apple Silicon Homebrew paths for bun and uv detection - #531: Remove duplicate type definitions from export-memories.ts using bridge file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(docs): Add detailed reports for issues #511 and #531 addressing model validation and type duplication * test: add regression tests for PR #542 fixes Adds comprehensive regression tests for all 4 issues addressed in PR #542: - #511: Add gemini-3-flash model tests to verify model acceptance and rate limiting - #517: Add WMIC parsing tests for Windows process enumeration (23 tests) - #527: Add Apple Silicon Homebrew path tests for bun/uv detection (18 tests) - #531: Add export types tests to validate type interfaces (12 tests) Total: 53 new tests, all passing. Addresses PR review feedback requesting test coverage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
71 lines
2.0 KiB
Markdown
71 lines
2.0 KiB
Markdown
# Issue #511: GeminiAgent Missing gemini-3-flash Model
|
|
|
|
## Summary
|
|
|
|
**Issue**: `gemini-3-flash` model missing from GeminiAgent validation
|
|
**Type**: Bug - Configuration Mismatch
|
|
**Status**: Open
|
|
|
|
The `GeminiAgent` class is missing `gemini-3-flash` in its `validModels` array and `GeminiModel` type, while `SettingsRoutes` correctly validates it. This causes a silent fallback to `gemini-2.5-flash` when users configure `gemini-3-flash`.
|
|
|
|
## Root Cause
|
|
|
|
Synchronization gap between two configuration validation sources:
|
|
|
|
| Component | Location | Status |
|
|
|-----------|----------|--------|
|
|
| SettingsRoutes.ts (line 244) | Settings validation | Includes `gemini-3-flash` |
|
|
| GeminiAgent.ts (lines 34-39) | Type definition | **MISSING** |
|
|
| GeminiAgent.ts (lines 42-48) | RPM limits | **MISSING** |
|
|
| GeminiAgent.ts (lines 370-376) | validModels array | **MISSING** |
|
|
|
|
## Failure Behavior
|
|
|
|
1. User configures `gemini-3-flash` in settings
|
|
2. Settings validation passes (SettingsRoutes.ts includes it)
|
|
3. At runtime, `GeminiAgent.getGeminiConfig()`:
|
|
- Checks `validModels` - model not found
|
|
- Logs warning: "Invalid Gemini model 'gemini-3-flash', falling back to gemini-2.5-flash"
|
|
- Silently uses wrong model
|
|
|
|
## Affected Files
|
|
|
|
| File | Change Required |
|
|
|------|-----------------|
|
|
| `src/services/worker/GeminiAgent.ts` | Add to type, RPM limits, validModels |
|
|
|
|
## Recommended Fix
|
|
|
|
**3 additions to GeminiAgent.ts:**
|
|
|
|
```typescript
|
|
// 1. Type definition (lines 34-39)
|
|
export type GeminiModel =
|
|
| 'gemini-2.5-flash-lite'
|
|
| 'gemini-2.5-flash'
|
|
| 'gemini-2.5-pro'
|
|
| 'gemini-2.0-flash'
|
|
| 'gemini-2.0-flash-lite'
|
|
| 'gemini-3-flash'; // ADD
|
|
|
|
// 2. RPM limits (lines 42-48)
|
|
const GEMINI_RPM_LIMITS: Record<GeminiModel, number> = {
|
|
// ... existing entries ...
|
|
'gemini-3-flash': 5, // ADD
|
|
};
|
|
|
|
// 3. validModels (lines 370-376)
|
|
const validModels: GeminiModel[] = [
|
|
// ... existing entries ...
|
|
'gemini-3-flash', // ADD
|
|
];
|
|
```
|
|
|
|
## Complexity
|
|
|
|
**Trivial** - < 5 minutes
|
|
|
|
- 3 lines to add in 1 file
|
|
- No test changes required
|
|
- Fully backward compatible
|