458 Commits
Author SHA1 Message Date
Chenyme 5bc4f236c3 Merge pull request #434 from chenyme/fix_challenge
fix: enhance feedback handling in asset upload process
v2.0.2
2026-04-10 15:54:33 +08:00
Chenyme 1498c70c99 feat: add root redirect to admin page in web router 2026-04-10 15:53:21 +08:00
Chenyme 665160c74a fix: enhance feedback handling in asset upload process 2026-04-10 15:47:22 +08:00
Chenyme d82c5aef8d Merge pull request #433 from chenyme/migrated_config
chore: update dependencies and improve configuration handling
2026-04-10 15:43:31 +08:00
Chenyme 971b69d12a chore: update MySQL dependency and configuration references 2026-04-10 15:40:42 +08:00
Chenyme 04cc92346b chore: bump version to 2.0.2 2026-04-10 15:27:35 +08:00
Chenyme d22f3f4ef8 chore: update dependencies and improve configuration handling
- 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.
2026-04-10 15:22:21 +08:00
Chenyme 11fa6fd384 Merge pull request #431 from chenyme/enhance_log
feat: add LOG_FILE_ENABLED configuration for local file logging
2026-04-10 13:45:14 +08:00
Chenyme fefe8e6e38 feat: add LOG_FILE_ENABLED configuration for local file logging 2026-04-10 13:40:24 +08:00
Chenyme 45bd78c392 Merge pull request #430 from chenyme/fix_dependency
chore: add python-dotenv dependency and update imports
2026-04-10 13:14:20 +08:00
Chenyme f3bb60ca89 chore: add python-dotenv dependency and update imports 2026-04-10 13:09:36 +08:00
Chenyme b5dcdcbdfb Merge pull request #429 from chenyme/fix_clearance_mode
refactor: improve type hinting in ClearanceMode parse method
2026-04-10 13:01:12 +08:00
Chenyme 406bfe9e5d refactor: improve type hinting in ClearanceMode parse method 2026-04-10 12:57:36 +08:00
Chenyme 10e0105633 Merge pull request #427 from chenyme/fix_clearance_mode
fix: clearance mode handling
v2.0.1
2026-04-10 12:46:38 +08:00
Chenyme 189205a6a7 chore: enhance clearance mode handling 2026-04-10 12:34:16 +08:00
Chenyme 87b45cb3de docs: update README files to include new API endpoints and features 2026-04-10 10:50:57 +08:00
Chenyme 7765ec586a docs: update API documentation to include Anthropic APIs v2.0.0 2026-04-10 10:43:30 +08:00
Chenyme 164b1c31f9 chore: update Docker workflow for image tagging
- 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.
2026-04-10 10:39:59 +08:00
Chenyme 6bf3dcfa6e chore: update dependencies in pyproject.toml and uv.lock
- 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.
v2.0.0.rc0
2026-04-10 10:30:19 +08:00
Chenyme 2d9bef970b chore: remove outdated REAMDE.md file 2026-04-10 10:27:51 +08:00
Chenyme 1e3167abe5 refactor: enhance static file serving and update HTML templates
- 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.
2026-04-10 10:16:19 +08:00
Chenyme 899d086ecd refactor: update issue and pull request templates for clarity and conciseness 2026-04-10 09:46:00 +08:00
Chenyme d77cb2f166 refactor: simplify logging configuration and improve file management
- 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.
2026-04-10 09:38:33 +08:00
Chenyme 3afb3cc5aa Merge branch 'main' of https://github.com/chenyme/grok2api 2026-04-10 09:33:02 +08:00
Chenyme 07d57ab45b refactor: update API documentation and enforce authentication
- 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.
2026-04-10 00:41:22 +08:00
Chenyme a844267cc3 feat: enhance token estimation and add new dependencies
- 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.
2026-04-10 00:35:19 +08:00
Chenyme b407443820 refactor: update configuration and improve account management features
- 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.
2026-04-10 00:19:25 +08:00
Chenyme f5a1407aa3 refactor: update projects and remove legacy components 2026-04-08 17:00:00 +08:00
Chenyme bb8ae239df Update readme.md v1.6.0 2026-04-03 18:16:53 +08:00
Chenyme 79e593b97f refactor: simplify main.py structure and update entry point to app.main 2026-04-03 16:13:33 +08:00
Chenyme 1506407f3d refactor: update configuration structure and token management 2026-04-02 09:33:23 +08:00
Chenyme d22a1d5324 Merge pull request #406 from Huan-zhaojun/fix/supergrok-multiagent
fix: 修复 SuperGrok 付费账号多Agent模型空响应问题
2026-04-01 14:08:15 +08:00
Huan-zhaojun 7059965856 fix: 修复 SuperGrok 付费账号多智能体模型空响应问题
- 新增 modeId 映射替代旧的 modelName/modelMode 请求格式
    (Grok API 要求付费账号多智能体管线使用 modeId 字段)
  - 移除已废弃的 enable420 标志
  - 修复 think_closed_once 门控导致多智能体思维链 token 被丢弃的问题
  - 使用 messageStepId 将 Agent 思考聚合到单个 <think> 块
  - 丢弃正文输出中途插入的孤儿思考 token(Grok 官网也隐藏这部分)
  - CollectProcessor 添加 fallback token 收集兜底非流式模式
2026-03-27 02:47:43 +08:00
Chenyme 16e37b10a4 Merge pull request #374 from JinchengGao-Infty/fix-image-gen-app-chat
fix: use app-chat REST as primary image generation, fallback to ws_imagine
2026-03-23 16:17:05 +08:00
Chenyme 6779da7165 refactor: update request overrides handling in ImageEditService 2026-03-23 16:09:27 +08:00
Chenyme 7dc68eac9b Merge remote-tracking branch 'origin/main' into pr/374 2026-03-23 15:07:08 +08:00
Chenyme a79cd22453 Merge pull request #366 from majorcheng/main
fix: add estimated openai usage stats
2026-03-23 14:14:09 +08:00
Chenyme 927b927762 Merge remote-tracking branch 'origin/main' into pr/366 2026-03-23 14:08:32 +08:00
Chenyme 7922ac619d Merge pull request #336 from leik1000/pr_checkout
feat: videos接口支持多图参考,修改video界面,参考图数量增加到7张,同时支持@,添加多图参考的功能
2026-03-23 12:52:52 +08:00
Chenyme 674add4a20 feat: implement function to extract last user prompt and associated image URLs from messages 2026-03-23 12:47:26 +08:00
Chenyme 1c782ea0f6 Merge remote-tracking branch 'origin/main' into pr/336 2026-03-23 12:45:13 +08:00
Chenyme f785b311f5 Merge pull request #319 from piexian/fix_upstream_log_refresh_stability
fix: 限制日志暴涨并修复启动日志兼容问题
2026-03-23 11:43:31 +08:00
Chenyme 33caf94dd6 feat: add configuration option for logging health check requests 2026-03-23 11:33:55 +08:00
Chenyme 5fb7db3e78 Merge remote-tracking branch 'origin/main' into pr/319 2026-03-23 11:20:58 +08:00
JinchengGao-Infty 549c3dcae6 fix: refactor image edit to use file_attachments, improve error logging, extract markdown images
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
2026-03-20 22:19:08 +08:00
JinchengGao-Infty fb95e1ab27 fix: use app-chat REST API as primary image generation method, fallback to ws_imagine
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.
2026-03-20 20:46:14 +08:00
majorcheng 5437d632e7 fix: add estimated openai usage stats 2026-03-19 11:39:01 +08:00
lei 14c5c9f2e8 videos接口支持多图参考,修改video界面,参考图数量增加到7张,同时支持@,添加多图参考的功能 2026-03-18 17:13:18 +08:00
Chenyme 635e6e3524 chore: update version to 1.6.2 and adjust related file references 2026-03-18 13:47:31 +08:00
Chenyme 26f6d41df7 Merge pull request #346 from MaxCrazy1101/main
fix: Add configuration import in get_tokens endpoint
2026-03-18 11:42:09 +08:00