235 Commits

Author SHA1 Message Date
CaIon
7d4c9955f1 feat: add recordErrorLog option to NewAPIError for conditional error logging 2025-08-02 11:07:50 +08:00
CaIon
52f419bc3b feat: add admin info to error logging with multi-key support 2025-08-01 18:19:28 +08:00
Xyfacai
9055698b4f feat: 显式指定 error 跳过重试 2025-07-30 22:35:31 +08:00
CaIon
9afb9b594d feat: 错误内容脱敏 2025-07-30 19:08:35 +08:00
CaIon
c73b5886b9 feat: support ollama claude format 2025-07-23 20:01:03 +08:00
CaIon
5418bb3b7c fix: improve error messages for channel retrieval failures in distributor and relay 2025-07-23 16:32:52 +08:00
feitianbubu
b3c4d97286 chore: opt video channel and platform 2025-07-22 20:14:24 +08:00
CaIon
8e11b67ece feat(channel): enhance channel status management 2025-07-10 17:49:53 +08:00
CaIon
4a9ca4209a refactor: Introduce standardized API error
This commit refactors the application's error handling mechanism by introducing a new standardized error type, `types.NewAPIError`. It also renames common JSON utility functions for better clarity.

Previously, internal error handling was tightly coupled to the `dto.OpenAIError` format. This change decouples the internal logic from the external API representation.

Key changes:
- A new `types.NewAPIError` struct is introduced to serve as a canonical internal representation for all API errors.
- All relay adapters (OpenAI, Claude, Gemini, etc.) are updated to return `*types.NewAPIError`.
- Controllers now convert the internal `NewAPIError` to the client-facing `OpenAIError` format at the API boundary, ensuring backward compatibility.
- Channel auto-disable/enable logic is updated to use the new standardized error type.
- JSON utility functions are renamed to align with Go's standard library conventions (e.g., `UnmarshalJson` -> `Unmarshal`, `EncodeJson` -> `Marshal`).
2025-07-10 15:02:40 +08:00
CaIon
cf11a22c3a 🔧 refactor(auth, channel, context): improve context setup and validation for multi-key channels 2025-07-06 12:37:56 +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
d7ed0214ad feat: add video channel kling 2025-06-19 11:53:42 +08:00
creamlike1024
c6a9df67b1 feat: auto分组 2025-06-16 22:15:12 +08:00
creamlike1024
75d859dce2 gemini text generation 2025-05-26 13:34:41 +08:00
creamlike1024
8ea4c76f2b feat: support /v1/responses API 2025-05-02 13:59:46 +08:00
CaIon
f5c2fda22a feat: enable error logging configuration in docker-compose and application 2025-04-29 16:26:55 +08:00
creamlike1024
4f123cf9f4 Merge branch 'error-logs' of github.com:zenghongtu/new-api into zenghongtu-error-logs 2025-04-28 11:06:32 +08:00
xyfacai
873ebcf0c7 feat: support /images/edit
(cherry picked from commit 1c0a1238787d490f02dd9269b616580a16604180)
2025-04-26 15:44:56 +08:00
jasonzeng
75f0cb8eb0 feat: add error logging functionality to relay and update logs table for error type display 2025-04-12 00:43:34 +08:00
1808837298@qq.com
78fc3a191c feat: claude relay 2025-03-12 21:31:46 +08:00
1808837298@qq.com
d647214555 refactor: Centralize stream handling and helper functions in relay package 2025-03-05 19:47:41 +08:00
1808837298@qq.com
7becf62a7a fix: Improve 429 error logging with detailed message 2025-02-23 21:26:31 +08:00
1808837298@qq.com
1e0b414fc0 refactor: Simplify model mapping and pricing logic across relay modules 2025-02-20 16:41:46 +08:00
1808837298@qq.com
61ad1adbda feat: Improve embedding request handling and support across channels
- Update EmbeddingRequest DTO to support more flexible input types
- Add input parsing method to handle various input formats
- Implement ConvertEmbeddingRequest for multiple channel adaptors
- Remove relayMode parameter from EmbeddingHelper
- Add input validation for embedding requests
- Simplify embedding request conversion for different channels
2025-02-12 14:39:36 +08:00
Jerry
fcc32ffbc9 Fix M3E not working 2025-01-23 05:54:39 +08:00
CalciumIon
46fcb691d5 refactor: Playground controller 2024-12-28 16:47:56 +08:00
CalciumIon
0d1ba65592 refactor: migrate group ratio and user usable groups logic to new setting package
- Replaced references to common.GroupRatio and common.UserUsableGroups with corresponding functions from the new setting package across multiple controllers and services.
- Introduced new setting functions for managing group ratios and user usable groups, enhancing code organization and maintainability.
- Updated related functions to ensure consistent behavior with the new setting package integration.
2024-12-25 19:31:12 +08:00
Xyfacai
67bdfea903 fix(realtime): 修复ws 握手失败、计费问题
(cherry picked from commit 618dffc43fd5a5f4065944db87761f9ee18e44d3)
2024-11-05 19:28:46 +08:00
1808837298@qq.com
9e4133a890 feat: realtime
(cherry picked from commit a5529df3e1a4c08a120e8c05203a7d885b0fe8d8)
2024-11-05 19:24:14 +08:00
1808837298@qq.com
698b6ed7d7 Update dto
(cherry picked from commit 030187ff75c64c40017cda2fa98ef2b3c01f0bd5)
2024-11-05 19:23:56 +08:00
1808837298@qq.com
917aa6c0dc fix: playground group 2024-10-10 13:39:09 +08:00
1808837298@qq.com
f731c755e6 feat: playground token name 2024-10-10 13:34:29 +08:00
1808837298@qq.com
9962d036f1 fix: playground max_tokens #512 #511 2024-09-27 20:18:53 +08:00
1808837298@qq.com
411bbac036 feat: Playground相关接口禁用AccessToken 2024-09-26 01:49:35 +08:00
1808837298@qq.com
07fa9205cb feat: playground 2024-09-26 00:59:09 +08:00
CalciumIon
045e2cfdbf fix: channel auto ban 2024-08-24 17:27:14 +08:00
CalciumIon
37e4dcacdc fix: 重试后request id不一致 2024-08-03 17:46:13 +08:00
CalciumIon
a1284e4a58 chore: 优化自动禁用代码 2024-08-03 17:32:28 +08:00
CalciumIon
4d7a39fab6 chore: 优化relay代码 2024-08-03 17:12:16 +08:00
CalciumIon
da5e1c18cb chore: 优化relay代码 2024-08-03 17:07:14 +08:00
CalciumIon
658eba659b chore: 优化relay代码 2024-08-03 16:55:29 +08:00
CalciumIon
b9099b8555 fix: error channel name on notify. #338 2024-07-31 18:20:13 +08:00
CalciumIon
ff3c1a0d34 feat: print user id when error 2024-07-27 17:55:36 +08:00
CalciumIon
3f2df317e4 feat: print user id when error 2024-07-27 17:47:30 +08:00
CalciumIon
d7b34f0816 refactor: image relay 2024-07-17 23:50:37 +08:00
CalciumIon
c7ba4a245b feat: support cohere rerank 2024-07-06 17:09:22 +08:00
CalciumIon
35b2a49eb8 fix: channel auto ban 2024-07-04 22:46:43 +08:00
Calcium-Ion
7378c3827b Merge pull request #310 from Calcium-Ion/feat/suno-api
Feat/suno api
2024-06-21 14:59:59 +08:00
1808837298@qq.com
400be9a2af fix: auto ban 2024-06-18 11:03:24 +08:00
Xiangyuan Liu
05a4646b44 feat: suno api 支持
feat: 调试 suno

feat: 补充suno 文档
2024-06-13 10:35:48 +08:00