Skip to content

Refactor AI integration and data management to improve system reliabi…#1695

Merged
theovilardo merged 1 commit into
masterfrom
fix/ai-404-issue
Apr 10, 2026
Merged

Refactor AI integration and data management to improve system reliabi…#1695
theovilardo merged 1 commit into
masterfrom
fix/ai-404-issue

Conversation

@theovilardo

Copy link
Copy Markdown
Collaborator

…lity and expand configuration options.

AI & LLM Integration

  • Expanded Provider Support: Added configuration states for DeepSeek, NVIDIA, Kimi, and GLM models in SettingsViewModel.
  • Digest Generation: Updated UserProfileDigestGenerator to use a more comprehensive "All" time range and replaced raw skip ratios with active session cadence (sessions per day) for richer behavioral context.
  • Worker Enhancements: Updated AiWorker and GeminiModelService to properly convert database entities to domain models when generating user digests.
  • State Management: Streamlined PlayerViewModel logic by consolidating AI-related state updates and refactoring the AI provider availability check to handle multiple API keys more efficiently.

Database & Schema

  • Jellyfin Integration: Added schema definitions and migration logic for jellyfin_songs and jellyfin_playlists tables, including relevant indices for optimized querying.
  • AI Caching: Introduced an ai_cache table to store prompt hashes and responses, reducing redundant LLM API calls.
  • Migration Cleanup: Consolidated recent database migrations into the main creation logic for cleaner schema initialization.

UI & Components

  • Settings & Playlists: Added DeepSeek API key visibility to the settings screen and updated the AI Playlist and Metadata sheets with improved visual feedback (animations, icons, and layout refinements).
  • Bug Fixes: Resolved minor UI state synchronization issues between AiStateHolder and the player interface.

Performance & Architecture

  • Dependency Cleanup: Removed unused EngagementDao dependency from the AI digest generator.
  • Resilience: Improved error handling in the song editing flow and ensured background workers have access to the full song library for generating context-aware summaries.

…lity and expand configuration options.

### AI & LLM Integration
- **Expanded Provider Support**: Added configuration states for DeepSeek, NVIDIA, Kimi, and GLM models in `SettingsViewModel`.
- **Digest Generation**: Updated `UserProfileDigestGenerator` to use a more comprehensive "All" time range and replaced raw skip ratios with active session cadence (sessions per day) for richer behavioral context.
- **Worker Enhancements**: Updated `AiWorker` and `GeminiModelService` to properly convert database entities to domain models when generating user digests.
- **State Management**: Streamlined `PlayerViewModel` logic by consolidating AI-related state updates and refactoring the AI provider availability check to handle multiple API keys more efficiently.

### Database & Schema
- **Jellyfin Integration**: Added schema definitions and migration logic for `jellyfin_songs` and `jellyfin_playlists` tables, including relevant indices for optimized querying.
- **AI Caching**: Introduced an `ai_cache` table to store prompt hashes and responses, reducing redundant LLM API calls.
- **Migration Cleanup**: Consolidated recent database migrations into the main creation logic for cleaner schema initialization.

### UI & Components
- **Settings & Playlists**: Added DeepSeek API key visibility to the settings screen and updated the AI Playlist and Metadata sheets with improved visual feedback (animations, icons, and layout refinements).
- **Bug Fixes**: Resolved minor UI state synchronization issues between `AiStateHolder` and the player interface.

### Performance & Architecture
- **Dependency Cleanup**: Removed unused `EngagementDao` dependency from the AI digest generator.
- **Resilience**: Improved error handling in the song editing flow and ensured background workers have access to the full song library for generating context-aware summaries.
@theovilardo theovilardo merged commit eb21971 into master Apr 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant