Commit Graph

69 Commits

Author SHA1 Message Date
CaIon 6bde1a9c8d Merge origin/main into nightly
Resolve conflicts:
- .gitignore: keep nightly additions (.test, skills-lock.json)
- relay/helper/price.go: keep both billingexpr and model imports
- en.json / zh-CN.json: keep nightly's superset of i18n entries
- service/billing_session.go: add missing 3rd arg to DecreaseUserQuota
- en.json / zh-CN.json: deduplicate 129+320 duplicate i18n keys
2026-04-23 21:37:03 +08:00
dependabot[bot] 6c69d60fbb chore(deps): bump github.com/jackc/pgx/v5 from 5.9.0 to 5.9.2
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.9.0 to 5.9.2.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.9.0...v5.9.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.9.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 00:44:49 +00:00
dependabot[bot] dd57eeb514 chore(deps): bump github.com/jackc/pgx/v5 from 5.7.1 to 5.9.0
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.1 to 5.9.0.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.7.1...v5.9.0)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.9.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-16 22:45:12 +00:00
CaIon 4d2993e4cc Merge remote-tracking branch 'origin/main' into nightly
# Conflicts:
#	web/src/helpers/render.jsx
#	web/src/hooks/usage-logs/useUsageLogsData.jsx
#	web/src/i18n/locales/en.json
2026-04-09 17:12:21 +08:00
dependabot[bot] ded3bb9cb1 chore(deps): bump github.com/aws/aws-sdk-go-v2/service/bedrockruntime
Bumps [github.com/aws/aws-sdk-go-v2/service/bedrockruntime](https://github.com/aws/aws-sdk-go-v2) from 1.50.0 to 1.50.4.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.50.0...service/ssm/v1.50.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/bedrockruntime
  dependency-version: 1.50.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 01:23:22 +00:00
CaIon 35d0704640 Merge branch 'origin/main' into nightly
Resolve 4 conflicts:
- relay/compatible_handler.go: accept main's refactor (postConsumeQuota -> service.PostTextConsumeQuota)
- service/quota.go: accept main's PostClaudeConsumeQuota deletion, keep nightly's tiered billing in PostWssConsumeQuota and PostAudioConsumeQuota
- web/src/i18n/locales/{en,zh-CN}.json: merge both sets of translation keys

Post-merge integration:
- Add tiered billing (TryTieredSettle, InjectTieredBillingInfo) to PostTextConsumeQuota
- Update tool pricing calls to use nightly's generic GetToolPriceForModel/GetToolPrice API
2026-04-02 00:39:13 +08:00
dependabot[bot] 40dc43f44e chore(deps): bump golang.org/x/image from 0.23.0 to 0.38.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.23.0 to 0.38.0.
- [Commits](https://github.com/golang/image/compare/v0.23.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.38.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 16:24:46 +00:00
zhongyuan.zhao 202a433f86 feat(waffo): Waffo payment gateway integration with configurable methods
- Add Waffo payment SDK integration (waffo-go v1.3.1)
- Backend: webhook handler, pay endpoint, order lock race-condition fix
- Settings: full Waffo config (API keys, sandbox/prod, currency, pay methods)
- Frontend: Waffo payment buttons in topup page, admin settings panel
- i18n: Waffo-related translations for en/fr/ja/ru/vi/zh-TW

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 18:04:58 +08:00
CaIon 91ed4e196a feat: implement tiered billing expression evaluation and related functionality
- Added support for tiered billing expressions in the billing system.
- Introduced new types and functions for handling billing expressions, including caching and execution.
- Updated existing billing logic to accommodate tiered billing scenarios.
- Enhanced request handling to support incoming billing expression requests.
- Added tests for tiered billing functionality to ensure correctness.
2026-03-17 16:59:25 +08:00
Seefs ad326beb10 Merge pull request #3066 from seefs001/fix/aws-header-override
Fix/aws header override
2026-03-02 18:54:56 +08:00
CaIon c444746088 feat(i18n): add backend multi-language support with user language preference
- Add go-i18n library for internationalization
- Create i18n package with translation keys and YAML locale files (zh/en)
- Implement i18n middleware for language detection from user settings and Accept-Language header
- Add Language field to UserSetting DTO
- Update API response helpers with i18n support (ApiErrorI18n, ApiSuccessI18n)
- Migrate hardcoded messages in token, redemption, and user controllers
- Add frontend language preference settings component
- Sync language preference across header selector and user settings
- Auto-restore user language preference on login
2026-02-05 00:09:32 +08:00
Seefs d9321b7da3 feat: channel affinity (#2669)
* feat: channel affinity

* feat: channel affinity -> model setting

* fix: channel affinity

* feat: channel affinity op

* feat: channel_type setting

* feat: clean

* feat: cache supports both memory and Redis.

* feat: Optimise ui/ux

* feat: Optimise ui/ux

* feat: Optimise codex usage ui/ux

* feat: Optimise ui/ux

* feat: Optimise ui/ux

* feat: Optimise ui/ux

* feat: If the affinitized channel fails and a retry succeeds on another channel, update the affinity to the successful channel
2026-01-26 19:57:41 +08:00
Seefs bdfc875775 feat: pyroscope integrate 2025-12-13 13:49:38 +08:00
Calcium-Ion 3676b9f2bc Merge pull request #2358 from seefs001/fix/regrex-repeat-compile
fix: regex repeat compile
2025-12-09 14:01:07 +08:00
borx 0be0b36503 fix(go.mod): 更新modernc.org/sqlite依赖项版本 2025-12-08 01:16:30 +08:00
Seefs 1dd8c0f569 fix: regex repeat compile 2025-12-03 00:41:47 +08:00
dependabot[bot] bb74f3dde7 chore(deps): bump golang.org/x/crypto from 0.42.0 to 0.45.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.42.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.42.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 02:46:07 +00:00
CaIon a00c6393c5 feat: implement audio duration retrieval without ffmpeg dependencies 2025-10-28 15:50:45 +08:00
Seefs 5010f2d004 format: package name -> github.com/QuantumNous/new-api (#2017) 2025-10-11 15:30:09 +08:00
Seefs 3b22408b61 chore: go version & sonic dep 2025-09-30 14:38:20 +08:00
Seefs 1599a8403f feat: passkey 2025-09-29 17:45:09 +08:00
CaIon 0e34de8fe2 feat: replace pcopy with jinzhu/copier for deep copy functionality 2025-08-26 13:40:41 +08:00
CaIon 1ee3d1cc50 feat: 修复重试后请求结构混乱,修复rerank端点无法使用 2025-08-23 13:12:15 +08:00
Nekohy 4b6031b59c feats: the flexable params override and compatible format 2025-08-16 11:27:47 +08:00
wzxjohn d31027d5c7 feat: support aws bedrock apikey 2025-08-05 23:01:30 +08:00
Seefs b56a75cbe3 fix: coderabbit review 2025-08-03 10:41:00 +08:00
Seefs b48d3a6b40 feat: implement two-factor authentication (2FA) support with user login and settings integration 2025-08-02 14:53:28 +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
wzxjohn 81d474ba3c feat: add stripe pay api support 2025-07-10 16:29:38 +08:00
CaIon 88a801af2d 🔧 fix(token_counter): update token encoder implementation and dependencies 2025-06-10 18:04:49 +08:00
wzxjohn bdb1a2fcb9 feat: add oidc support 2025-03-11 15:52:03 +08:00
1808837298@qq.com 0876bc3f7f feat: Improve decimal precision for quota and payment calculations
- Added github.com/shopspring/decimal for precise floating-point calculations
- Refactored quota and payment calculations in multiple files to use decimal arithmetic
- Updated go.mod and go.sum to include decimal library
- Improved precision in topup, relay, and quota service calculations
- Added support for more OpenAI model variants in cache ratio settings
2025-03-08 21:55:50 +08:00
1808837298@qq.com 0be6c5ee69 chore: replace sqlite lib with prue go lib 2025-02-11 18:34:34 +08:00
CalciumIon 7ae97088c3 chore: Update dependencies and refactor JSON handling #614
- Removed the `bytedance/sonic` dependency and replaced its usage with the standard `encoding/json` package for JSON marshalling in `relay-text.go`.
- Updated `go.mod` to reflect the removal of `sonic` and adjusted the version of `sonic/loader`.
- Cleaned up `go.sum` to ensure consistency with the updated dependencies.
2024-12-12 14:14:24 +08:00
CalciumIon 498b240409 feat: update go-epay 2024-12-05 17:45:54 +08:00
CalciumIon d0395194d1 Update go.mod 2024-12-05 15:25:42 +08:00
CalciumIon 270857e370 feat: support br 2024-12-04 23:53:02 +08:00
CalciumIon 4496cb537e chore: go.mod 2024-11-19 15:14:40 +08:00
lianghaoyuan 9076ec5c63 feat: 添加.env配置文件和初始化环境变量 2024-09-24 11:39:02 +08:00
CalciumIon 6b22319e27 Update go.mod 2024-08-27 20:30:46 +08:00
CalciumIon b8664e71e6 feat: support vertex ai #377 2024-08-27 20:19:51 +08:00
CalciumIon d06018cd3f chore: gopool 2024-07-19 01:07:37 +08:00
1808837298@qq.com 2254b1c422 feat: update tiktoken 2024-05-30 21:45:58 +08:00
CaIon 456be72de2 chore: update tiktoken (#254) 2024-05-15 14:18:29 +08:00
CaIon 3721ed796c feat: support aws claude 2024-04-23 11:44:40 +08:00
CaIon 107bd8d691 update go-epay 2024-04-07 14:42:03 +08:00
CaIon 14892a6582 feat: 初步兼容敏感词过滤 2024-03-20 17:07:42 +08:00
CaIon aff0158632 chore: update dependency 2024-03-15 18:35:15 +08:00
CaIon 26387137fc bump golang.org/x/crypto from 0.14.0 to 0.17.0 2023-12-27 16:32:42 +08:00