CaIon
74f93d41f3
feat: update Gemini API response handling to include block reason and improve error reporting
2025-10-05 19:33:47 +08:00
CaIon
6b75bc0016
refactor(openai_image): replace json.Marshal with common.Marshal for improved serialization #1961
2025-10-03 12:44:33 +08:00
CaIon
d5e01a3eab
✨ feat(gemini): add imageConfig field to GeminiChatRequest for flexible image configuration
2025-10-03 12:26:17 +08:00
Seefs
dae661bb53
Merge pull request #1948 from RedwindA/feat/gotify
...
feat: Add Gotify Notification Channel for Quota Alerts
2025-10-02 14:11:20 +08:00
Seefs
0e9ad4a15f
fix: missing field & field control
2025-10-02 00:14:35 +08:00
RedwindA
85ff8b1422
feat: add Gotify notification option for quota alerts
2025-10-01 19:15:00 +08:00
Seefs
30cb3b8bc2
feat: claude context editing
2025-09-30 09:22:40 +08:00
Seefs
9a1ef8b957
Merge branch 'main-upstream' into fix/volcengine_default_baseurl
...
# Conflicts:
# main.go
2025-09-29 12:08:52 +08:00
CaIon
6e6a96d19f
feat: enhance OpenRouter enterprise support with new settings and response handling
2025-09-28 15:23:27 +08:00
Seefs
9e8b9995a6
feat: gemini urlContext
2025-09-27 16:16:34 +08:00
Seefs
f4d95bf1c4
fix: jsonRaw
2025-09-27 00:33:05 +08:00
Seefs
391d4514c0
fix: jsonRaw
2025-09-27 00:24:29 +08:00
Seefs
c89c8a7396
fix: add missing fields to Gemini request
2025-09-27 00:15:28 +08:00
CaIon
ec98a21933
feat: change ParallelToolCalls and Store fields to json.RawMessage type
2025-09-20 13:28:33 +08:00
CaIon
1dd59f5d08
feat: add PromptCacheKey field to openai_request struct
2025-09-20 13:27:32 +08:00
creamlike1024
11cf70e60d
fix: openai responses api 未统计图像生成调用计费
2025-09-16 12:47:59 +08:00
CaIon
6451158680
Revert "feat: gemini-2.5-flash-image-preview 文本和图片输出计费"
...
This reverts commit e732c58426 .
2025-09-13 12:53:28 +08:00
CaIon
d8410d2f11
feat(payment): add payment settings configuration and update payment methods handling
2025-09-12 19:29:34 +08:00
creamlike1024
db6a788e0d
fix: 优化 ImageRequest 的 JSON 序列化,避免覆盖合并 ExtraFields
2025-09-11 12:28:57 +08:00
Xyfacai
3f9698bb47
feat: dalle 自定义字段透传
2025-09-10 15:29:07 +08:00
Seefs
b7527eb80e
Merge pull request #1677 from QuantumNous/gemini-2.5-flash-image-preview-billing
...
feat: gemini-2.5-flash-image-preview 文本和图片输出计费
2025-09-07 14:15:24 +08:00
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
creamlike1024
e732c58426
feat: gemini-2.5-flash-image-preview 文本和图片输出计费
2025-08-27 21:30:52 +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