Commit Graph
24 Commits
Author SHA1 Message Date
Chenyme bd23a4a140 fix: Update Vercel configuration to remove local storage settings and improve SSL context handling in SQL connection 2026-04-13 10:55:36 +08:00
Chenyme 98f4d6fe26 feat: Enhance SQL account repository with serverless support and initialization logic 2026-04-13 10:00:59 +08:00
Chenyme d0a37a1ab2 feat: Enhance proxy management with improved failure handling and clearance refresh logic 2026-04-12 17:09:08 +08:00
Chenyme 1ac16336c6 feat: Enhance proxy clearance management with scheduler and warm-up functionality 2026-04-12 15:59:30 +08:00
Chenyme 8bfb73ae2f Merge pull request #454 from Huan-zhaojun/pr/feat/add-prefer-best-models
feat: 新增 auto/fast/expert/heavy 简洁模型,优先使用高等级号池
2026-04-12 15:39:53 +08:00
Chenyme 9ae21ef97b Merge pull request #453 from piexian/fix/account-ban-and-logging
fix: 修正账号封禁分类与状态转换,支持webui配置日志等级/轮转配置等
2026-04-12 14:45:01 +08:00
Chenyme c6bed73848 feat: add SQL connection pool configuration options and improve engine caching 2026-04-12 14:28:51 +08:00
氕氙 adaaed2900 Merge branch 'chenyme:main' into fix/account-ban-and-logging 2026-04-11 22:12:59 +08:00
piexian c54b40871a fix: refine account ban handling and logging reload 2026-04-11 21:02:51 +08:00
piexian 7fdb2ff426 fix: FORBIDDEN 热路径绕过打击计数、config 过期读取等 5 处缺陷
- FORBIDDEN 热路径不再直接 DISABLED,交由控制面打击计数决定
- config.update() 后调用 config.load() 刷新内存,避免读取过期值
- 删除 record_failure_async 中冗余的 record 二次查询
- exc.body → exc.details.get('body') 正确获取 UpstreamError 响应体
- apply_server_error 加入 feedback __all__ 导出列表
2026-04-11 20:36:03 +08:00
piexian e372d444a6 fix: 优化账号封禁与反馈链路
- classifier: 403 无凭证标记时回退为 FORBIDDEN 而非 AUTH_FAILURE
- refresh: record_failure_async 403 改走状态机打击计数, 不再直接 DISABLED
- state_machine: COOLING 恢复 ACTIVE 时清除 forbidden_strikes 残留
- feedback: 新增 SERVER_ERROR 健康度退化因子 (×0.75)
- executor: TRANSPORT_ERR/UNKNOWN 映射到 SERVER_ERROR, 不再静默忽略
- xai_usage: 扩展无效凭证检测模式 (session not found/account suspended/token revoked/expired)
- invalid_credentials: 优先检查 body 标记, 再按状态码分类
2026-04-11 20:18:02 +08:00
Zhi Yang c709b16c4c fix: share SQL engine during startup 2026-04-11 12:00:50 +00:00
Chenyme eb090bda56 feat: implement SSL options handling for PostgreSQL and MySQL in SQL backend 2026-04-11 19:11:05 +08:00
Huan-zhaojun 7841fac8d1 feat: add 4 prefer-best chat models with reverse pool selection
Add `prefer_best` flag to ModelSpec that reverses pool candidate
  order (heavy → super → basic), so requests are served by the
  highest-tier available account first and only fall back when all
  accounts in higher pools are exhausted.

  New models: grok-4.20-{fast,auto,expert,heavy}
  - No version suffix — intended as "latest" aliases
  - Original 15 models unchanged (prefer_best defaults to False)
2026-04-11 15:23:57 +08:00
Zhi Yang b443590a46 fix: restore SQL SSL URL normalization 2026-04-10 12:39:08 +00:00
Chenyme 95129e623a chore: update Dockerfile healthcheck command and bump version to 2.0.4.rc0 in pyproject.toml and uv.lock; improve error handling in xai_usage.py 2026-04-10 18:15:27 +08:00
Chenyme ee96e53a5d chore: update configuration paths to use DATA_DIR and LOG_DIR in documentation and code 2026-04-10 16:42:02 +08:00
Chenyme 971b69d12a chore: update MySQL dependency and configuration references 2026-04-10 15:40:42 +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 406bfe9e5d refactor: improve type hinting in ClearanceMode parse method 2026-04-10 12:57:36 +08:00
Chenyme 189205a6a7 chore: enhance clearance mode handling 2026-04-10 12:34:16 +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 79e593b97f refactor: simplify main.py structure and update entry point to app.main 2026-04-03 16:13:33 +08:00