Chenyme
432acf41cf
refactor: replace DownloadService with CacheService in admin API and update related methods
2026-02-13 00:31:05 +08:00
Chenyme
716e274b89
refactor: update GROK services and remove unused components
2026-02-11 17:35:25 +08:00
Chenyme
eb00bbd57d
chore: remove unused gRPC-Web protocol files
2026-02-11 16:10:08 +08:00
Chenyme
9967bdd90e
refactor: optimize base64 validation and enhance header logging
2026-02-11 15:14:38 +08:00
Chenyme
90fc016807
merge: remove unused header, retry, and Statsig utility files
2026-02-11 11:32:54 +08:00
Chenyme
a864751543
Merge remote-tracking branch 'origin/main' into reactor_reverse
2026-02-11 11:01:04 +08:00
Chenyme
86a6642ef0
Merge pull request #160 from piexian/main
...
feat: 跨 Token 重试 + Token 刷新修复
2026-02-11 10:49:31 +08:00
piexian
b06bd8d83f
refactor: 跨 Token 重试次数改为读取 retry.max_retry 配置
...
将 ChatService 中跨 Token 重试的硬编码 max_token_retries=3 改为
从 retry.max_retry 配置项读取,与内层重试机制保持一致。
2026-02-11 01:02:13 +08:00
piexian
f53e412b4e
feat: 添加跨 Token 重试机制,429 配额不足时自动换 Token
...
- 在 ChatService.completions() 中实现跨 Token 重试循环,最多尝试 3 个
不同 Token,遇到 429 时标记当前 Token 为 COOLING 并切换下一个
- TokenPool.select() 和 TokenManager.get_token() 增加 exclude 参数,
支持排除已失败的 Token
- 新增 TokenManager.mark_rate_limited() 方法,将 429 的 Token 配额
归零并标记 COOLING,等待 Scheduler 刷新恢复
- 内层 retry_on_status 不再重试 429,避免对同一耗尽 Token 做无意义重试
- 循环耗尽后兜底抛出异常,避免隐式返回 None
2026-02-10 20:49:51 +08:00
piexian
d11b059943
fix: 修复 Token 自动刷新失败导致持续 504/429 错误
...
- 修复 Scheduler 刷新使用错误的默认模型名 (grok-4-1-thinking-1129 → grok-3),
避免 basic token 查询配额时返回 403
- 调整 Scheduler 启动后立即执行首轮刷新,而非等待整个 interval (2-8h)
- 移除刷新失败分支中的 mark_synced() 调用,使失败 token 在下一轮
循环中被重新尝试而非被跳过
- Token 池耗尽时自动触发 refresh_cooling_tokens(),尝试恢复
冷却中的 token,而非直接返回 429
2026-02-10 18:36:19 +08:00
piexian
f6b9bc37af
Merge remote-tracking branch 'upstream/main'
2026-02-10 17:20:22 +08:00
Chenyme
06357ad6c5
refactor: remove gRPC-Web protocol implementation and integrate WebSocket reverse handlers for image service
2026-02-10 11:46:22 +08:00
Chenyme
4573a1928e
fix: response handling in LivekitTokenReverse
2026-02-10 10:46:51 +08:00
Chenyme
413493d5b5
refactor: integrate reverse request handlers for image and voice services
2026-02-10 10:39:55 +08:00
Chenyme
06df48b87a
refactor: integrate reverse request handlers for NSFW
2026-02-10 10:15:24 +08:00
Chenyme
370edb5f92
refactor: integrate reverse request handlers for NSFW
2026-02-10 10:15:04 +08:00
Chenyme
d947ef69ba
refactor: simplify usage service by removing model_name parameter and integrating reverse request handler for rate limits
2026-02-09 22:03:27 +08:00
Chenyme
d3a1b09d3a
refactor: integrate reverse request handlers for image and video services
2026-02-09 16:41:43 +08:00
Chenyme
fddb79dd56
refactor: streamline asset service methods by integrating reverse request handlers
2026-02-09 14:40:32 +08:00
Chenyme
cb814a7eff
docs: update README.md
2026-02-09 10:06:05 +08:00
Chenyme
4d2a3581ea
Merge pull request #152 from MasterDevYY/main
...
fix: resolve SSL and media retrieval issues
2026-02-08 23:47:05 +08:00
MasterDevYY
8c791179c1
fix: update assets.py Sec-Fetch-Site header to same-site
2026-02-08 23:36:22 +08:00
MasterDevYY
00f0d2ba6a
fix: resolve SSL and media retrieval issues
...
- Fix CERTIFICATE_VERIFY_FAILED error on some Linux distributions.
- Fix 403 Forbidden error when fetching images and videos from origin servers.
2026-02-08 21:57:27 +08:00
Chenyme
490ca21739
Merge pull request #145 from double2tea/feature/smart-token-routing
...
feat: smart token routing for video generation + deviceEnvInfo fix
2026-02-08 16:07:29 +08:00
Chenyme
d93824f781
refactor: remove deprecated smart token routing configuration and related test
2026-02-08 16:06:09 +08:00
double2tea
69dbcac74a
fix: add missing deviceEnvInfo for video generation payload
...
The Grok API requires deviceEnvInfo field to correctly parse resolutionName.
Without this field, the backend ignores resolution settings and generates
low-resolution videos regardless of the requested quality.
Added deviceEnvInfo with standard 1920x1080 viewport settings to ensure
720p and other resolution settings are properly respected by the API.
Tested: 720p videos now correctly generate at 720x1280 resolution.
2026-02-08 03:46:45 +08:00
double2tea
01dcea9b7c
feat: implement smart token routing for video generation
...
- Add get_token_for_video() method to select token pool based on video requirements
- 720p or >6s videos automatically use ssoSuper token
- 480p and ≤6s videos use ssoBasic token
- Fallback to ssoBasic when ssoSuper is unavailable
- Add configuration options for smart routing
- Add test file for token routing logic
This solves the issue where non-SSO Super tokens were silently downgraded
to 480p by Grok API when requesting 720p videos.
2026-02-08 03:16:37 +08:00
Chenyme
9b94b37acd
chore: remove SERVER_STORAGE_URL from vercel configuration
2026-02-08 00:34:15 +08:00
Chenyme
267e234d3f
chore: remove SERVER_STORAGE_TYPE value from vercel configuration
2026-02-08 00:32:57 +08:00
Chenyme
2b03240efb
chore: update vercel configuration to use FastAPI framework
2026-02-08 00:20:49 +08:00
Chenyme
b47d847e88
docs: support vercel deploy
2026-02-08 00:10:54 +08:00
Chenyme
64180c6e3a
feat: add root redirect endpoint to admin API for improved navigation
2026-02-07 23:50:38 +08:00
Chenyme
14c46255bd
feat: implement Imagine session management with WebSocket and SSE support for real-time image generation
2026-02-07 23:48:28 +08:00
Chenyme
0bd1aaf335
feat: introduce DATA_DIR environment variable for configurable data storage paths
2026-02-07 23:00:29 +08:00
Chenyme
4206abf474
feat: add LOG_FILE_ENABLED environment variable to control file logging
2026-02-07 22:49:33 +08:00
Chenyme
4f174253e6
docs: update README files to include one-click deploy instructions for Render and enhance clarity in API documentation
2026-02-07 22:36:36 +08:00
Chenyme
a84880c75b
feat: add Imagine feature with WebSocket support for real-time image generation
2026-02-07 16:37:50 +08:00
Chenyme
51944d122f
feat: enhance image processing error handling and logging
2026-02-07 13:58:35 +08:00
Chenyme
d99e29ed48
Merge pull request #139 from chenyme/optimize
...
refactor: optimize code framework and project configuration
2026-02-07 13:43:11 +08:00
Chenyme
a692725baa
chore: remove deprecated grok configuration options to streamline settings
2026-02-07 13:38:08 +08:00
Chenyme
8361e65c31
refactor: clean up code formatting and improve readability across multiple files
2026-02-07 13:34:55 +08:00
Chenyme
bcd94069a7
feat: migrate configuration structure to improve organization and flexibility
2026-02-07 13:30:50 +08:00
Chenyme
5d369596c5
feat: improve token management and logging across services
2026-02-07 13:11:23 +08:00
Chenyme
2e201b5ebf
feat: enhance configuration management and service initialization
2026-02-07 12:40:42 +08:00
Chenyme
b132590045
feat: enhance configuration options across services for improved flexibility
2026-02-07 11:32:25 +08:00
Chenyme
c3c60a00d2
Merge pull request #136 from chenyme/imagine
...
feat: add WebSocket support for image generation and editing, enhance configuration options for image processing
2026-02-07 10:53:55 +08:00
Chenyme
b65b4e0032
Merge branch 'main' into imagine
2026-02-07 10:52:37 +08:00
Chenyme
e0ecde53ce
Merge pull request #135 from shellus/main
...
feat: 添加浏览器指纹配置支持,优化配置页面分组
2026-02-07 10:46:50 +08:00
GeJiaXiang
7f794f9185
feat: 添加浏览器指纹配置支持,优化配置页面分组
...
- 新增 grok.browser 和 grok.user_agent 配置项,支持自定义 curl_cffi 指纹和 User-Agent
- 将 CF Clearance、curl_cffi、User-Agent 三个字段在前端独立为"反爬虫验证"分组
- 添加分组说明:首次请求 IP 需与获取 CF Clearance 时一致
- 调整"禁用记忆"字段位置至"临时对话"下方
- 移除 docker-compose.yml 中无效的 GROK_DISABLE_MEMORY 环境变量
2026-02-07 09:52:39 +08:00
Chenyme
23a712eeb7
feat: add WebSocket support for image generation and editing, enhance configuration options for image processing
2026-02-07 02:16:11 +08:00