Commit Graph

145 Commits

Author SHA1 Message Date
CaIon
b364e9e3b1 refactor: simplify model prefix checks and update message role for o-series models 2025-04-17 16:50:52 +08:00
neotf
935cc1c605 fix: wrong systemStr for Claude (OpenAI Upstream) 2025-04-14 01:09:02 +08:00
CaIon
74d9bb1a12 feat: enhance Claude to OpenAI request conversion with additional relay info support 2025-04-11 19:13:38 +08:00
CaIon
9e4506ebaf feat: 完善openai转claude支持 2025-04-11 18:28:50 +08:00
CaIon
577b18a1a1 feat: enhance file handling and logging in the application 2025-04-11 16:23:54 +08:00
CaIon
7e0d4cd055 refactor: move maxFileSize variable inside GetFileBase64FromUrl function 2025-04-11 15:53:23 +08:00
1808837298@qq.com
5e06085744 refactor: Improve token quota consumption logic 2025-03-17 17:52:54 +08:00
1808837298@qq.com
62dc82638d feat: Introduce JSON decoding utility functions and update error handling in Claude and OpenAI response structures 2025-03-16 18:34:39 +08:00
1808837298@qq.com
b93827c425 feat: support dify upload image file 2025-03-15 19:10:12 +08:00
1808837298@qq.com
47c297794d feat: 初步兼容流模式下openai渠道类型转为claude格式访问 #862 2025-03-13 19:32:08 +08:00
1808837298@qq.com
78fc3a191c feat: claude relay 2025-03-12 21:31:46 +08:00
1808837298@qq.com
0db072de86 feat(error): Enhance error handling with optional detailed error messages 2025-03-11 17:25:06 +08:00
1808837298@qq.com
0876bc3f7f feat: Improve decimal precision for quota and payment calculations
- Added github.com/shopspring/decimal for precise floating-point calculations
- Refactored quota and payment calculations in multiple files to use decimal arithmetic
- Updated go.mod and go.sum to include decimal library
- Improved precision in topup, relay, and quota service calculations
- Added support for more OpenAI model variants in cache ratio settings
2025-03-08 21:55:50 +08:00
1808837298@qq.com
5bed29e2bd refactor: Improve quota calculation precision using floating-point arithmetic 2025-03-08 16:44:08 +08:00
1808837298@qq.com
b640118d74 feat: Implement cache token ratio for more precise token pricing 2025-03-08 01:30:50 +08:00
1808837298@qq.com
783c60ee4d feat: Enhance channel status update with success tracking and dynamic notification #812 2025-03-06 17:46:03 +08:00
1808837298@qq.com
063618e256 fix: Handle error in NotifyRootUser and log system errors #812 2025-03-06 17:25:39 +08:00
1808837298@qq.com
7cec111b1f fix: error NotifyRootUser #812 2025-03-06 15:56:42 +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
da79af07d2 refactor: Extract operation-related settings into a separate package 2025-03-04 18:52:08 +08:00
1808837298@qq.com
d499b6410c feat: Improve image download and validation in GetImageFromUrl 2025-03-03 16:15:04 +08:00
1808837298@qq.com
485face2c0 feat: Add self-use mode for model ratio and price configuration
- Introduce `SelfUseModeEnabled` setting to allow flexible model ratio configuration
- Update error handling to provide more informative messages when model ratios are not set
- Modify pricing and relay logic to support self-use mode
- Add UI toggle for enabling self-use mode in operation settings
- Implement fallback mechanism for model ratios when self-use mode is enabled
2025-03-01 21:13:48 +08:00
1808837298@qq.com
3447df85c4 feat: add new GPT-4.5 preview model ratios 2025-02-28 19:17:15 +08:00
1808837298@qq.com
0646fa1892 fix: gemini&claude tool call format #795 #766 2025-02-26 23:56:10 +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
fd44ac7c0c feat: Enhance token counting and content parsing for messages 2025-02-24 14:18:15 +08:00
1808837298@qq.com
e1784f8981 refactor: Optimize sensitive word detection and text processing 2025-02-21 17:05:35 +08:00
1808837298@qq.com
78f9a30c39 feat: Enhance sensitive word detection with detailed logging 2025-02-21 16:57:30 +08:00
1808837298@qq.com
009333da8b refactor: Improve quota error messages with formatted quota display 2025-02-21 16:42:48 +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
4ea2556b29 refactor: Replace manual goroutine creation with gopool.Go 2025-02-19 18:38:29 +08:00
1808837298@qq.com
8a34d61654 chore: update env name and README 2025-02-19 15:54:33 +08:00
1808837298@qq.com
097d02eb8b feat: Implement comprehensive webhook notification system 2025-02-19 15:40:54 +08:00
1808837298@qq.com
1ae0a38485 refactor: Optimize user caching and token retrieval methods 2025-02-19 15:12:26 +08:00
1808837298@qq.com
83e161a1d4 refactor: Simplify root user notification and remove global email variable
- Remove global `RootUserEmail` variable
- Modify channel testing and user notification methods to use `GetRootUser()`
- Update user cache and notification service to use more consistent user base type
- Add new channel test notification type
2025-02-18 15:59:17 +08:00
1808837298@qq.com
9a41c04416 feat: Implement notification rate limiting mechanism
- Add in-memory and Redis-based notification rate limiting
- Create configurable hourly notification limits
- Implement notification limit checking for user notifications
- Add environment variables for customizing notification limits
2025-02-18 15:30:43 +08:00
1808837298@qq.com
0fcd243f56 feat: Add user notification settings with quota warning and multiple notification methods
- Implement user notification settings with email and webhook options
- Add new user settings for quota warning threshold and notification preferences
- Create backend API and database support for user notification configuration
- Enhance frontend personal settings with notification configuration UI
- Support custom notification email and webhook URL
- Add service layer for sending user notifications
2025-02-18 14:54:21 +08:00
1808837298@qq.com
025b6d1226 feat: Add automatic channel disabling based on configurable keywords
- Introduce AutomaticDisableKeywords setting to dynamically control channel disabling
- Implement AC search for matching error messages against disable keywords
- Add frontend UI for configuring automatic disable keywords
- Update localization with new keyword-based channel disabling feature
- Refactor sensitive word and AC search logic to support multiple keyword lists
2025-02-13 16:39:17 +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
1808837298@qq.com
906516fb90 feat: add SOCKS5 proxy authentication support
- Enhance `NewProxyHttpClient` to handle SOCKS5 proxy authentication
- Extract username and password from proxy URL for SOCKS5 proxy configuration
- Provide optional authentication for SOCKS5 proxy connections
2025-02-04 18:10:25 +08:00
1808837298@qq.com
80f60109cf feat: add Azure default API version configuration
- Introduce `AZURE_DEFAULT_API_VERSION` environment variable
- Set default Azure API version to `2024-12-01-preview`
- Update README documentation for new environment configuration
- Modify Azure channel relay to use default API version when not specified
2025-02-03 22:38:23 +08:00
1808837298@qq.com
c2702a7125 feat: enhance model name handling and logging
- Add `RecodeModelName` to `RelayInfo` struct for more flexible model name tracking
- Update text relay and quota consumption to use `RecodeModelName`
- Move reasoning effort from admin info to other info in log generation
- Ensure consistent model name handling across relay components
2025-02-03 15:06:46 +08:00
1808837298@qq.com
e641fb346e feat: add reasoning effort logging and display
- Add `ReasoningEffort` field to `RelayInfo` struct
- Update log generation to include reasoning effort in admin info
- Modify logs table component to display reasoning effort when available
- Preserve reasoning effort information during request processing
2025-02-03 14:44:40 +08:00
1808837298@qq.com
5c8af189eb feat: support channel request proxy 2025-02-02 22:15:06 +08:00
1808837298@qq.com
1798595afc refactor: realtime quota 2025-01-04 15:46:35 +08:00
1808837298@qq.com
16afc5b3d6 fix: retry prompt tokens 2025-01-02 16:33:00 +08:00
CalciumIon
aefd53b683 refactor: token cache logic 2024-12-30 17:10:48 +08:00
CalciumIon
966cdc1f7f refactor: user cache logic 2024-12-29 16:50:26 +08:00
Yan
1cdb03d821 fix: Gemini 其他文件类型的支持(Base64URL) 2024-12-29 10:11:39 +08:00
CalciumIon
e326679b72 feat: add multi-file type support for Gemini and Claude
- Add file data DTO for structured file handling
- Implement file decoder service
- Update Claude and Gemini relay channels to handle various file types
- Reorganize worker service to cf_worker for clarity
- Update token counter and image service for new file types
2024-12-29 00:00:24 +08:00