- Added new dependencies: asyncmy, cryptography, and greenlet.
- Updated .env.example by removing an empty line.
- Enhanced configuration loading to support reloading on changes and applied environment variable overrides.
- Modified SQLAlchemy column types for better data integrity.
- Modified Docker image tagging logic to enable tagging for branches and events, ensuring that the latest tag is applied correctly for branch pushes and version tags are created for releases.
- Bumped aiohttp version from 3.13.3 to 3.13.4 in pyproject.toml.
- Updated curl-cffi version from 0.13.0 to 0.15.0 in pyproject.toml.
- Updated aiohttp version from 3.13.3 to 3.13.5 in uv.lock, including corresponding source and wheel URLs.
- Updated Dockerfile to copy pyproject.toml alongside config.defaults.toml.
- Refactored static file serving in router.py and pages.py to use a new helper function for improved maintainability.
- Updated HTML templates to include versioning in asset links for better cache management.
- Added a site footer to various HTML files for consistent UI across the application.
- Removed max_file_size_mb parameter from setup_logging and reload_logging functions.
- Updated log file naming convention to include date in the format app_{time:YYYY-MM-DD}.log.
- Changed log rotation to create a new file daily at midnight while retaining the last N daily files.
- Revised API documentation in REAMDE.md and README.en.md to reflect changes in authentication requirements for various endpoints.
- Updated the router in router.py to enforce API key verification for all model and response-related endpoints.
- Enhanced clarity in API descriptions by specifying authentication requirements for each endpoint.
- Added `tiktoken` dependency to `pyproject.toml`.
- Refactored token estimation logic across multiple files to utilize new functions for better accuracy.
- Updated usage calculations in various response and chat handling modules to reflect changes in token estimation methods.
- Improved overall code structure by removing redundant token estimation functions.
- Removed unnecessary environment variable patterns from .gitignore.
- Renamed configuration keys in config.defaults.toml for clarity (function_enabled to webui_enabled, function_key to webui_key).
- Increased usage concurrency limit from 10 to 50 in AccountRefreshService.
- Updated docker-compose.yml to remove default Redis URL.
- Enhanced Dockerfile for better build efficiency and added health check.
- Removed deprecated aiofiles dependency and updated other dependencies in pyproject.toml.
- Deleted outdated readme.md file.
- Improved account management logic in various modules, including state machine and refresh service.
- Added support for new quota management features and improved logging for account refresh operations.
image_edit.py:
- Remove VideoService/parentPostId dependency (no longer needed)
- Use file_attachments instead of imageEditUri for image upload
- Use fixed grok-4 / MODEL_MODE_AUTO for edit upstream
- Add image_id to stream events for frontend waterfall compatibility
app_chat.py:
- Add robust _read_error_body() for non-200 upstream responses
- Log content-type and body on failure for better debugging
chat.py:
- Extract image URLs from markdown syntax in message content
- Deduplicate collected image URLs
The WebSocket endpoint `wss://grok.com/ws/imagine/listen` has been deprecated
by Grok, causing all image generation requests to fail with `rate_limit_exceeded`.
This change:
- Adds `_stream_app_chat` and `_collect_app_chat` methods that use the app-chat
REST API (via `GrokChatService`) with `imageGen` tool override for image generation
- Makes app-chat the primary path for both streaming and non-streaming image generation
- Falls back to ws_imagine only when app-chat fails with a non-rate-limit error
- Adds `request_overrides` parameter to `GrokChatService.chat()` and
`AppChatReverse.build_payload()` to support `imageGenerationCount` and `enableNsfw`
- Reuses existing `ImageStreamProcessor` and `ImageCollectProcessor` from image_edit
module for processing app-chat image responses
Fixes image generation that was broken for all users after Grok deprecated ws_imagine.