Seefs
247e029159
feat: bark notification #1699
2025-09-01 15:57:23 +08:00
creamlike1024
153994fe45
Merge branch 'alpha' of github.com:x-Ai/new-api into x-Ai-alpha
2025-08-31 14:03:17 +08:00
t0ng7u
cdef6da9e9
🎨 style(go): format entire codebase
...
- Apply canonical Go formatting to all .go files
- No functional changes; whitespace/import/struct layout only
- Improves consistency, reduces diff noise, and aligns with standard tooling
2025-08-31 13:08:34 +08:00
F。
8809c44443
顶栏和侧边栏管理
...
增加用户体验
2025-08-31 07:07:40 +08:00
CaIon
b3a99a2625
Revert "refactor: replace DeepCopy with Copy for request handling consistency"
...
This reverts commit 872f7a9648 .
2025-08-28 15:11:55 +08:00
CaIon
872f7a9648
refactor: replace DeepCopy with Copy for request handling consistency
2025-08-28 14:57:47 +08:00
CaIon
e087c9fe9e
fix: update web search handling and request structure in adaptor and openai_request
2025-08-26 18:15:18 +08:00
CaIon
33d601db82
fix: update error types for upstream errors and JSON marshal failure
2025-08-26 16:26:56 +08:00
CaIon
e23f01f8d5
fix: Invalid type for 'input[x].summary': expected an array of objects, but got null instead
2025-08-26 13:17:31 +08:00
CaIon
d374a22b70
feat: support qwen-image-edit
2025-08-25 14:33:12 +08:00
CaIon
595ed6b40e
Merge remote-tracking branch 'origin/feat/dalle-extra' into alpha
...
# Conflicts:
# dto/dalle.go
2025-08-25 14:20:54 +08:00
CaIon
7fbf9c4851
feat: enhance image request handling and add async support
2025-08-24 21:52:56 +08:00
CaIon
4f23e53002
feat: 修复重试后请求结构混乱,修复rerank端点无法使用
2025-08-23 13:12:15 +08:00
CaIon
85f81df2f8
fix: remove redundant reasoning assignment in ChatCompletionsStreamResponseChoiceDelta
2025-08-17 18:43:31 +08:00
CaIon
c63b6b3ef8
feat: add checks for non-empty URLs in file metadata processing
2025-08-15 19:10:40 +08:00
CaIon
0bb43aa464
refactor: update function signatures to include context and improve file handling #1599
2025-08-15 18:40:54 +08:00
CaIon
edeb4791c9
Merge branch 'alpha' into refactor_relay
...
# Conflicts:
# dto/openai_image.go
2025-08-15 13:46:34 +08:00
CaIon
2f25e44e60
refactor: update token type handling and improve token counting logic
2025-08-15 13:28:03 +08:00
CaIon
6748b006b7
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
e2037ad756
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
CaIon
f5abbeb353
fix(dalle): update ImageRequest struct to use json.RawMessage for flexible field types
2025-08-12 21:12:00 +08:00
nekohy
14a9a99e2d
fix: zhipu_v4 thinking
2025-08-11 21:37:10 +08:00
CaIon
d3170310ff
✨ feat: Refactor Gemini tools handling to support JSON raw message format
2025-08-11 19:48:04 +08:00
Seefs
78662e8194
Merge pull request #1547 from seefs001/feature/model_list
...
✨ feat: Enhance model listing and retrieval with support for Anthropic and Gemini models; refactor routes for better API key handling
2025-08-10 22:57:20 +08:00
CaIon
7f462a084c
✨ feat: Add ChannelOtherSettings to manage additional channel configurations
2025-08-10 20:21:30 +08:00
nekohy
fdb6a3ce16
✨ feat: Enhance model listing and retrieval with support for Anthropic and Gemini models; refactor routes for better API key handling
2025-08-10 11:44:38 +08:00
Calcium-Ion
02fd80b703
Merge pull request #1537 from RedwindA/feat/support-native-gemini-embedding
...
feat: 支持原生Gemini Embedding格式
2025-08-10 10:26:46 +08:00
CaIon
72ffe61ad1
feat: add verbosity field to OpenAI request #1540
2025-08-09 20:12:27 +08:00
RedwindA
f242220132
feat: update dto for embeddings
2025-08-09 18:31:56 +08:00
RedwindA
03b670971b
Merge branch 'alpha' into 'feat/support-native-gemini-embedding'
2025-08-09 18:05:11 +08:00
CaIon
2a804b6c02
feat: add system prompt override functionality in channel settings and request handling #1468
2025-08-09 12:53:06 +08:00
Calcium-Ion
3b61617cb1
Merge pull request #1500 from antecanis8/gemini_batchembedcontents
...
fix: Gemini embedding model only embeds the first text in a batch
2025-08-09 11:42:08 +08:00
RedwindA
b70d2655ed
feat: support native Gemini Embedding
2025-08-09 00:27:33 +08:00
CaIon
daa7a13505
feat: 完善格式抓换,修复gemini渠道和openai渠道在claude code中使用的问题
2025-08-08 16:45:37 +08:00
CaIon
18c630e5e4
feat: support deepseek claude format (convert)
2025-08-07 19:01:49 +08:00
CaIon
865bb7aad8
Revert "feat: update Usage struct to support dynamic token handling with ceil function #1503 "
...
This reverts commit 71c39c9893 .
2025-08-07 16:22:40 +08:00
CaIon
d9c1fb5244
feat: update MaxTokens handling
2025-08-07 16:15:59 +08:00
CaIon
71c39c9893
feat: update Usage struct to support dynamic token handling with ceil function #1503
2025-08-07 15:40:12 +08:00
antecanis8
43263a3bc8
fix : Gemini embedding model only embeds the first text in a batch
2025-08-04 13:02:57 +00:00
creamlike1024
d2183af23f
feat: convert gemini format to openai chat completions
2025-08-01 22:23:35 +08:00
CaIon
ce031f7d15
refactor: update error handling to support dynamic error types
2025-07-31 21:16:01 +08:00
CaIon
2469c439b1
fix: improve error messaging and JSON schema handling in distributor and relay components
2025-07-26 12:11:20 +08:00
CaIon
1297addfb1
feat: enhance request handling with pass-through options and system prompt support
2025-07-26 11:39:09 +08:00
CaIon
2402715492
fix: add Think field to OllamaRequest and support extra parameters in GeneralOpenAIRequest. ( close #1125
...
)
2025-07-22 12:06:21 +08:00
feitianbubu
5b869376ab
fix: ali embedding support base64
2025-07-20 12:05:20 +08:00
Xyfacai
c674c3561a
fix(response): tools 需要处理的参数很少 使用 map
2025-07-20 11:21:57 +08:00
Calcium-Ion
0b877ca8a3
Merge pull request #1383 from feitianbubu/pr/fix-gemini-and-claude-completions
...
fix: usage cost(any) to support claude and gemini
2025-07-17 19:16:55 +08:00
Calcium-Ion
6b3f1ab0e4
Merge pull request #1384 from QuantumNous/RequestOpenAI2ClaudeMessage
...
feat: 改进 RequestOpenAI2ClaudeMessage 和添加 claude web search 计费
2025-07-17 19:15:54 +08:00
feitianbubu
d892bfc278
fix: usage cost(any) to support claude and gemini
2025-07-16 16:58:34 +08:00
creamlike1024
961bc874d2
feat: claude web search tool 计费
2025-07-15 18:57:22 +08:00