Commit Graph

185 Commits

Author SHA1 Message Date
StageDog
cf8d4e874d feat: 针对 discord 登录配置使用新版设置方案 2025-11-22 19:06:53 +08:00
Seefs
4ac4849ab6 feat: Fill thoughtSignature only for Gemini/Vertex channels using the OpenAI format 2025-11-20 15:54:33 +08:00
Xyfacai
a4bfec164e fix: 未设置价格模型不会被拉取,除非设置自用模式 2025-11-13 18:44:18 +08:00
CaIon
a05a815f99 fix(claude): Prevent duplicate header values in WriteHeaders method 2025-11-13 16:49:40 +08:00
Calcium-Ion
ae8b09d45f Merge pull request #2190 from Sh1n3zZ/support-replicate-channel
feat: replicate channel flux model
2025-11-10 17:22:31 +08:00
Sh1n3zZ
af671d34c3 feat: replicate channel flux model 2025-11-08 01:24:45 +08:00
Seefs
fd55ba7f2c feat: ShouldPreserveThinkingSuffix (#2189) 2025-11-07 17:43:33 +08:00
Seefs
b26333b2cd Merge pull request #2121 from QuantumNous/feat/special_group
feat: add special user usable group setting
2025-10-29 18:54:51 +09:00
CaIon
6aec088693 feat: add special user usable group setting 2025-10-28 23:25:43 +08:00
Seefs
25de94e292 fix: test channel frequency (#2119) 2025-10-28 23:23:24 +08:00
Little Write
dca9bac4a4 Merge branch 'main' into feat_subscribe_sp1 2025-10-20 22:36:33 +08:00
CaIon
d43751f262 feat: support free model setting 2025-10-12 13:31:03 +08:00
Seefs
5010f2d004 format: package name -> github.com/QuantumNous/new-api (#2017) 2025-10-11 15:30:09 +08:00
Xyfacai
09495c8ef6 feat: sora 增加参数校验与计费 2025-10-10 23:56:36 +08:00
Seefs
56ffbd57b9 fix: legal setting 2025-10-10 13:18:26 +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
creamlike1024
eeef719f3a feat: 支持 gemini-robotics-er-1.5-preview 2025-10-01 17:33:54 +08:00
Seefs
ce1f62b27c fix: passkey 文案 2025-09-30 16:15:33 +08:00
Seefs
75ee632182 fix: passkey rpid detect 2025-09-30 15:53:19 +08:00
Seefs
e26c794742 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
740c46102b Merge pull request #1924 from prnake/claude-4-5
feat: support claude-sonnet-4-5-20250929
2025-09-30 09:26:34 +08:00
papersnake
112ab0b17c feat: support claude-sonnet-4-5-20250929 2025-09-30 09:14:12 +08:00
t0ng7u
8294a76bc2 💱 feat(settings): introduce site-wide quota display type (USD/CNY/TOKENS/CUSTOM)
Replace the legacy boolean “DisplayInCurrencyEnabled” with an injected, type-safe
configuration `general_setting.quota_display_type`, and wire it through the
backend and frontend.

Backend
- Add `QuotaDisplayType` to `operation_setting.GeneralSetting` with injected
  registration via `config.GlobalConfig.Register("general_setting", ...)`.
  Helpers: `IsCurrencyDisplay()`, `IsCNYDisplay()`, `GetQuotaDisplayType()`.
- Expose `quota_display_type` in `/api/status` and keep legacy
  `display_in_currency` for backward compatibility.
- Logger: update `LogQuota` and `FormatQuota` to support USD/CNY/TOKENS. When
  CNY is selected, convert using `operation_setting.USDExchangeRate`.
- Controllers:
  - `billing`: compute subscription/usage amounts based on the selected type
    (USD: divide by `QuotaPerUnit`; CNY: USD→CNY; TOKENS: keep raw tokens).
  - `topup` / `topup_stripe`: treat inputs as “amount” for USD/CNY and as
    token-count for TOKENS; adjust min topup and pay money accordingly.
  - `misc`: include `quota_display_type` in status payload.
- Compatibility: in `model/option.UpdateOption`, map updates to
  `DisplayInCurrencyEnabled` → `general_setting.quota_display_type`
  (true→USD, false→TOKENS). Keep exporting the legacy key in `OptionMap`.

Frontend
- Settings: replace the “display in currency” switch with a Select
  (`general_setting.quota_display_type`) offering USD / CNY / Tokens.
  Provide fallback mapping from legacy `DisplayInCurrencyEnabled`.
- Persist `quota_display_type` to localStorage (keep `display_in_currency`
  for legacy components).
- Rendering helpers: base all quota/price rendering on `quota_display_type`;
  use `usd_exchange_rate` for CNY symbol/values.
- Pricing page: default view currency follows site display type (USD/CNY),
  while TOKENS mode still allows per-view currency toggling when needed.

Notes
- No database migrations required.
- Legacy clients remain functional via compatibility fields.
2025-09-29 23:23:31 +08:00
dd
f9399e279c Merge branch 'QuantumNous:main' into main 2025-09-29 19:15:43 +08:00
RedwindA
71b3c90bc9 解锁deepseek补全倍率;允许deepseek渠道获取模型 2025-09-29 18:32:44 +08:00
Seefs
1599a8403f feat: passkey 2025-09-29 17:45:09 +08:00
dd
40a6d957b5 Merge branch 'QuantumNous:main' into main 2025-09-29 14:13:50 +08:00
Little Write
6a2071cb38 Merge branch 'main' into feat_subscribe_sp1 2025-09-27 22:54:52 +08:00
Seefs
bd6f4dee73 feat: allow stripe promotion code 2025-09-27 15:43:12 +08:00
CaIon
552d795742 Merge branch 'alpha' 2025-09-19 14:20:15 +08:00
creamlike1024
5cae6be108 feat: 支持 gemini-embedding-001 2025-09-19 00:24:01 +08:00
CaIon
0008d2e3a0 feat: add experimental IP filtering for domains and update related settings 2025-09-18 13:40:52 +08:00
CaIon
23e5132e21 Merge branch 'main' into ssrf
# Conflicts:
#	service/cf_worker.go
2025-09-18 13:29:11 +08:00
creamlike1024
82163b4be7 feat: 添加域名启用ip过滤开关 2025-09-17 23:46:04 +08:00
creamlike1024
cc9a559b75 feat: 添加域名和ip过滤模式设置 2025-09-16 22:40:40 +08:00
Little Write
12ea0c19e6 完善 订单处理,以及 优化 ui 2025-09-16 22:35:46 +08:00
creamlike1024
f6984272bf fix: openai responses api 未统计图像生成调用计费 2025-09-16 12:47:59 +08:00
DD
71d41d6eaa Merge branch 'main' of github.com:danding5/new-api
# Conflicts:
#	relay/relay_adaptor.go
2025-09-15 14:31:06 +08:00
creamlike1024
d21886b9fb Merge branch 'alpha' into imageratio-and-audioratio-edit 2025-09-15 14:12:24 +08:00
CaIon
c3f5478593 feat: implement SSRF protection settings and update related references 2025-09-13 18:15:03 +08:00
CaIon
9e17df3f74 fix: update references from setting to system_setting for ServerAddress 2025-09-13 15:27:41 +08:00
CaIon
1a8d781721 Revert "feat: gemini-2.5-flash-image-preview 文本和图片输出计费"
This reverts commit a45513a7a6.
2025-09-13 12:53:28 +08:00
CaIon
c47d9fb5b5 feat(payment): add payment settings configuration and update payment methods handling 2025-09-12 19:29:34 +08:00
DD
68d30225e5 merge 2025-09-10 19:11:58 +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
Little Write
51a7aa440b 完成 后端 部分,webo hhok 待完善 2025-09-08 23:07:05 +08:00
DD
cfbc2df3f8 add submodel.ai 2025-09-08 16:21:21 +08:00
Seefs
80cfa0d0df 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
CaIon
1bbabda081 feat(monitor_setting): implement automatic channel testing configuration 2025-09-03 14:00:52 +08:00
t0ng7u
ed71c9fcf3 🎨 style(go): format entire codebase
- Apply canonical Go formatting to all .go files
- No functional changes; whitespace/import/struct layout only
- Improves consistency, reduces diff noise, and aligns with standard tooling
2025-08-31 13:08:34 +08:00