Commit Graph

30 Commits

Author SHA1 Message Date
CaIon
0e095d4ad8 feat(api): add 'cookie' to passthroughSkipHeaderNamesLower 2026-02-05 22:16:35 +08:00
Seefs
5ff96de421 feat: add header passthrough 2026-02-05 01:43:49 +08:00
lanfunoe
5e3dbf2177 fix: make channel Host override take effect 2026-02-02 14:59:36 +08:00
Seefs
d6d3d05777 Merge pull request #2735 from seefs001/feature/header-throughpass
feat: header passthrough
2026-01-26 19:56:51 +08:00
Li-Xingyu
0dfa607147 feat: enhance Authorization header handling with Header Override support 2026-01-25 04:28:11 +08:00
Seefs
b827d1f778 Revert "Gemini Image系列支持图像编辑" 2025-11-30 18:45:54 +08:00
feitianbubu
fb55d56089 feat: gemini image support edit 2025-11-27 16:04:04 +08:00
Seefs
5010f2d004 format: package name -> github.com/QuantumNous/new-api (#2017) 2025-10-11 15:30:09 +08:00
CaIon
48d649056c feat(api): add header override processing with variable support 2025-10-02 19:29:57 +08:00
CaIon
6682842cbb feat: enhance OpenRouter enterprise support with new settings and response handling 2025-09-28 15:23:27 +08:00
Xyfacai
271830fc52 fix: err 如果是 newApiErr 则保留 2025-09-10 15:31:35 +08:00
iszcz
d904f9b486 task_relay_info 2025-08-25 18:01:10 +08:00
Nekohy
2d1512096a feats:add custom headers override 2025-08-24 01:02:23 +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
RedwindA
4d9b5bcf48 增加 DisablePing 字段以控制是否发送自定义 Ping 2025-07-18 23:38:35 +08:00
feitianbubu
43980b3ad1 feat: add jimeng image 2025-07-13 13:36:33 +08:00
Xiangyuan-liu
db98c0f4b1 refactor: log params and channel params
refactor: log params and channel params
2025-07-07 14:26:37 +08:00
CaIon
92de4d0d04 🔧 fix(api_request): enhance ping keep-alive mechanism with error handling and timeout controls 2025-06-10 03:42:23 +08:00
creamlike1024
2da94e62d5 fix: 流式请求ping 2025-05-31 22:13:17 +08:00
creamlike1024
ac9df0c147 fix: pingerCtx 泄漏 2025-05-28 21:34:45 +08:00
CaIon
c2f3749cfe feat: enhance OpenAI handler to support forced response formatting and add debug logging for request URLs 2025-05-09 18:57:06 +08:00
creamlike1024
a074e994b0 feat: send SSE ping before get response 2025-05-09 13:57:00 +08:00
1808837298@qq.com
47c297794d feat: 初步兼容流模式下openai渠道类型转为claude格式访问 #862 2025-03-13 19:32:08 +08:00
1808837298@qq.com
d04d78a116 refactor: Enhance user context and quota management
- Add new context keys for user-related information
- Modify user cache and authentication middleware to populate context
- Refactor quota and notification services to use context-based user data
- Remove redundant database queries by leveraging context information
- Update various components to use new context-based user retrieval methods
2025-02-25 20:56:16 +08:00
1808837298@qq.com
5c8af189eb feat: support channel request proxy 2025-02-02 22:15:06 +08:00
1808837298@qq.com
9e4133a890 feat: realtime
(cherry picked from commit a5529df3e1a4c08a120e8c05203a7d885b0fe8d8)
2024-11-05 19:24:14 +08:00
CalciumIon
ee0e1c9736 refactor: audio relay 2024-07-16 22:07:10 +08:00
Xiangyuan Liu
05a4646b44 feat: suno api 支持
feat: 调试 suno

feat: 补充suno 文档
2024-06-13 10:35:48 +08:00
1808837298@qq.com
436afe925e feat: 初步重构完成 2024-02-29 16:21:25 +08:00
1808837298@qq.com
1735981217 feat: 初步重构 2024-02-29 01:08:18 +08:00