1935 Commits

Author SHA1 Message Date
CaIon
4deb1eb70f feat: update ratio label for user group handling in render component 2026-03-14 15:41:02 +08:00
CaIon
092ee07e94 feat: normalize number handling in model pricing editor #3246 2026-03-14 15:29:47 +08:00
Calcium-Ion
122d5c00ef Merge pull request #3182 from seefs001/feature/params-override-beta-header-append
feat:support $keep_only_declared and deduped $append for header override
2026-03-10 02:03:02 +08:00
Seefs
c3b9ae5f3b refactor: optimize header override copy and JSON example dialog 2026-03-10 01:59:34 +08:00
CaIon
2c9b22153f feat: enhance Claude request header handling with append functionality 2026-03-09 23:47:51 +08:00
Seefs
6ff5a5dc99 feat:support $keep_only_declared and deduped $append for header token overrides 2026-03-09 00:12:53 +08:00
CaIon
9bb2b6a6ae feat: implement token key fetching and masking in API responses 2026-03-08 22:40:40 +08:00
somnifex
9b394231c8 feat: add drag-and-drop functionality for operation reordering in ParamOverrideEditorModal 2026-03-07 14:10:06 +08:00
CaIon
05452c1558 feat: integrate site display type into pricing components
Add siteDisplayType prop across various pricing components to conditionally render pricing information based on the selected display type. This update enhances the user experience by ensuring that pricing details are accurately represented according to the chosen display mode, particularly for token-based views.
2026-03-07 00:23:36 +08:00
CaIon
f9b5ecc955 feat: add billing display mode selection and update pricing rendering
Introduce a billing display mode feature allowing users to toggle between price and ratio views. Update relevant components and hooks to support this new functionality, ensuring consistent pricing information is displayed across the application.
2026-03-06 23:35:17 +08:00
CaIon
d796578880 fix: unify pricing labels and expand marketplace pricing display
Keep the model pricing editor wording aligned with the new price-based UI while exposing cache, image, and audio pricing in the marketplace so users can see the full configured pricing model.
2026-03-06 22:33:51 +08:00
CaIon
8186ed0ea5 fix: update language settings and improve model pricing editor for better clarity and functionality 2026-03-06 21:36:51 +08:00
Seefs
9d4ea49984 chore: remove top-right field guide entry in param override editor 2026-03-05 16:43:15 +08:00
Seefs
16e4ce52e3 feat: add wildcard path support and improve param override templates/editor 2026-03-05 16:39:34 +08:00
CaIon
887a929d65 fix: add multilingual support for meta description in index.html 2026-03-04 18:19:19 +08:00
CaIon
ddffccc499 fix: update meta description for improved clarity and accuracy 2026-03-04 18:07:17 +08:00
CaIon
c31f9db61e feat: enhance PricingTags and SelectableButtonGroup with new badge styles and color variants 2026-03-04 00:36:04 +08:00
Seefs
40c36b1a30 fix: count ignored models from unselected items in upstream update toast 2026-03-03 14:29:43 +08:00
Seefs
0a804f0e70 fix: refine upstream update ignore UX and detect behavior 2026-03-03 14:00:48 +08:00
Seefs
e71f5a45f2 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
CaIon
477e9cf7db feat: add AionUI to chat settings and built-in templates 2026-03-02 21:19:04 +08:00
Seefs
0689600103 Merge pull request #3066 from seefs001/fix/aws-header-override
Fix/aws header override
2026-03-02 18:54:56 +08:00
CaIon
96264d2f8f feat: add cc-switch integration and modal for token management
- Introduced a new CCSwitchModal component for managing CCSwitch configurations.
- Updated the TokensPage to include functionality for opening the CCSwitch modal.
- Enhanced the useTokensData hook to handle CCSwitch URLs and trigger the modal.
- Modified chat settings to include a new "CC Switch" entry.
- Updated sidebar logic to skip certain links based on the new configuration.
2026-03-01 23:23:20 +08:00
dependabot[bot]
be20f4095a chore(deps): bump axios from 1.12.0 to 1.13.5 in /web
Bumps [axios](https://github.com/axios/axios) from 1.12.0 to 1.13.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.0...v1.13.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-28 10:22:03 +00:00
Seefs
99bb41e310 Merge pull request #3009 from seefs001/feature/improve-param-override
feat: improve channel override ui/ux
2026-02-28 18:19:40 +08:00
Seefs
ff9ed2af96 fix: show built-in user bindings from user detail API in admin modal 2026-02-28 01:03:24 +08:00
Seefs
39397a367e feat: support header token-map rewrite and improve set_header editor UX 2026-02-27 20:01:51 +08:00
Seefs
3286f3da4d feat: support token-map rewrite for comma-separated headers and add bedrock anthropic-beta preset 2026-02-27 19:47:32 +08:00
Seefs
0519446571 feat:add CLI param-override templates with visual editor and apply on first rule match 2026-02-25 15:08:23 +08:00
Seefs
db0b452ea2 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
79e1daff5a feat(web): add custom-model create hint and i18n translations 2026-02-24 21:44:21 +08:00
Seefs
2f4d38fefd refactor: extract binding modal and polish binding management UX 2026-02-23 15:16:22 +08:00
Seefs
9a5f8222bd feat: move user bindings to dedicated management modal 2026-02-23 14:51:55 +08:00
Calcium-Ion
77838100a6 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
Seefs
a01a77fc6f fix: claude affinity cache counter (#2980)
* fix: claude affinity cache counter

* fix: claude affinity cache counter

* fix: stabilize cache usage stats format and simplify modal rendering
2026-02-22 23:30:02 +08:00
CaIon
3b87d31191 feat: add audio preview functionality 2026-02-22 23:23:13 +08:00
CaIon
af2831ce31 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
c4c4e5eda6 feat: add localized high-risk status remap guard with optimized modal UX 2026-02-22 20:14:56 +08:00
Seefs
4831bb7b5b feat: guard new 504/524 status remaps with risk confirmation 2026-02-22 20:03:46 +08:00
Seefs
303fff44e7 feat: add pass_headers op, grouped presets (incl. Gemini 4K), and robust JSON fallback 2026-02-22 17:16:57 +08:00
CaIon
48c9b17c26 fix(i18n): remove duplicate task ID translations and clean up unused keys across multiple languages 2026-02-22 16:45:35 +08:00
CaIon
ec5c6b28ea feat(task): add model redirection, per-call billing, and multipart retry fix for async tasks
1. Async task model redirection (aligned with sync tasks):
   - Integrate ModelMappedHelper in RelayTaskSubmit after model name
     determination, populating OriginModelName / UpstreamModelName on RelayInfo.
   - All task adaptors now send UpstreamModelName to upstream providers:
     - Gemini & Vertex: BuildRequestURL uses UpstreamModelName.
     - Doubao & Ali: BuildRequestBody conditionally overwrites body.Model.
     - Vidu, Kling, Hailuo, Jimeng: convertToRequestPayload accepts RelayInfo
       and unconditionally uses info.UpstreamModelName.
     - Sora: BuildRequestBody parses JSON and multipart bodies to replace
       the "model" field with UpstreamModelName.
   - Frontend log visibility: LogTaskConsumption and taskBillingOther now
     emit is_model_mapped / upstream_model_name in the "other" JSON field.
   - Billing safety: RecalculateTaskQuotaByTokens reads model name from
     BillingContext.OriginModelName (via taskModelName) instead of
     task.Data["model"], preventing billing leaks from upstream model names.

2. Per-call billing (TaskPricePatches lifecycle):
   - Rename TaskBillingContext.ModelName → OriginModelName; add PerCallBilling
     bool field, populated from TaskPricePatches at submission time.
   - settleTaskBillingOnComplete short-circuits when PerCallBilling is true,
     skipping both adaptor adjustments and token-based recalculation.
   - Remove ModelName from TaskSubmitResult; use relayInfo.OriginModelName
     consistently in controller/relay.go for billing context and logging.

3. Multipart retry boundary mismatch fix:
   - Root cause: after Sora (or OpenAI audio) rebuilds a multipart body with a
     new boundary and overwrites c.Request.Header["Content-Type"], subsequent
     calls to ParseMultipartFormReusable on retry would parse the cached
     original body with the wrong boundary, causing "NextPart: EOF".
   - Fix: ParseMultipartFormReusable now caches the original Content-Type in
     gin context key "_original_multipart_ct" on first call and reuses it for
     all subsequent parses, making multipart parsing retry-safe globally.
   - Sora adaptor reverted to the standard pattern (direct header set/get),
     which is now safe thanks to the root fix.

4. Tests:
   - task_billing_test.go: update makeTask to use OriginModelName; add
     PerCallBilling settlement tests (skip adaptor adjust, skip token recalc);
     add non-per-call adaptor adjustment test with refund verification.
2026-02-22 16:33:00 +08:00
CaIon
809ba92089 refactor(logs): add refund logging for asynchronous tasks and update translations 2026-02-22 16:01:19 +08:00
CaIon
9e3954428d refactor(task): extract billing and polling logic from controller to service layer
Restructure the task relay system for better separation of concerns:
- Extract task billing into service/task_billing.go with unified settlement flow
- Move task polling loop from controller to service/task_polling.go (supports Suno + video platforms)
- Split RelayTask into fetch/submit paths with dedicated retry logic (taskSubmitWithRetry)
- Add TaskDto, TaskResponse generics, and FetchReq to dto/task.go
- Add taskcommon/helpers.go for shared task adaptor utilities
- Remove controller/task_video.go (logic consolidated into service layer)
- Update all task adaptors (ali, doubao, gemini, hailuo, jimeng, kling, sora, suno, vertex, vidu)
- Simplify frontend task logs to use new TaskDto response format
2026-02-22 16:00:27 +08:00
Seefs
e0a6ee1cb8 imporve oauth provider UI/UX (#2983)
* feat: imporve UI/UX

* fix: stabilize provider enabled toggle and polish custom OAuth settings UX

* fix: add access policy/message templates and persist advanced fields reliably

* fix: move template fill actions below fields and keep advanced form flow cleaner
2026-02-22 15:41:29 +08:00
Seefs
11b0788b68 fix 2026-02-22 13:57:13 +08:00
Seefs
c72dfef91e rm editor 2026-02-22 01:48:26 +08:00
Seefs
285d7233a3 feat: sync field 2026-02-22 01:27:58 +08:00
Seefs
81d9173027 feat: redesign param override editing with guided modal and Monaco JSON hints 2026-02-22 01:17:26 +08:00
Seefs
31deb0daac Merge pull request #2973 from RedwindA/feat/modelsdotdev
feat(ratio-sync): support models.dev ratio sync and fix Gemini cache ratios
2026-02-21 14:28:18 +08:00