Commit Graph
6248 Commits
Author SHA1 Message Date
同語 0cb741d8da perf(model-pricing): optimize upstream price sync tables (#6092)
Merge pull request #6092 from QuantumNous/perf/model-pricing-sync-table
2026-07-11 00:49:03 +08:00
QuentinHsu 6869cd94b2 perf(web): align table badge spacing
- remove built-in horizontal padding from status badges so table columns align with headers.
- drop legacy negative-margin compensation from badge cells and affected table renderers.
- clean touched table components to satisfy lint rules around type imports, keys, and JSX flow.
2026-07-11 00:28:21 +08:00
QuentinHsu 43783286e5 fix(model-pricing): polish sync channel dialog layout
- keep input focus and invalid rings inside the shared Input component to avoid clipping in constrained containers.
- make the sync channel selector table use a fixed header, internal body scrolling, and fixed pagination inside the dialog.
- align status cells with their header and translate channel status labels through existing i18n keys.
2026-07-10 23:56:18 +08:00
QuentinHsu 489c045842 perf(model-pricing): optimize upstream price sync table
- batch select and unselect operations into single state updates to reduce lag with large model lists.
- align current price and upstream preset rows by rendering the same ordered field set.
- switch the table to a fixed header, internal body scrolling, and fixed pagination layout with compact upstream header counts.
- hide synthesized preset internal IDs and count only effective selectable resolutions.
2026-07-10 23:37:11 +08:00
同語 f2c7cd33c8 fix: remove sample special usable groups leaking into pricing page (#5906)
Merge pull request #5906 from feitianbubu/fix/pricing-sample-special-usable-group
2026-07-10 23:33:00 +08:00
同語 d3b01b483d fix: allow adding model names that differ only by case in multi-select (#6061)
Merge pull request #6061 from feitianbubu/pr/c33b40b70
2026-07-10 23:30:15 +08:00
同語 4823417cf7 feat(playground): add playground parameter settings panel (#6044)
Merge pull request #6044 from QuantumNous/feat/playground-parameter-panel
2026-07-10 23:28:44 +08:00
feitianbubu e8596cab7e fix: allow adding custom model names that differ only by case 2026-07-10 10:55:15 +08:00
Seefs 4e570389dd fix: use GORM v2 row locking for subscription resets (#6057)
* fix: use GORM v2 row locking for subscription resets

* docs: codify GORM row locking rules
2026-07-10 10:21:00 +08:00
QuentinHsu 928b475075 feat(playground): add chat parameter settings panel
- expose playground controls for sampling, penalty, token, and seed parameters.
- reuse the existing persisted config and parameter-enabled state so requests only send enabled values.
- add localized parameter copy and keep the panel scrollable on short screens.
2026-07-09 22:10:03 +08:00
feitianbubu 246d62aa5e chore: remove dead files resurrected by v1.0 launch commit (#6041)
controller/task_video.go and service/pre_consume_quota.go were already
removed in ba25ba88f and 116004fd4 (logic lives in service/task_polling.go
and BillingSession now), then brought back as stale copies by a42b39760.
Both have zero callers.

controller/swag_video.go is a leftover swag stub: the swaggo pipeline is
gone and docs/openapi/relay.json already documents these routes.
2026-07-09 22:03:45 +08:00
QuentinHsu 4645ad9df5 fix(playground): keep model selector lists in sync
- constrain the desktop selector panel so long group and model lists scroll within a shared height.
- make the selected model stand out with stronger row and label styling.
- scroll both lists to the active selections after the popover opens.
2026-07-09 21:47:43 +08:00
CaIon a79f96919e fix(affiliate): update referral message 2026-07-09 16:49:53 +08:00
zuiho df01273b94 fix(web): let resized tables fill available width (#6031)
Signed-off-by: zuiho <2324465096@qq.com>
2026-07-09 16:26:56 +08:00
zuiho 8739c05c0e feat(web): 支持渠道列表手动调整列宽 (#5948)
* 支持渠道表格列宽拖拽

* fix(web): address column resize review feedback

* feat(web): auto-fit resized table columns

* fix(web): reduce column resize persistence work

---------

Signed-off-by: zuiho <2324465096@qq.com>
2026-07-08 16:15:49 +08:00
CaIon 97bbb7c8cd feat(pricing): enhance dynamic pricing calculations with group selection support 2026-07-08 15:11:32 +08:00
Rāna(Bass Ver.) 28e0115a08 fix(web): prevent browser translation from mutating React roots (#5963) 2026-07-08 12:57:31 +08:00
CaIon 6a437a337d feat(oauth): add OAuth callback URL display and copy functionality 2026-07-08 12:50:57 +08:00
CaIon 57865fc1f8 fix: restore default channel connection paste 2026-07-08 12:39:23 +08:00
CaIon 6ce7305cd3 feat(price): add token ratios for GPT-5.6 models 2026-07-07 21:42:28 +08:00
A_Words 90fa6fe6b6 fix(wallet): honor configured quota units for reward transfers (#5808)
* fix(wallet): honor configured quota units for reward transfers

* fix(i18n): localize quota preview descriptions

* fix(settings): normalize invalid quota input
2026-07-07 21:40:58 +08:00
Seefs a72e5082e9 feat(system-info): add stale instance cleanup actions (#5953) 2026-07-07 21:22:49 +08:00
CaIon fc1259f583 refactor(price): improve handling of other ratios in PriceData 2026-07-07 21:22:19 +08:00
feitianbubu 394b023dbf fix: keep group ratio input as string draft to allow decimal typing (#5995)
The ratio column normalized input to number on every keystroke, so
typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the
value as a string draft like the top-up ratio column and only convert
to number when serializing.

Fixes #5986
2026-07-07 21:12:54 +08:00
CaIon 2f5f6ba84f feat: prepare for 5.6 2026-07-07 20:57:08 +08:00
CaIon 8bc4bf1d6b feat(docker): add cosign for signing manifests and update permissions 2026-07-07 20:08:27 +08:00
CaIon 3fbad6a72f fix(price): add default token estimate for tiered expression pre-consume 2026-07-07 15:42:21 +08:00
CaIon becc18e300 fix(i18n): add language detection mapping for Chinese locales 2026-07-07 14:02:09 +08:00
CaIon 8f31b30598 fix(i18n): standardize locale formatting for Intl APIs 2026-07-07 13:40:06 +08:00
CaIon 5cbb7b0be1 docs: update system architecture requirements 2026-07-07 13:15:04 +08:00
CaIon 48b7f4918f fix(billing): adjust quota calculation to prevent exceeding int32 limits 2026-07-07 13:11:55 +08:00
Seefs 9b93d61b7f feat(subscription): add admin quota reset actions (#5952)
* feat(subscription): add admin quota reset actions

* fix(subscription): keep quota reset in plan row actions

* refactor(subscription): move user subscription actions into menu
2026-07-07 12:47:41 +08:00
Meow Tech Open Source by NovaMeow d1abf78ec0 Localized new ui to zh-TW (#5942)
* Create zh-TW.json

* Update _sync-report.json

* Update languages.ts

* Update config.ts

* fix(i18n): update language codes and improve translations for zh-CN and zh-TW
2026-07-07 12:46:02 +08:00
CaIon 70ea899e37 fix(model): centralize row locking in transactional flows 2026-07-07 12:40:09 +08:00
CaIon bae799ccb1 fix(billing): surface quota saturation events for admin auditing
Thread int32 saturation clamps from tiered settlement and video task
recompute into the consume/task logs under admin_info, so oversized or
malformed billing inputs stay auditable. Clamp negative audio duration
before token conversion and gate the saturation UI markers on admin.
2026-07-07 12:20:07 +08:00
CaIon c9943d37ad fix(billing): extend quantity validation and saturating conversions to remaining paths
Bound max-tokens fields across all relay format validators, saturate
tiered-expression rounding and audio/tool/task token conversions, and
route legacy remix ratios through the guarded setter.
2026-07-07 01:08:52 +08:00
CaIon d0bd8aac74 fix(billing): validate quantity parameters and harden quota calculations
Bound user-supplied count/duration parameters at request validation,
route ratio multipliers through guarded setters, and use saturating
int conversions in all quota math paths.
2026-07-07 00:21:06 +08:00
Seefs 45f0484dc1 Fix/build date dns error (#5945)
* Revert "fix(classic): fix classic web build failures"

This reverts commit 997926bbe1.

* fix(classic): use available Slack icon export
2026-07-06 22:32:26 +08:00
SeefsandCaIon 153d7f01a2 fix: avoid stale stream writes after client disconnect (#5710)
* fix: avoid stale stream writes after client disconnect

* fix: wait for stream ping goroutines before returning

* fix: log stream results after goroutine cleanup

* fix: broadcast stream stop signals

* fix: abort upstream on client disconnect and restore write error contracts

Keep the goroutine-lifecycle fix (unconditional wg.Wait before returning the
gin.Context, close resp.Body inside cleanup), but drop the drain-on-disconnect
behavior: when the client goes away, cleanup now runs immediately so the
upstream body is closed, the provider stops generating, and users are not
billed for tokens produced after they disconnected.

Also restore FlushWriter/StringData/PingData returning an error when the
request context is done, so non-scanner relay loops (ollama, fake-stream,
audio, image) keep their disconnect awareness instead of silently consuming
the upstream to completion. ResponseChunkData now propagates write errors.

Add a bounded per-write deadline (http.NewResponseController) before each
locked stream write so a slow-but-connected client cannot block a write
forever and hang the unconditional wg.Wait.

---------

Co-authored-by: CaIon <i@caion.me>
2026-07-06 21:40:23 +08:00
CaIon fc26b88fd1 feat(group): enhance group ratio editor with improved visibility rules and JSON parsing 2026-07-06 16:22:18 +08:00
Gravirei 1e80ce03e8 feat: optimize legacy top-up warning banner copy (#5851) (#5855)
* feat: optimize legacy top-up warning banner copy (#5851)

* fix(i18n): use standard Latin period at the end of Vietnamese translations
2026-07-06 15:03:54 +08:00
乾Land贺. 3a876d6f31 fix(web): redirect authenticated users away from sign-up page (#5910)
The sign-in route already redirects logged-in users to /dashboard in its
beforeLoad guard, but the sign-up route (and its /register alias) had no
such guard, leaving authenticated users on the registration form. This
mirrors the classic theme's AuthRedirect behavior. Add an equivalent
beforeLoad guard using the same useAuthStore, redirecting to /dashboard
for consistency with the sign-in route.

Closes #5908

Co-authored-by: 贺. <kuang@M1.local>
2026-07-06 14:57:36 +08:00
CaIon df087b022d feat(ssrf): implement SSRF protection in HTTP clients and validation functions 2026-07-06 14:52:01 +08:00
CaIon 1e11dfcfb5 feat(user): better messages for redeem failures 2026-07-06 14:52:01 +08:00
olwater 17465b855f fix(html): 修复 Shadow DOM 隔离渲染下深浅色模式无法自动切换的问题 (#5890)
Shadow DOM 的样式隔离特性导致外部 html 元素上的 dark class 无法被
Shadow DOM 内部的 Tailwind dark: 选择器匹配到。通过 MutationObserver
监听 document.documentElement 的 class 变化,将 dark class 同步到
Shadow DOM 内的包装容器上,使深色模式样式正常生效。
2026-07-06 14:00:31 +08:00
G.RQ 2f91d8ccb3 fix(web): sync home iframe theme and language (#5917) 2026-07-06 13:57:20 +08:00
feitianbubu 043720f9be fix: 任务差额结算后 quota 和阿里视频时长优化 (#5923)
* fix: apply default ali video duration when value is non-positive

* fix: persist task quota after async settlement
2026-07-06 11:49:24 +08:00
CaIon 2281c9e3d8 fix(web): refine mobile user cards 2026-07-05 15:02:08 +08:00
CaIon 4a64b87072 test(user): cover self-service password update guard
Pin down the checkUpdatePassword contract:

- changing a password requires the correct current password
- OAuth/passwordless accounts (empty password hash) cannot set a
  password through the self-service endpoint and must use the password
  reset flow instead
- setupLogin never writes back the password column

These guard against regressing the password-change path back into a
short-circuit that lets passwordless accounts set a password directly.
2026-07-05 13:53:25 +08:00
CaIon 56dbaab1d4 feat(session): support opt-in Secure session cookies
- add SESSION_COOKIE_SECURE / SESSION_COOKIE_TRUSTED_URL env vars with
  startup validation: enabling Secure requires at least one trusted
  HTTPS entry URL
- wire common.SessionCookieSecure into the session cookie store instead
  of a hardcoded Secure=false
- print a startup warning when Secure session cookies are disabled
- document the new settings in .env.example and docker-compose files

Secure stays off by default because many deployments front new-api with
plain-HTTP reverse proxies, where a hardcoded Secure default would break
logins entirely; enabling it safely depends on the deployment's TLS
setup, so it ships as an opt-in deployment-hardening flag.
2026-07-05 13:53:16 +08:00