Commit Graph
6080 Commits
Author SHA1 Message Date
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
CaIon 0d5995eb63 fix(auth): allow read-only access for non-disabled tokens 2026-07-05 13:35:10 +08:00
CaIon 5fc35e28a2 fix(user): harden account email and password handling
- normalize emails (trim + lowercase) and enforce uniqueness across
  registration, OAuth auto-registration, and email binding
- serialize concurrent writers on the same normalized email within a
  transaction to avoid duplicate accounts
- resolve password reset to a single matching account and reject
  ambiguous or absent matches
- require an existing password before self-service password change and
  reject login for accounts without a usable password
2026-07-05 13:15:41 +08:00
同語 1ae757475f fix: align dynamic pricing style with log details dialog sections
Merge pull request #5905 from feitianbubu/pr/e9fa595c7
2026-07-04 23:42:03 +08:00
feitianbubu f52b52b167 fix: align dynamic pricing style with log details dialog sections 2026-07-04 23:18:25 +08:00
Seefs 4ae341756e fix(channels): show field passthrough controls for Codex (#5902) 2026-07-04 19:50:15 +08:00
CaIon bed4a3f916 fix(user): trim whitespace from username and validate input 2026-07-04 16:56:37 +08:00
CaIon 12603a7765 fix(redemption): add status filtering and cleanup action 2026-07-04 16:15:47 +08:00
CaIon 86021d8ed2 Refine default web UI and backend sync handling 2026-07-04 14:57:53 +08:00
同語 722d0366b7 fix(classic): fix classic web build failures
Merge pull request #5892 from QuantumNous/fix/classic-web-build
2026-07-04 08:47:32 +08:00
QuentinHsu a130103948 chore(makefile): rename backend targets to api
- rename Makefile variables and targets from backend to api for naming consistency.
- update dev command messages and reset setup restart flow to use api terminology.
2026-07-04 08:32:43 +08:00
QuentinHsu 997926bbe1 fix(classic): fix classic web build failures
- replace the Slack OAuth icon with FaSlack from react-icons/fa to avoid the missing SiSlack export.
- add a classic Rsbuild alias for date-fns so Semi resolves its compatible date-fns v2 dependency.
2026-07-04 08:25:39 +08:00
同語 b6e8ff9dd5 perf(web): refine channel test dialog interactions
Merge pull request #5886 from QuantumNous/perf/channel-test-dialog-layout
2026-07-04 00:13:17 +08:00
同語 f5bba114c0 chore(web): update default web dependencies
Merge pull request #5884 from QuantumNous/chore/web-default-deps
2026-07-04 00:12:01 +08:00
QuentinHsu c5600f9b11 perf(channels): compact model test row actions
- replace per-model test text buttons with icon-only actions matching the channel list.
- let the action column shrink to its icon content to reduce table width.
2026-07-03 23:40:11 +08:00
QuentinHsu b35dfa32ef perf(channels): streamline channel test dialog layout
- split model test status from result details so failures and latency no longer crowd one column.
- move batch progress into toast updates to keep the dialog height stable during tests.
- consolidate the channel title and model actions to reduce vertical churn.
2026-07-03 23:13:37 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 917a2cff64 chore(deps-dev): bump tmp from 0.2.5 to 0.2.7 in /electron (#5147)
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.5...v0.2.7)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-03 16:57:51 +08:00
CaIon 55858f353c feat: add manual Docker image publishing workflow 2026-07-03 16:54:52 +08:00