CaIon
d37af13b33
feat: support qwen claude format
2025-08-07 18:32:31 +08:00
CaIon
c4666934be
Revert "feat: update Usage struct to support dynamic token handling with ceil function #1503 "
...
This reverts commit 97b8d7de9e .
2025-08-07 16:22:40 +08:00
CaIon
a4b02107dd
feat: update MaxTokens handling
2025-08-07 16:15:59 +08:00
CaIon
97b8d7de9e
feat: update Usage struct to support dynamic token handling with ceil function #1503
2025-08-07 15:40:12 +08:00
CaIon
2e41362f2e
fix: update budget calculation logic in relay-gemini to use clamping function
2025-08-06 16:25:48 +08:00
CaIon
6960a06322
feat: enhance ThinkingAdaptor with effort-based budget clamping and extra body handling
2025-08-06 16:20:38 +08:00
CaIon
4f6d16e365
feat: add reasoning support for Openrouter requests with "-thinking" suffix
2025-08-06 12:50:26 +08:00
CaIon
f3a961f071
fix: reorder request URL handling for relay formats in Adaptor
2025-08-05 20:40:00 +08:00
CaIon
755acc6191
feat: implement channel-specific locking for thread-safe polling
2025-08-04 20:44:19 +08:00
CaIon
5e47da1a8e
feat: improve layout and pagination handling in MultiKeyManageModal
2025-08-04 20:16:51 +08:00
CaIon
808c8c5bcb
feat: add status filtering and bulk enable/disable functionality in multi-key management
2025-08-04 19:51:58 +08:00
CaIon
8fe43be3eb
fix: correct option value for pagination in MultiKeyManageModal
2025-08-04 19:33:24 +08:00
CaIon
1ecd8b41d8
feat: enhance multi-key management with pagination and statistics
2025-08-04 17:15:32 +08:00
CaIon
aeec39a198
feat: add multi-key management
2025-08-04 16:52:31 +08:00
CaIon
1f9134cd6b
feat: add support for multi-key channels in RelayInfo and access token caching
2025-08-02 22:12:15 +08:00
CaIon
f4f73016bf
fix: improve error handling and readability in ability.go
2025-08-02 14:06:12 +08:00
CaIon
fad5fc3f7d
feat: truncate abilities table before processing channels
2025-08-02 13:39:53 +08:00
CaIon
8ceda7b95f
feat: add caching for keys in channel structure and retain polling index during sync
2025-08-02 13:16:30 +08:00
CaIon
316c0a594e
feat: retain polling index for multi-key channels during sync
2025-08-02 13:04:48 +08:00
CaIon
f0b024eb77
feat: enhance ConvertGeminiRequest to set default role and handle YouTube video MIME type
2025-08-02 12:53:58 +08:00
CaIon
7d4c9955f1
feat: add recordErrorLog option to NewAPIError for conditional error logging
2025-08-02 11:07:50 +08:00
CaIon
2d4149c5dc
feat: implement key mode for multi-key channels with append/replace options
2025-08-02 10:57:03 +08:00
CaIon
52f419bc3b
feat: add admin info to error logging with multi-key support
2025-08-01 18:19:28 +08:00
CaIon
0080123779
fix: ensure ChannelIsMultiKey context key is set to false for single key retries
2025-08-01 18:09:20 +08:00
CaIon
2578c39c7d
refactor: simplify streamResponseGeminiChat2OpenAI by removing hasImage return value and optimizing response text handling
2025-08-01 17:58:21 +08:00
CaIon
87c16db2d7
fix: update JSONEditor to default to manual mode for invalid JSON and add error message for invalid data
2025-08-01 17:21:25 +08:00
CaIon
de23f66785
fix: handle case where no response is received from Gemini API
2025-08-01 17:04:16 +08:00
CaIon
563d056ff7
refactor: update error handling to support dynamic error types
2025-07-31 21:16:01 +08:00
CaIon
6d2e92fb7b
feat: add JSONEditor component for enhanced JSON input handling
2025-07-31 12:54:07 +08:00
CaIon
590e6db670
fix: 修复被禁用的渠道无法测试的问题
2025-07-31 10:56:51 +08:00
CaIon
40848f28d4
fix: correct request mode assignment logic in adaptor
2025-07-30 23:32:20 +08:00
CaIon
91febc3097
fix: remove debug print statement
2025-07-30 23:29:45 +08:00
CaIon
a2fbf368c1
fix: 修复缓存开启下自动禁用失效
2025-07-30 23:26:09 +08:00
CaIon
28ededaf8e
fix: WriteContentType panic
2025-07-30 20:31:51 +08:00
CaIon
9afb9b594d
feat: 错误内容脱敏
2025-07-30 19:08:35 +08:00
CaIon
2d1cd5595c
Merge remote-tracking branch 'origin/alpha' into alpha
2025-07-30 18:39:32 +08:00
CaIon
2db71673a5
fix: auto ban
2025-07-30 18:39:19 +08:00
CaIon
efb7c6a15e
fix: auto ban
2025-07-29 23:08:16 +08:00
CaIon
a1caf37f5b
fix: auto ban
2025-07-29 15:20:08 +08:00
CaIon
10f025ea45
fix: increase maximum request count limits for user rate settings
2025-07-27 16:46:34 +08:00
CaIon
1c5ba67ed3
fix: ensure minimum quota display and handle zero values in render function
2025-07-27 16:32:14 +08:00
CaIon
360012bed2
feat: support claude convert to gemini
2025-07-26 13:31:33 +08:00
CaIon
2cb7b9ae62
fix: improve error messaging and JSON schema handling in distributor and relay components
2025-07-26 12:11:20 +08:00
CaIon
f610773455
feat: enhance request handling with pass-through options and system prompt support
2025-07-26 11:39:09 +08:00
CaIon
1adc83e4c9
Merge remote-tracking branch 'origin/alpha' into alpha
2025-07-26 10:43:42 +08:00
CaIon
3243f2296b
feat: add upstream error type and default handling for OpenAI and Claude errors
2025-07-25 18:48:59 +08:00
CaIon
50a2c2c5a8
feat: support multi-key mode
2025-07-23 22:00:30 +08:00
CaIon
6ddeab2f2f
fix(adaptor): enhance response handling and error logging for Claude format
2025-07-23 20:59:56 +08:00
CaIon
c73b5886b9
feat: support ollama claude format
2025-07-23 20:01:03 +08:00
CaIon
f2e10286c4
fix(adaptor): update relay mode handling #1419
2025-07-23 19:28:58 +08:00
CaIon
ec0eb57db0
fix(adaptor): implement request conversion methods for Claude and Image. ( close #1419 )
2025-07-23 19:09:20 +08:00
CaIon
127d1d692f
fix(distributor): add validation for model name in channel selection
2025-07-23 16:46:06 +08:00
CaIon
5418bb3b7c
fix: improve error messages for channel retrieval failures in distributor and relay
2025-07-23 16:32:52 +08:00
CaIon
096aad48db
Merge remote-tracking branch 'origin/alpha' into alpha
2025-07-22 12:06:28 +08:00
CaIon
c5ec332ab3
fix: add Think field to OllamaRequest and support extra parameters in GeneralOpenAIRequest. ( close #1125
...
)
2025-07-22 12:06:21 +08:00
CaIon
67eb7315ff
fix(topup): update TradeNo field to include varchar type and index for better database performance
2025-07-20 19:20:37 +08:00
CaIon
6c1e053529
fix: replace NewError with NewOpenAIError for improved error handling in multiple handlers
2025-07-19 11:29:31 +08:00
CaIon
b85106b571
fix: create NewOpenAIError function for improved error handling in Relay
2025-07-19 11:28:18 +08:00
CaIon
386c254682
fix: set ErrorType to OpenAIError in RelayErrorHandler for better error categorization
2025-07-19 11:15:34 +08:00
CaIon
c773584ecd
fix: 修复playground优先级失效
2025-07-17 22:26:38 +08:00
CaIon
a93a14a960
Merge remote-tracking branch 'origin/alpha' into alpha
2025-07-17 22:25:26 +08:00
CaIon
da8917a15f
refactor: initialize channel cache after channel operations to ensure data consistency
2025-07-17 20:04:26 +08:00
CaIon
9660b22c0d
feat: 添加手动输入和文件上传模式切换功能,支持密钥搜索和高亮显示
2025-07-17 19:53:33 +08:00
CaIon
c5b9d71376
fix: 修复vertex渠道编辑密钥功能失效
2025-07-17 19:29:28 +08:00
CaIon
740fe8c2e2
feat: comment out model validation in ConvertClaudeRequest method
2025-07-13 15:17:15 +08:00
CaIon
a2f7c87666
🔄 update: add bun.lock file copy to Dockerfile for dependency management
...
- Included the `bun.lock` file in the Dockerfile to ensure consistent dependency installation during the build process.
2025-07-13 14:05:45 +08:00
CaIon
706df56efc
🔄 update: downgrade several Babel and Astro dependencies in bun.lock
...
- Updated `@astrojs/compiler`, `@babel/code-frame`, `@babel/compat-data`, `@babel/core`, `@babel/generator`, `@babel/helper-compilation-targets`, `@babel/helper-define-polyfill-provider`, `@babel/helper-module-imports`, `@babel/helper-module-transforms`, `@babel/plugin-transform-runtime`, `@babel/runtime`, and other related packages to earlier versions to ensure compatibility and stability.
- Adjusted various dependencies within the `bun.lock` file to reflect these changes.
2025-07-13 14:00:12 +08:00
CaIon
4af505e618
✨ feat: add bun.lock file to manage dependencies and remove bun.lockb
...
- Introduced a new `bun.lock` file to track project dependencies and their versions.
- Deleted the outdated `bun.lockb` file to streamline dependency management.
2025-07-13 12:16:18 +08:00
CaIon
1e7a001497
🔄 update: regenerate bun.lockb file to reflect dependency changes
2025-07-13 12:08:13 +08:00
CaIon
5bf5d3d16a
✨ feat(adaptor): refactor response handlers to return usage first and improve error handling
2025-07-12 21:12:46 +08:00
CaIon
9881bfc3c9
✨ feat(logs): add multi-key support in LogsTable and enhance log info generation
2025-07-12 15:14:55 +08:00
CaIon
9fd92977c7
✨ feat(channel): improve channel cache handling and add error checks for disabled channels
2025-07-12 14:20:59 +08:00
CaIon
dc5e4be403
✨ feat(channel): implement thread-safe polling
2025-07-12 11:17:08 +08:00
CaIon
2f14d89fed
✨ feat(channel): implement multi-key mode handling and improve channel update logic
2025-07-11 21:12:17 +08:00
CaIon
8e11b67ece
✨ feat(channel): enhance channel status management
2025-07-10 17:49:53 +08:00
CaIon
b8966a8b1c
🔧 refactor(user_cache): remove unused JSON import
2025-07-10 15:12:57 +08:00
CaIon
1437ceaa56
Merge branch 'alpha' into refactor_error
...
# Conflicts:
# controller/channel.go
# middleware/distributor.go
# model/channel.go
# model/user.go
# model/user_cache.go
# relay/common/relay_info.go
2025-07-10 15:11:55 +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
60bfadb84d
🔧 refactor(channel): add validation for CHANNEL_TEST_FREQUENCY in automatic tests
2025-07-10 11:31:07 +08:00
CaIon
beb6ea96d2
✨ feat(ability): enhance FixAbility function
2025-07-08 18:33:32 +08:00
CaIon
46ebea917e
🔧 refactor(adaptor): update HTTP referer to new API domain
2025-07-07 12:36:04 +08:00
CaIon
d7e15a9677
✨ feat(tokens): add cherryConfig support for URL generation and base64 encoding
2025-07-06 20:56:09 +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
896f39068d
🔧 refactor(channel): replace common.ChannelTypeVertexAi with constant.ChannelTypeVertexAi
2025-07-06 10:35:29 +08:00
CaIon
7ddee5ea2f
Merge branch 'alpha' into mutil_key_channel
...
# Conflicts:
# controller/channel.go
# docker-compose.yml
# web/src/components/table/ChannelsTable.js
# web/src/pages/Channel/EditChannel.js
2025-07-06 10:33:48 +08:00
CaIon
b67a4fda9b
🔧 refactor(model): change user group retrieval to non-strict mode
2025-07-06 10:23:38 +08:00
CaIon
6c9369a2c9
🔧 refactor(model): update context key retrieval to use token group instead of user group
2025-07-05 16:40:49 +08:00
CaIon
c17439a14f
Merge remote-tracking branch 'origin/alpha' into alpha
2025-07-05 14:14:48 +08:00
CaIon
95775a5a52
✨ feat(endpoint types): add support for image generation models in endpoint type handling
2025-07-05 14:14:40 +08:00
CaIon
14cca53ec8
🔧 refactor(endpoint types): comment out unused endpoint types in constants
2025-07-04 15:53:46 +08:00
CaIon
12977d9a52
✨ feat: make TopN field in RerankRequest optional in JSON serialization
2025-07-03 15:45:32 +08:00
CaIon
13eb2ec1f1
✨ feat: add pull request template and enforce branching strategy in workflow
2025-07-03 13:33:50 +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