Commit Graph

23 Commits

Author SHA1 Message Date
旃蒙
5d0e66b39e fix(task): 修复渠道配置多个key时无法获取任务的问题 2025-12-15 18:15:35 +08:00
Seefs
920e005048 fix: Use channel proxy settings for task query scenarios 2025-12-09 11:15:27 +08:00
feitianbubu
c297f42c1a feat: get hailuo video url 2025-11-14 11:55:43 +08:00
CaIon
8511ea0fff fix: prevent refund on video task update error 2025-10-16 12:46:07 +08:00
CaIon
b70b4597ce fix: prevent duplicate refunds on task failure #2050 2025-10-16 12:38:21 +08:00
CaIon
5069482d22 refactor: update ConvertToOpenAIVideo method to return byte array and improve error handling 2025-10-14 23:03:17 +08:00
Xyfacai
c6175c0b46 fix: 修复视频任务不同分组可能导致补回额度计算错误 (#2030) 2025-10-13 15:17:06 +08:00
feitianbubu
b3e6145cb7 feat: Add pre-status protection for IncreaseUserQuota 2025-10-12 14:53:55 +08:00
Seefs
5010f2d004 format: package name -> github.com/QuantumNous/new-api (#2017) 2025-10-11 15:30:09 +08:00
feitianbubu
4e0a43a909 feat: support openAI sdk retrieve videos 2025-10-10 18:59:52 +08:00
feitianbubu
b1db126490 feat: add sora video retrieve task 2025-10-09 15:00:02 +08:00
feitianbubu
1263c95548 feat: add doubao video add log detail 2025-10-02 04:00:50 +08:00
feitianbubu
3c796a1166 feat: add doubao video use quota by total token 2025-10-02 04:00:46 +08:00
Sh1n3zZ
cf8b021b61 feat: vertex veo (#1450) 2025-08-27 18:06:47 +08:00
CaIon
c9e9a24e99 refactor: centralize logging and update resource initialization
This commit refactors the logging mechanism across the application by replacing direct logger calls with a centralized logging approach using the `common` package. Key changes include:

- Replaced instances of `logger.SysLog` and `logger.FatalLog` with `common.SysLog` and `common.FatalLog` for consistent logging practices.
- Updated resource initialization error handling to utilize the new logging structure, enhancing maintainability and readability.
- Minor adjustments to improve code clarity and organization throughout various modules.

This change aims to streamline logging and improve the overall architecture of the codebase.
2025-08-14 21:10:04 +08:00
CaIon
97ea8b6560 refactor: Introduce pre-consume quota and unify relay handlers
This commit introduces a major architectural refactoring to improve quota management, centralize logging, and streamline the relay handling logic.

Key changes:
- **Pre-consume Quota:** Implements a new mechanism to check and reserve user quota *before* making the request to the upstream provider. This ensures more accurate quota deduction and prevents users from exceeding their limits due to concurrent requests.

- **Unified Relay Handlers:** Refactors the relay logic to use generic handlers (e.g., `ChatHandler`, `ImageHandler`) instead of provider-specific implementations. This significantly reduces code duplication and simplifies adding new channels.

- **Centralized Logger:** A new dedicated `logger` package is introduced, and all system logging calls are migrated to use it, moving this responsibility out of the `common` package.

- **Code Reorganization:** DTOs are generalized (e.g., `dalle.go` -> `openai_image.go`) and utility code is moved to more appropriate packages (e.g., `common/http.go` -> `service/http.go`) for better code structure.
2025-08-14 20:05:06 +08:00
feitianbubu
4378e0f96d feat: add vidu video channel 2025-07-24 10:14:25 +08:00
feitianbubu
73d9021e95 feat: channel kling support New API 2025-07-21 21:38:53 +08:00
CaIon
f14f4eaf1a feat: refactor environment variable initialization and introduce new constant types for API and context keys 2025-07-03 13:10:25 +08:00
skynono
221d2b5552 feat: add video channel jimeng 2025-06-27 17:08:20 +08:00
skynono
34693e338f feat: add origin kling api 2025-06-23 22:36:23 +08:00
skynono
aaf7c88e0b feat: add video channel kling fix 2025-06-19 11:53:47 +08:00
skynono
d7ed0214ad feat: add video channel kling 2025-06-19 11:53:42 +08:00