Spaces:
Paused
Paused
Commit History
-
π Add debugging for Firebase custom models storageβ
- Add detailed logging to see what's being saved to Firebase - Debug custom models loading structure - Identify why only model IDs are appearing in Firebase π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>28fe5c6 -
β‘ Move all Firebase operations to background threadsβ
- Remove Firebase saves from request handling completely - Move structured logging to background thread - Immediate response to frontend, no more worker timeouts - Background threads handle all Firebase operations asynchronously π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>9110c1d -
π Make model addition non-blocking and fix file permissionsβ
- Switch to asynchronous Firebase operations for model addition - Use data/ directory for local file storage (avoid permission issues) - Prevent worker timeouts by making saves non-blocking - Fix modal closing and UI refresh issues π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>f25770d -
π§ Fix Add Models worker timeout and missing logging methodβ
- Add missing log_user_action method to FirebaseStructuredLogger - Add timeout protection to Firebase sync operations (5s timeout) - Prevent worker crashes during model addition - Ensure proper fallback to local storage on timeout π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>287a98e -
β Fix model addition confirmation and display issuesβ
- Add 2-second delay before page reload to show success notification - Enhance success notifications with checkmark emoji and longer duration - Add synchronous Firebase save methods for critical model addition operations - Ensure newly added models appear immediately in provider sections - Improve notification styling with better visibility and shadows - Add debug logging for successful model additions This resolves the issues where: 1. Success confirmations weren't visible due to immediate page reload 2. Newly added models weren't appearing in the interface π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>6e75c75 -
π₯ Fix Firebase timeout issues causing worker crashesβ
- Add timeout protection to all Firebase operations to prevent blocking - Use threaded operations with 3-5 second timeouts for Firebase saves/loads - Add fallback behavior when Firebase operations timeout - Prevent infinite blocking that was causing gunicorn worker timeouts - Fix model addition form crashes and application restarts This resolves the WORKER TIMEOUT errors and application crashes when adding new models through the admin interface. π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>efb0b84 -
π° Fix pricing format: Convert from per-1K to per-1M tokensβ
- Update ModelInfo fields from input_cost_per_1k to input_cost_per_1m - Fix cost calculation to use 1M token denominator instead of 1K - Update all default model prices to reflect per-1M token costs - Fix admin form labels and field names for proper pricing display - Add debugging to model addition form submission - Update API endpoints to use correct field names - Fix custom model display to show per-1M pricing π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>853bdb3 -
π§ Fix user view template and enhance user analyticsβ
Bug Fix: - Fixed Jinja template error in user view page (dict vs attribute access) - User statistics now properly display without crashing Enhanced User Analytics: - Added detailed user analytics with cost tracking - Comprehensive model usage statistics per user - Success rate, response time, and error tracking - Per-model cost and token breakdown - Daily and hourly usage distribution Features: - Enhanced user view with 8 key metrics - Detailed model usage table with costs - Better error handling for missing data - Backward compatibility with existing stats Technical Implementation: - New get_user_analytics() method in structured logger - Combined data from both event loggers - Proper dictionary access in templates - Enhanced dummy logger for Firebase-less deployments π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>ff331a9 -
𧬠Add Dynamic Model Management Systemβ
Major new feature: Complete model management system with admin interface. Key Features: - Add new AI models via admin interface (e.g., gpt-4.1, o3-mini) - Support for all providers: OpenAI, Anthropic, Google, Mistral, Groq, Cohere - Whitelist-only security model for model access control - Firebase persistence for custom models - Cost tracking and usage analytics - Beautiful admin interface with modal forms Technical Implementation: - Enhanced ModelFamilyManager with dynamic model CRUD operations - New API endpoints for model management - Comprehensive model validation and error handling - Custom models separate from default models - Real-time model toggling and bulk operations Documentation: - Created comprehensive docs/model-management.md guide - Updated README with documentation structure - Added docs/README.md index Security: - Models must exist AND be whitelisted to be used - Non-existent models like "o3-mini" are blocked with 403 - Default models preserved and auto-whitelistedβ¦7e1c5bd -
Fix indentation errors from debug cleanupβ
- Add missing 'pass' statements in empty except and else blocks - Fix IndentationError in core/app.py and auth.py π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>b5d9316 -
Clean up excessive debug output and fix admin authenticationβ
- Remove verbose request logging middleware from core app - Clean up MetricsTracker and Anthropic API debug messages - Remove Firebase initialization debug output and key decoding messages - Fix admin authentication by properly loading .env in AuthConfig - Remove admin web debug output and user management verbose logging - Clean up model families configuration loading messages - Simplify Firebase logger initialization output π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>3149a5d -
π§Ή Clean up unused files and legacy codeβ
- Remove old SQLite logger files (replaced by firebase_logger.py) - Remove duplicate requirements.txt from config folder - Repository is now cleaner and only contains active code π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>ffe9770 -
π Add privacy policy: Clarify that prompts/responses are NOT loggedβ
- Add prominent privacy section to README - Clarify exactly what data IS and IS NOT logged - Emphasize that prompt content and response content are never stored - Only usage metrics, token counts, and analytics are logged - Add privacy notices to code comments and .env.example - Ensure users understand NyanProxy is privacy-first Privacy Policy: β Usage metrics, token counts, model usage, timestamps β Prompt content, response content, conversation history β Personal data, IP addresses (only hashed for abuse prevention) This addresses any concerns about data privacy while maintaining necessary usage tracking for quotas and billing. π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>a486ff5 -
π§Ή Clean up local database files and emphasize Firebase requirementβ
- Remove all local SQLite database files from project - Update README with prominent Firebase requirement section - Add detailed setup instructions for Firebase configuration - Update .env.example with clear Firebase requirements - Fix all import paths to use Firebase logger instead of SQLite - Add warning about limited mode without Firebase - Test application startup without local database files Changes: β Removed: *.db, *.db-shm, *.db-wal files β Updated: README.md with Firebase setup guide β Updated: .env.example with Firebase configuration β Fixed: All import paths in routes and middleware β Tested: Application starts successfully without local databases π₯ Firebase is now the single source of truth for all data! π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>05fe460 -
π₯ Replace SQLite with Firebase for persistent loggingβ
- Create new Firebase-based event logging system - Replace SQLite databases with Firebase Realtime Database - Add comprehensive analytics and structured logging - Eliminate permission issues with file system access - Ensure persistent logging across HF Space restarts - Maintain backward compatibility with existing code - Add graceful fallbacks when Firebase unavailable Benefits: - β Persistent data survives HF Space restarts - β No file permission issues - β Scalable and reliable - β Real-time analytics - β Already configured and working π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>63bc49c -
Fix HF Spaces permission error: Use /tmp for databasesβ
- Change database paths from 'database/' to '/tmp/' for HF Spaces compatibility - Add permission error handling with fallback to /tmp directory - HF Spaces filesystem is read-only, /tmp is writable - Resolves PermissionError: [Errno 13] Permission denied: 'database' π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>ab36c20 -
Fix database directory creation for HF Space deploymentβ
- Add os.makedirs() to ensure database directory exists - Update event logger to use database/ folder path - Update structured logger to use database/ folder path - Fix DatabaseConnectionPool to create directory before connections - Resolve sqlite3.OperationalError: unable to open database file π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>4c8fce4 -
Refactor: Organize codebase with modular structureβ
- Move templates to pages/ folder for better organization - Move core application logic to core/ folder - Move AI tokenizers to ai/tokenizers/ for future AI service expansion - Move database files to database/ folder - Move configuration files to config/ folder - Add proper HF Space configuration and branding - Update README with NyanProxy branding and features - Create root app.py for HF Space compatibility - Add .env.example for configuration reference - Add start.bat for Windows development convenience - Update all import paths to work with new structure - Maintain backward compatibility for existing deployments π€ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>62be87c