Commit Graph

287 Commits

Author SHA1 Message Date
CaIon
b523f6a0ba fix(channel_select): adjust priority retry logic for cross-group channel selection 2025-12-13 01:04:10 +08:00
CaIon
ce6fb95f96 refactor(relay): update channel retrieval to use RelayInfo structure 2025-12-12 22:04:38 +08:00
Calcium-Ion
147659fb6e Merge pull request #2426 from QuantumNous/feat/auto-cross-group-retry
feat(token): add cross-group retry option for token processing
2025-12-12 20:45:54 +08:00
CaIon
7e1d1350c7 feat: implement cross-group retry functionality and update translations 2025-12-12 18:28:33 +08:00
CaIon
01b4039e96 feat(token): add cross-group retry option for token processing 2025-12-12 17:59:21 +08:00
Calcium-Ion
fca015c6c4 Merge pull request #2397 from seefs001/fix/tool-call-claude
fix: try to fix tool call issues
2025-12-09 16:57:24 +08:00
Seefs
1cb2b6f882 fix:try to fix tool call issues 2025-12-09 13:55:52 +08:00
Seefs
5889571108 fix: Use channel proxy settings for task query scenarios 2025-12-09 11:15:27 +08:00
CaIon
7d1bad1b37 fix(token_counter): correct model name reference in image token estimation 2025-12-03 00:25:05 +08:00
Calcium-Ion
48635360cd Merge pull request #2355 from QuantumNous/feat/optimize-token-counter
feat: refactor token estimation logic
2025-12-02 21:51:09 +08:00
CaIon
0c051e968f feat(token_estimator): add concurrency support for multipliers retrieval 2025-12-02 21:38:58 +08:00
CaIon
f5b409d74f 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
Papersnake
2f7eebcd10 fix: add ForceAttemptHTTP2 2025-12-02 10:08:58 +08:00
Papersnake
3954feb993 fix: set MaxIdleConnsPerHost to 100 2025-12-02 09:55:03 +08:00
CaIon
0952973887 feat: Add CountToken configuration and update token counting logic 2025-11-22 17:15:34 +08:00
CaIon
84745d5ca4 feat: Add ContextKeyLocalCountTokens and update ResponseText2Usage to use context in multiple channels 2025-11-21 18:17:01 +08:00
Seefs
df2ee649ab feat: claude 1h cache (#2155)
* feat: claude 1h cache

* feat: claude 1h cache

* fix price
2025-11-04 00:20:50 +08:00
Seefs
8f862152e8 Merge pull request #2124 from feitianbubu/pr/fix-topup-link
fix: correct topUp link
2025-10-31 13:43:23 +08:00
CaIon
52d9b8cc78 refactor(group): update user group handling to utilize userUsableGroups directly and add GetUserGroupRatio function 2025-10-30 21:16:42 +08:00
Seefs
1f419a3c71 Merge pull request #2121 from QuantumNous/feat/special_group
feat: add special user usable group setting
2025-10-29 18:54:51 +09:00
feitianbubu
74e5e640c5 fix: correct topUp link 2025-10-29 16:55:29 +08:00
CaIon
1ded19795a feat: add special user usable group setting 2025-10-28 23:25:43 +08:00
CaIon
2b70095b47 feat: implement audio duration retrieval without ffmpeg dependencies 2025-10-28 15:50:45 +08:00
Seefs
86c63ea4a7 feat: endpoint type log 2025-10-13 22:44:54 +08:00
Seefs
2624c48113 feat: endpoint type log 2025-10-13 22:25:39 +08:00
yanggh
8b9188c584 fix(convert): 修复 OpenAI 转 Claude 流时 thinking 块的格式问题
将 `ClaudeMediaMessage.Thinking` 的类型从 `string` 修改为 `*string`,以解决 `omitempty` 导致 `"thinking": ""` 字段在 JSON 序列化时被忽略的问题。

同时更新了 `service/convert.go` 和 `relay/channel/claude/relay-claude.go` 中的相关逻辑,以兼容新的指针类型,确保生成的 Claude 事件流符合官方规范。
2025-10-13 19:32:17 +08:00
CaIon
c13bb67360 fix: mask sensitive information in error messages and refine task retrieval query 2025-10-12 12:25:11 +08:00
Seefs
e1c7a4f41f format: package name -> github.com/QuantumNous/new-api (#2017) 2025-10-11 15:30:09 +08:00
Seefs
76ab8a480a Merge pull request #1401 from feitianbubu/pr/add-qwen-channel-auto-disabled
feat: add qwen channel auto disabled
2025-10-10 16:41:43 +08:00
CaIon
7b732ec4b7 feat: enhance HTTP client with custom redirect handling and SSRF protection 2025-10-10 15:13:41 +08:00
CaIon
74f93d41f3 feat: update Gemini API response handling to include block reason and improve error reporting 2025-10-05 19:33:47 +08:00
RedwindA
85ff8b1422 feat: add Gotify notification option for quota alerts 2025-10-01 19:15:00 +08:00
Seefs
fcc6172b43 fix: passkey rpid detect 2025-09-30 15:53:19 +08:00
Seefs
4c13666f26 Merge branch 'main-upstream' into feature/passkey
# Conflicts:
#	web/src/components/settings/PersonalSetting.jsx
#	web/src/i18n/locales/en.json
#	web/src/i18n/locales/zh.json
2025-09-30 12:15:20 +08:00
Seefs
dcf4336c75 feat: passkey 2025-09-29 17:45:09 +08:00
CaIon
09e5e5d68c fix(http_client): improve error message for unsupported proxy schemes 2025-09-29 14:02:15 +08:00
RedwindA
466d19c33d fix: add missing timeout 2025-09-27 22:29:27 +08:00
RedwindA
c68fd36ee1 feat: 添加代理客户端缓存和重置功能,优化 HTTP 客户端管理 2025-09-27 22:18:39 +08:00
CaIon
b5d3e87ea2 Merge branch 'alpha' 2025-09-19 14:20:15 +08:00
creamlike1024
467e584359 feat: 添加域名启用ip过滤开关 2025-09-17 23:46:04 +08:00
creamlike1024
168ebb1cd4 feat: ssrf支持域名和ip黑白名单过滤模式 2025-09-17 15:41:21 +08:00
creamlike1024
b7bc609a7a feat: 添加域名和ip过滤模式设置 2025-09-16 22:40:40 +08:00
Xyfacai
9790e2c4f6 fix: gemini support webp file 2025-09-15 01:01:48 +08:00
CaIon
72d5b35d3f feat: implement SSRF protection settings and update related references 2025-09-13 18:15:03 +08:00
CaIon
28ed42130c fix: update references from setting to system_setting for ServerAddress 2025-09-13 15:27:41 +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
Xyfacai
b25ac0bfb6 fix: 预扣额度使用 relay info 传递 2025-09-11 16:04:32 +08:00
Xyfacai
fcdfd027cd fix: openai 格式请求 claude 没计费 create cache token 2025-09-10 15:30:23 +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