Commit Graph

91 Commits

Author SHA1 Message Date
Seefs
f6f5a6f875 fix: refine upstream update ignore UX and detect behavior 2026-03-03 14:00:48 +08:00
Seefs
70821e2051 feat: auto fetch upstream models (#2979)
* feat: add upstream model update detection with scheduled sync and manual apply flows

* feat: support upstream model removal sync and selectable deletes in update modal

* feat: add detect-only upstream updates and show compact +/- model badges

* feat: improve upstream model update UX

* feat: improve upstream model update UX

* fix: respect model_mapping in upstream update detection

* feat: improve upstream update modal to prevent missed add/remove actions

* feat: add admin upstream model update notifications with digest and truncation

* fix: avoid repeated partial-submit confirmation in upstream update modal

* feat: improve ui/ux

* feat: suppress upstream update alerts for unchanged channel-count within 24h

* fix: submit upstream update choices even when no models are selected

* feat: improve upstream model update flow and split frontend updater

* fix merge conflict
2026-03-02 22:01:53 +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
Seefs
0f09dbda2b Merge branch 'upstream-main' into feature/improve-param-override
# Conflicts:
#	relay/channel/api_request_test.go
#	relay/common/override_test.go
#	web/src/components/table/channels/modals/EditChannelModal.jsx
2026-02-25 13:39:54 +08:00
RedwindA
144fe67705 feat(web): add custom-model create hint and i18n translations 2026-02-24 21:44:21 +08:00
Calcium-Ion
49eb6d3c1e feat: add missing OpenAI/Claude/Gemini request fields (#2971)
* feat: add missing OpenAI/Claude/Gemini request fields and responses stream options

* fix: skip field filtering when request passthrough is enabled

* fix: include subscription in personal sidebar module controls

* feat: gate Claude inference_geo passthrough behind channel setting and add field docs
2026-02-22 23:31:18 +08:00
CaIon
bf03f277ac feat: add validation for invalid status code entries in channel modal
- Introduced a new function to collect invalid status code entries from the status code mapping.
- Updated the EditChannelModal to display an error message if invalid status codes are detected.
- Enhanced localization files to include new error messages for invalid status codes in multiple languages.
- Removed unused styles from the RiskAcknowledgementModal for cleaner UI.
2026-02-22 21:36:38 +08:00
Seefs
50ffa639a2 feat: guard new 504/524 status remaps with risk confirmation 2026-02-22 20:03:46 +08:00
Seefs
71886f4e57 feat: add pass_headers op, grouped presets (incl. Gemini 4K), and robust JSON fallback 2026-02-22 17:16:57 +08:00
Seefs
b7bfa12837 feat: redesign param override editing with guided modal and Monaco JSON hints 2026-02-22 01:17:26 +08:00
Seefs
bb7ad0ce15 feat: gate Claude inference_geo passthrough behind channel setting and add field docs 2026-02-21 14:25:58 +08:00
Seefs
4746b2bf9f feat: add missing OpenAI/Claude/Gemini request fields and responses stream options 2026-02-19 14:16:07 +08:00
Seefs
e3dd5b3e29 Merge pull request #2874 from MUTED64/main
feat: Force beta=true parameter for Anthropic channel
2026-02-08 00:09:28 +08:00
Seefs
6ecd1aa68e codex tips 2026-02-08 00:06:06 +08:00
MUTED64
2f867bc299 feat: Force beta=true parameter for Anthropic channel 2026-02-06 21:22:39 +08:00
Seefs
e7c043d866 feat: add Codex channel disclaimer (i18n, OpenAI terms) 2026-02-05 16:36:52 +08:00
Seefs
5ff96de421 feat: add header passthrough 2026-02-05 01:43:49 +08:00
Seefs
f244a9e661 fix: channel affinity (#2799)
* fix: channel affinity log styles

* fix: Issue with incorrect data storage when switching key sources

* feat: support not retrying after a single rule configuration fails

* fix: render channel affinity tooltip as multiline content

* feat: channel affinity cache hit

* fix: prevent ChannelAffinityUsageCacheModal infinite loading and hide data before fetch

* chore: format backend with gofmt and frontend with prettier/eslint autofix
2026-02-02 14:37:31 +08:00
Bliod-Cook
67d6699c5d Merge branch 'main' into pr/Bliod-Cook/2610 2026-01-26 05:23:51 +00:00
Seefs
2a15e3b152 feat: codex channel (#2652)
* feat: codex channel

* feat: codex channel

* feat: codex oauth flow

* feat: codex refresh cred

* feat: codex usage

* fix: codex err message detail

* fix: codex setting ui

* feat: codex refresh cred task

* fix: import err

* fix: codex store must be false

* fix: chat -> responses tool call

* fix: chat -> responses tool call
2026-01-14 22:29:43 +08:00
Seefs
eae53ac398 Merge pull request #2627 from seefs001/feature/channel-test-param-override
feat: channel testing supports parameter overriding
2026-01-12 18:49:05 +08:00
RedwindA
0f0ba4adc4 fix: remove Minimax from FETCHABLE channels 2026-01-09 20:37:12 +08:00
Bliod
c0a9934a2e feat: select model in visualized modl mapping 2026-01-08 15:26:59 +00:00
Seefs
b10f1f7b85 feat: ionet integrate (#2105)
* wip ionet integrate

* wip ionet integrate

* wip ionet integrate

* ollama wip

* wip

* feat: ionet integration & ollama manage

* fix merge conflict

* wip

* fix: test conn cors

* wip

* fix ionet

* fix ionet

* wip

* fix model select

* refactor: Remove `pkg/ionet` test files and update related Go source and web UI model deployment components.

* feat: Enhance model deployment UI with styling improvements, updated text, and a new description component.

* Revert "feat: Enhance model deployment UI with styling improvements, updated text, and a new description component."

This reverts commit 8b75cb5bf0d1a534b339df8c033be9a6c7df7964.
2025-12-28 15:55:35 +08:00
TinsFox
530b3eff11 style: add card spacing 2025-12-19 21:00:31 +08:00
Seefs
a3796b90d1 fix: edit vertex key type 2025-11-26 18:12:36 +08:00
Seefs
3fc9182dd4 feat: 重定向后的模型视为已有的模型,附带特殊提示 2025-11-22 19:34:36 +08:00
Seefs
d6939d2f64 feat: 二次确认添加重定向前模型 2025-11-22 19:23:27 +08:00
Seefs
1381666586 Merge pull request #2238 from seefs001/feature/doubao-coding-plan
feat: support doubao coding plan
2025-11-16 23:49:35 +08:00
feitianbubu
4a6676ccd5 feat: add doubao audio token input prompt 2025-10-17 22:06:46 +08:00
CaIon
5bee54a11d refactor: update AWS key format in EditChannelModal for consistency 2025-10-15 17:38:21 +08:00
CaIon
59caea8f34 feat: support aws bedrock api-keys-use 2025-10-15 17:29:10 +08:00
Seefs
1d32327d04 feat: pplx channel 2025-10-10 16:12:15 +08:00
Apple\Apple
dec3a32397 feat: Add topup billing history with admin manual completion
Implement comprehensive topup billing system with user history viewing and admin management capabilities.

## Features Added

### Frontend
- Add topup history modal with paginated billing records
- Display order details: trade number, payment method, amount, money, status, create time
- Implement empty state with proper illustrations
- Add payment method column with localized display (Stripe, Alipay, WeChat)
- Add admin manual completion feature for pending orders
- Add Coins icon for recharge amount display
- Integrate "Bills" button in RechargeCard header
- Optimize code quality by using shared utility functions (isAdmin)
- Extract constants for status and payment method mappings
- Use React.useMemo for performance optimization

### Backend
- Create GET `/api/user/topup/self` endpoint for user topup history with pagination
- Create POST `/api/user/topup/complete` endpoint for admin manual order completion
- Add `payment_method` field to TopUp model for tracking payment types
- Implement `GetUserTopUps` method with proper pagination and ordering
- Implement `ManualCompleteTopUp` with transaction safety and row-level locking
- Add application-level mutex locks to prevent concurrent order processing
- Record payment method in Epay and Stripe payment flows
- Ensure idempotency and data consistency with proper error handling

### Internationalization
- Add i18n keys for Chinese (zh), English (en), and French (fr)
- Support for billing-related UI text and status messages

## Technical Improvements
- Use database transactions with FOR UPDATE row-level locking
- Implement sync.Map-based mutex for order-level concurrency control
- Proper error handling and user-friendly toast notifications
- Follow existing codebase patterns for empty states and modals
- Maintain code quality with extracted render functions and constants

## Files Changed
- Backend: controller/topup.go, controller/topup_stripe.go, model/topup.go, router/api-router.go
- Frontend: web/src/components/topup/modals/TopupHistoryModal.jsx (new), web/src/components/topup/RechargeCard.jsx, web/src/components/topup/index.jsx
- i18n: web/src/i18n/locales/{zh,en,fr}.json
2025-10-07 00:22:45 +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
CaIon
48d649056c feat(api): add header override processing with variable support 2025-10-02 19:29:57 +08:00
t0ng7u
2b1f1fa124 feat(layout): refine footer visibility logic to target CardPro component pages
- Replace blanket console route footer hiding with specific page targeting
- Only hide footer on pages that use CardPro component:
  * /console/channel (channels management)
  * /console/log (usage logs)
  * /console/redemption (redemption codes)
  * /console/user (user management)
  * /console/token (token management)
  * /console/midjourney (midjourney logs)
  * /console/task (task logs)
  * /console/models (model management)
  * /pricing (pricing page)
- Footer now displays on other console pages (dashboard, settings, topup, etc.)
- Improves UI consistency by showing footer where CardPro's internal pagination isn't used

This change ensures footer is only hidden when CardPro component provides its own
pagination/footer functionality, while preserving footer visibility on other pages
that benefit from the global footer navigation.
2025-10-02 18:45:37 +08:00
Seefs
e7b1ff2f2a fix: merge conflict 2025-10-02 14:28:58 +08:00
Seefs
82361eb853 Merge branch 'alpha' into feat-channel-block-edit 2025-10-02 14:16:01 +08:00
Seefs
d075fbee23 fix: missing field & field control 2025-10-02 00:14:35 +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
8eace6bb62 feat: 通用二步验证 2025-09-30 12:12:50 +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
Seefs
722e2c2afd feat: passkey wip 2025-09-29 21:54:16 +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
Seefs
e271e09945 fix: set volcengine default url 2025-09-29 12:15:38 +08:00
Seefs
343d8091fc Merge branch 'main-upstream' into fix/volcengine_default_baseurl
# Conflicts:
#	main.go
2025-09-29 12:08:52 +08:00
CaIon
6682842cbb feat: enhance OpenRouter enterprise support with new settings and response handling 2025-09-28 15:23:27 +08:00
JoeyLearnsToCode
8ed3e4f034 Merge remote-tracking branch 'remotes/up-origin/main' into feat-channel-block-edit 2025-09-28 09:56:35 +08:00