Update Claude Sonnet model ID to claude-sonnet-4-5-20250929 (v4.5) and
fix API endpoint formats for Cherry Studio compatibility. Remove
trailing slashes from all endpoint URLs to allow Cherry Studio to
automatically append v1 version parameter.
Add important notes about Cherry Studio URL format requirements,
explaining that URLs without trailing slashes and URLs with /v1/
suffix are equivalent, while URLs with single trailing slash will
ignore the v1 version.
Changes:
- Update Claude Sonnet model from claude-sonnet-4-20250514 to
claude-sonnet-4-5-20250929
- Fix Claude endpoint: /claude/ → /claude
- Fix Gemini endpoint: /gemini/ → /gemini
- Fix Codex endpoint: /openai/ → /openai
- Add URL format explanation and best practices section
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Problem
- Original implementation sends webhook notification on EVERY request when
account reaches 5-hour limit warning status
- Users receive hundreds of duplicate notifications within same 5-hour window
## Solution
- Add `maxFiveHourWarningsPerWindow` config (default: 1, max: 10)
- Track warning count per session window with metadata:
- fiveHourWarningWindow: identifies current window
- fiveHourWarningCount: tracks notifications sent
- fiveHourWarningLastSentAt: last notification timestamp
- Only send notification if count < max limit
- Auto-reset counters when entering new 5-hour window
## Changes
- Add warning limit control in constructor
- Add `_clearFiveHourWarningMetadata()` helper method
- Update `updateSessionWindowStatus()` with notification throttling
- Clear warning metadata on window refresh and manual schedule recovery
## Configuration
- Environment: CLAUDE_5H_WARNING_MAX_NOTIFICATIONS (1-10)
- Config: config.claude.fiveHourWarning.maxNotificationsPerWindow
- Default: 1 notification per window
## Testing
- Tested with accounts reaching 5h limit
- Verified single notification per window
- Confirmed counter reset on new window
Replace direct token decryption with getValidAccessToken call to
enable automatic token expiration check and refresh. This fixes
authentication_error when fetching OAuth usage data with expired
access tokens.
Add OAuth usage visualization for Claude OAuth accounts while maintaining
existing Setup Token session window display. Accounts show different UI
based on authorization type detected via scopes.
Changes:
- Add loadClaudeUsage() for async OAuth usage data loading
- Add isClaudeOAuth() to detect auth type (checks user:profile + user:inference scopes)
- Add OAuth helpers: formatClaudeUsagePercent, getClaudeUsageWidth,
getClaudeUsageBarClass, formatClaudeRemaining
- Display three OAuth windows (5h, 7d, 7d-Opus) for OAuth accounts
- Maintain original session window display for Setup Token accounts
- Color-coded progress bars (blue < 60%, yellow 60-90%, red >= 90%)
- Update tooltip with OAuth documentation
- Remove duplicate Claude fallback branch
- Apply to desktop and mobile views