55 lines
1.7 KiB
Markdown
55 lines
1.7 KiB
Markdown
# ⚠️ CRITICAL PROJECT RULES - DO NOT VIOLATE ⚠️
|
|
|
|
## Gemini AI Model Configuration
|
|
|
|
**RULE: The Gemini model name is LOCKED to `gemini-2.5-flash`**
|
|
|
|
- **File**: `lib/services/gemini_service.dart` (line 194)
|
|
- **Model Name**: `gemini-2.5-flash`
|
|
- **Status**: Confirmed working (2026-01-17)
|
|
- **DO NOT CHANGE** this model name without **explicit user approval**
|
|
- This model name was verified by the user via Google AI Studio dashboard screenshot
|
|
|
|
### History of Issues:
|
|
1. AI incorrectly suggested `gemini-1.5-flash` (does not exist)
|
|
2. AI incorrectly suggested `gemini-1.5-flash-latest` (does not exist)
|
|
3. User confirmed via screenshot that `gemini-2.5-flash` is the correct and available model
|
|
|
|
### If Model Change is Required:
|
|
1. User MUST explicitly approve the change
|
|
2. User MUST provide evidence (e.g., screenshot from Google AI Studio)
|
|
3. Update this file with the new model name and date
|
|
|
|
---
|
|
|
|
## API Key Configuration
|
|
|
|
**RULE: Secrets.dart API Key structure is FIXED**
|
|
|
|
- **File**: `lib/secrets.dart` (lines 27-30)
|
|
- **Correct Format**:
|
|
```dart
|
|
static const String geminiApiKey = String.fromEnvironment(
|
|
'GEMINI_API_KEY', // ← Environment variable name
|
|
defaultValue: 'AIza...', // ← Actual API key
|
|
);
|
|
```
|
|
- **DO NOT** put the API key in the first argument
|
|
- **DO NOT** leave defaultValue empty
|
|
|
|
---
|
|
|
|
## Synology AI Proxy Configuration
|
|
|
|
**RULE: useProxy flag controls connection mode**
|
|
|
|
- **File**: `lib/secrets.dart` (line 19)
|
|
- **Current Mode**: `useProxy = false` (Direct Cloud API)
|
|
- When `useProxy = true`: Connects via Synology NAS at home
|
|
- When `useProxy = false`: Connects directly to Google Gemini API (works anywhere)
|
|
|
|
---
|
|
|
|
**Last Updated**: 2026-01-17
|
|
**Maintained By**: User + Claude Code AI Assistant
|