CaIon
1fededceb3
feat: refactor token estimation logic
...
- Introduced new OpenAI text models in `common/model.go`.
- Added `IsOpenAITextModel` function to check for OpenAI text models.
- Refactored token estimation methods across various channels to use estimated prompt tokens instead of direct prompt token counts.
- Updated related functions and structures to accommodate the new token estimation approach, enhancing overall token management.
2025-12-02 21:34:39 +08:00
Seefs
0ba6004ffc
Merge pull request #2334 from seefs001/feature/glm-coding
...
feat: glm coding plan && kimi coding plan
2025-11-30 16:21:12 +08:00
Seefs
594075bfdc
fix: nano banana pro 4k(StreamScannerMaxBufferMB env)
2025-11-30 16:08:25 +08:00
CaIon
5a037f2acd
feat: Add CountToken configuration and update token counting logic
2025-11-22 17:15:34 +08:00
CaIon
c8bbf7bed8
feat: Add ContextKeyLocalCountTokens and update ResponseText2Usage to use context in multiple channels
2025-11-21 18:17:01 +08:00
Sh1n3zZ
af671d34c3
feat: replicate channel flux model
2025-11-08 01:24:45 +08:00
feitianbubu
a2d34b9e47
feat: add minimax api adaptor
2025-10-20 16:26:50 +08:00
CaIon
8ff87ae6c2
feat: add temporary TASK_PRICE_PATCH configuration to environment variables
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
2025-10-16 21:59:21 +08:00
CaIon
5e1d7ab3b9
feat: add support for Sora channel type and OpenAI video endpoint
2025-10-13 19:21:45 +08:00
feitianbubu
1d1759aaae
feat: add sora video submit task
2025-10-09 15:00:02 +08:00
Calcium-Ion
2958114205
Merge pull request #1957 from seefs001/pr/custom-currency-1923
...
💱 feat(settings): introduce site-wide quota display type
2025-10-03 21:17:16 +08:00
feitianbubu
0e6ccea09b
refactor: simplify unsupported test channel types
2025-10-03 12:41:39 +08:00
Seefs
b65e271971
Merge branch 'main-upstream' into pr/custom-currency-1923
...
# Conflicts:
# web/src/components/settings/personal/cards/AccountManagement.jsx
# web/src/components/table/channels/modals/EditChannelModal.jsx
# web/src/hooks/channels/useChannelsData.jsx
# web/src/hooks/common/useSidebar.js
# web/src/i18n/locales/fr.json
# web/src/pages/Setting/Operation/SettingsGeneral.jsx
2025-10-02 20:30:48 +08:00
feitianbubu
c25ca9a791
feat: add doubao video generate
2025-10-02 04:00:43 +08:00
CaIon
63bbd9e3c3
feat: add endpoint type selection to channel testing functionality
2025-09-30 16:52:14 +08:00
dd
509b23982d
Update constant/api_type.go
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-29 19:37:04 +08:00
dd
40a6d957b5
Merge branch 'QuantumNous:main' into main
2025-09-29 14:13:50 +08:00
feitianbubu
b183f2f663
feat: vidu video add starEnd and reference gen video
2025-09-19 18:54:45 +08:00
DD
116d070bbf
merge
2025-09-10 18:37:55 +08:00
DD
2fb5fc231d
Merge branches 'main' and 'main' of github.com:danding5/new-api
...
# Conflicts:
# common/api_type.go
# constant/api_type.go
# constant/channel.go
# relay/relay_adaptor.go
# web/src/constants/channel.constants.js
2025-09-10 18:33:42 +08:00
DD
cfbc2df3f8
add submodel.ai
2025-09-08 16:21:21 +08:00
Nekohy
2d1512096a
feats:add custom headers override
2025-08-24 01:02:23 +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
2025-08-15 18:40:54 +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
CaIon
8907e5cf6d
✨ feat: Add ChannelOtherSettings to manage additional channel configurations
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled
2025-08-10 20:21:30 +08:00
CaIon
05af05e449
feat: add system prompt override functionality in channel settings and request handling #1468
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled
2025-08-09 12:53:06 +08:00
CaIon
9682c46cc4
feat: implement moonshot adaptor for request handling and response processing
2025-08-08 17:28:21 +08:00
Xyfacai
15c11bfe51
refactor: 调整模型匹配
2025-08-06 20:09:22 +08:00
Seefs
3b34afa8c9
Revert "feat: add Claude Code channel support with OAuth integration"
2025-07-31 22:08:16 +08:00
Seefs
1389cc7acd
feat: add claude code channel
2025-07-26 18:06:46 +08:00
feitianbubu
4378e0f96d
feat: add vidu video channel
2025-07-24 10:14:25 +08:00
feitianbubu
b3c4d97286
chore: opt video channel and platform
2025-07-22 20:14:24 +08:00
feitianbubu
43980b3ad1
feat: add jimeng image
2025-07-13 13:36:33 +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
8e11b67ece
✨ feat(channel): enhance channel status management
2025-07-10 17:49:53 +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
Xiangyuan-liu
db98c0f4b1
refactor: log params and channel params
...
refactor: log params and channel params
2025-07-07 14:26:37 +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
Calcium-Ion
aa0edd8dce
Merge pull request #1321 from iszcz/main
...
支持Midjourney视频任务和图片编辑
2025-07-05 15:28:33 +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
t0ng7u
dd9a1534e0
🔌 feat(api): extend endpoint type support & expose in pricing UI
...
* backend
- constant/endpoint_type.go
• Add EndpointTypeMidjourney, EndpointTypeSuno, EndpointTypeKling, EndpointTypeJimeng.
- common/endpoint_type.go
• Map Midjourney / MidjourneyPlus, SunoAPI, Kling, Jimeng channel types to the new endpoint types.
* frontend
- ModelPricing.js
• Add “Supported Endpoint Type” column.
• Implement renderSupportedEndpoints with `stringToColor` for consistent tag colors.
These changes allow `/api/pricing` and model lists to return accurate
`supported_endpoint_types` covering all non-OpenAI providers and display
them clearly in the UI.
No breaking changes.
2025-07-04 03:15:34 +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
iszcz
d4f2f4dbbe
支持Midjourney视频任务和图片编辑
2025-06-30 22:31:12 +08:00
skynono
111dc18d26
feat: video action to constant
2025-06-27 23:19:34 +08:00
skynono
221d2b5552
feat: add video channel jimeng
2025-06-27 17:08:20 +08:00
CaIon
8a1e437ce9
🔧 chore: update STREAMING_TIMEOUT default value to 120 seconds in configuration
2025-06-22 18:47:40 +08:00
CaIon
32366d1e1b
refactor: streamline price calculation in RelaySwapFace and RelayMidjourneySubmit functions
2025-06-22 17:52:48 +08:00
skynono
d7ed0214ad
feat: add video channel kling
2025-06-19 11:53:42 +08:00
RedwindA
09ffc364f2
🔧 refactor(redis): replace direct constant usage with RedisKeyCacheSeconds function for cache duration
2025-06-17 03:24:39 +08:00