funnycups
2f176cff7f
fix: prompt calculation
...
User will correctly get estimated prompt usage when upstream returns either zero or nothing.
2025-08-16 22:54:00 +08:00
Calcium-Ion
14ea270406
Merge pull request #1605 from nekohy/feats-the-flexable-params-override
...
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
Feats: use the types of gjson,the error expection,the invert and the key missing process of the condition
v0.9.0-alpha.5
2025-08-16 18:27:22 +08:00
CaIon
c06d9485c3
feat: add support for Midjourney relay mode based on path prefix
2025-08-16 18:26:26 +08:00
Nekohy
9e649148bb
feats:the error of gjson.True and gjson.False
2025-08-16 17:16:46 +08:00
Nekohy
7323dcf906
feats:custom the key missing condition
2025-08-16 16:37:09 +08:00
Nekohy
5683f4b95f
feats:use the types of gjson,the error expection,the invert of the condition
2025-08-16 16:31:17 +08:00
CaIon
3c30b7c4cb
fix: refactor processChannelError to use goroutine for asynchronous handling
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
v0.9.0-alpha.4
2025-08-16 15:15:19 +08:00
CaIon
22125a6dd8
fix: correct argument passing in DoDownloadRequest for MIME type retrieval
2025-08-16 15:03:42 +08:00
CaIon
3a90d5054c
feat: implement file type detection from URL with enhanced MIME type handling
2025-08-16 14:56:29 +08:00
CaIon
11ce48be47
feat: set API version for Azure and Vertex AI channel types
2025-08-16 14:56:19 +08:00
Calcium-Ion
1d878e5e88
Merge pull request #1603 from nekohy/feats-the-flexable-params-override
...
feats: the flexable params override and compatible format
2025-08-16 12:32:15 +08:00
CaIon
28d381982d
Merge remote-tracking branch 'origin/alpha' into alpha
2025-08-16 12:28:46 +08:00
Calcium-Ion
a5420c90c0
Merge pull request #1584 from feitianbubu/pr/use-proxy-fetch-models
...
feat: use proxy HTTP client fetch models
2025-08-16 12:27:36 +08:00
Calcium-Ion
5fbbb24201
Merge pull request #1597 from wzxjohn/feature/add_openai_models
...
feat(relay): add OpenAI gpt-4.1 o3 o4 gpt-image-1 models
2025-08-16 12:27:20 +08:00
Nekohy
02401b9a38
fix:moveValue bug
2025-08-16 11:58:40 +08:00
Nekohy
4b6031b59c
feats: the flexable params override and compatible format
2025-08-16 11:27:47 +08:00
CaIon
cf9faeb901
feat: implement concurrent top-up locking mechanism to prevent race conditions
2025-08-15 20:03:38 +08:00
CaIon
f8f0ee1e3e
feat: initialize channel metadata in mjproxy and relay processing
2025-08-15 19:14:29 +08:00
CaIon
f6ee0b9791
feat: add checks for non-empty URLs in file metadata processing
2025-08-15 19:10:40 +08:00
CaIon
0e95efdf34
feat: initialize channel metadata in relay processing
2025-08-15 19:00:16 +08:00
CaIon
beb61343cd
refactor: comment out SetContextKey to prevent token count meta setting
2025-08-15 18:43:08 +08:00
CaIon
77b100ba2b
refactor: update function signatures to include context and improve file handling #1599
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
v0.9.0-alpha.3
2025-08-15 18:40:54 +08:00
wzxjohn
28dd5f5f0c
feat(ratio): add ratio for OpenAI models
2025-08-15 17:12:39 +08:00
wzxjohn
269bb0c896
feat(relay): add OpenAI gpt-4.1 o3 o4 gpt-image-1 models
2025-08-15 17:10:16 +08:00
CaIon
215546a805
feat: 优化ac自动机
2025-08-15 16:54:26 +08:00
CaIon
63e7fb697f
Merge remote-tracking branch 'origin/alpha' into alpha
2025-08-15 16:47:36 +08:00
Calcium-Ion
30e4679384
Merge pull request #1577 from nekohy/feats-better-adaptor-for-openrouter
...
Fix reasoning adaptor for openrouter
2025-08-15 16:19:24 +08:00
CaIon
893104a173
refactor: move anthropicKey retrieval to improve authorization handling
2025-08-15 16:08:55 +08:00
CaIon
8284cff9b7
refactor: set prompt tokens when not provided in usage
2025-08-15 15:55:01 +08:00
CaIon
e1d36932ae
fix panic
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
v0.9.0-alpha.2
2025-08-15 15:15:21 +08:00
CaIon
5084a43aa9
refactor: ensure graceful closure of response body in relay responses
2025-08-15 15:10:54 +08:00
Calcium-Ion
c6c40e0a81
Merge pull request #1590 from yyhhyyyyyy/fix/openrouter-custom-ratio-billing
...
fix: prevent OpenRouter cache calculation with custom model ratios
2025-08-15 15:02:57 +08:00
yyhhyyyyyy
ccd1930838
Merge remote-tracking branch 'origin/alpha' into fix/openrouter-custom-ratio-billing
2025-08-15 14:58:42 +08:00
CaIon
d849412cf5
refactor: replace json.Marshal and json.Unmarshal with common.Marshal and common.Unmarshal
2025-08-15 14:52:17 +08:00
同語
712865f820
Merge pull request #1593 from fatcat-ww/main
...
手机客户端下拉菜单采用导航栏的样式
2025-08-15 14:30:18 +08:00
Calcium-Ion
d3a2bf79f5
Merge pull request #1594 from QuantumNous/refactor_relay
...
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
refactor: Introduce pre-consume quota and unify relay handlers
v0.9.0-alpha.1
2025-08-15 14:16:43 +08:00
CaIon
07903b0a8a
refactor: improve logging for channel operations with detailed context
2025-08-15 14:15:03 +08:00
CaIon
9da13fdabe
refactor: enhance logging messages for user quota handling in pre-consume logic
2025-08-15 14:08:15 +08:00
CaIon
4858e98b2d
refactor: simplify domain masking logic by removing URL check
2025-08-15 13:46:46 +08:00
CaIon
e0f256506f
Merge branch 'alpha' into refactor_relay
...
# Conflicts:
# dto/openai_image.go
2025-08-15 13:46:34 +08:00
CaIon
07137e6bb8
refactor: update token type handling and improve token counting logic
2025-08-15 13:28:03 +08:00
CaIon
8eb17f24bb
refactor: improve request type validation and enhance sensitive information masking
2025-08-15 13:20:36 +08:00
CaIon
dba74e5b05
refactor: add email masking function and enhance RelayInfo logging
...
This commit introduces a new function, MaskEmail, to mask user email addresses in logs, preventing PII leakage. Additionally, the RelayInfo logging has been updated to utilize this new masking function, ensuring sensitive information is properly handled. The channel test logic has also been improved to dynamically determine the relay format based on the request path.
2025-08-15 12:50:27 +08:00
CaIon
013b30c228
refactor: enhance error handling and masking for model not found scenarios
2025-08-15 12:41:05 +08:00
CaIon
f6f9e73fa3
refactor: improve channel base URL handling and enhance RelayInfo logging
2025-08-14 22:15:18 +08:00
CaIon
112de0b6a6
refactor: enhance quota handling and logging for pre-consume operations
2025-08-14 21:30:03 +08:00
CaIon
c9e9a24e99
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
fatcat-ww
39a9e828a1
Add files via upload
2025-08-14 20:38:50 +08:00
CaIon
97ea8b6560
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
yyhhyyyyyy
7d2a9469f0
fix: prevent OpenRouter cache calculation with custommodel ratios
2025-08-14 17:10:36 +08:00