5663 Commits

Author SHA1 Message Date
Calcium-Ion
86cfb3920e
Merge pull request #4468 from seefs001/feature/ali-anthropic-messsages-model-configure
feat: configure native messages model matching for ali
2026-04-26 20:19:37 +08:00
Calcium-Ion
097a50ebdc
fix: clarify affinity disabled channel retry message (#4453) 2026-04-26 20:18:02 +08:00
Seefs
f424f906d8
feat: sync upstream pricing from pricing endpoint (#4452)
* feat: sync upstream pricing from pricing endpoint

* feat: sync upstream pricing with expression priority

* fix: add feedback while syncing upstream pricing

* fix: show loading state for empty upstream pricing sync
2026-04-26 20:17:35 +08:00
Calcium-Ion
cc4ad6c39e
Merge pull request #4437 from seefs001/fix/channel-upstream-model-sync
fix(channel): load model mapping during upstream model checks
2026-04-26 20:17:14 +08:00
Seefs
62d4b63fc3
feat: configure native messages model matching 2026-04-26 13:37:59 +08:00
Seefs
355307223a
fix: clarify affinity disabled channel retry message 2026-04-25 17:43:42 +08:00
CaIon
f2f3410dcf
feat: add len variable for tier conditions and LLM prompt helper
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
v0.13.1-patch.1
2026-04-25 13:24:20 +08:00
CaIon
a7c38ec851
fix: add PaymentProvider field to prevent cross-gateway callback attacks
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
EPay allows users to switch payment methods (e.g. wxpay→alipay) during
checkout, causing callback rejection. Replace fragile blocklist guard
with a PaymentProvider field on TopUp and SubscriptionOrder that
identifies which gateway created the order.
v0.13.1
2026-04-24 22:16:16 +08:00
Seefs
095e1920f1
fix(channel): load model mapping during upstream model checks 2026-04-24 17:51:46 +08:00
Calcium-Ion
8993386743
feat: support DeepSeek V4 reasoning suffix handling (#4428) 2026-04-24 17:06:59 +08:00
HynoR
435d7ae0dd
feat: support DeepSeek V4 reasoning suffix handling 2026-04-24 16:50:35 +08:00
CaIon
3a2138ba61
refactor: rename and relocate HasModelBillingConfig function for clarity 2026-04-24 16:39:12 +08:00
yyhhyyyyyy
e3d64cb76d
Merge pull request #4431 from yyhhyyyyyy/fix/tiered-billing-model-list
fix: include tiered billing models in model listing
2026-04-24 16:24:36 +08:00
Calcium-Ion
2e610e5fb3
Merge pull request #4426 from feitianbubu/pr/86489c09a85b2b3c6e4c27f3fdeda866258c19f4
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
fix: model pricing use correct display type
v0.13.0
2026-04-24 14:03:33 +08:00
Calcium-Ion
05b0041de2
Merge pull request #4414 from jingx8885/codex/fix-gpt-55-completion-ratio
fix: correct gpt-5.5 completion ratio
2026-04-24 14:02:23 +08:00
Calcium-Ion
ec8f3dceaa
Merge pull request #4412 from xyfacai/fix/image-n
fix(image): only price image model use N ratio
2026-04-24 14:01:56 +08:00
feitianbubu
63ce2db988
fix: model pricing use correct display type 2026-04-24 13:48:09 +08:00
yesone
df6d862895 fix: correct gpt-5.5 completion ratio 2026-04-24 09:11:33 +08:00
Xyfacai
69ba18d392 fix(image): only price image model use N ratio 2026-04-24 01:24:14 +08:00
Calcium-Ion
65b1654732
Merge pull request #4409 from QuantumNous/nightly
feat: support for tiered billing expressions in the billing system
2026-04-24 00:34:52 +08:00
CaIon
eab478bdc8
fix: miscellaneous quick fixes from CodeRabbit review
- log_info_generate.go: add nil guard in InjectTieredBillingInfo
- billing_expr_request.go: merge headers instead of replacing
- go.mod: remove incorrect // indirect on expr-lang/expr
- ToolPriceSettings.jsx: add null check in syncToVisual
- tool_billing.go: fix PricePer1K for image_generation (per-call, not per-1K)
- utils.jsx: add minute() to time condition regex
- useUsageLogsData.jsx: pass displayMode to renderTieredModelPrice
- AGENTS.md, CLAUDE.md: fix Rule 6/7 ordering
- relay-gemini.go: add TEXT modality case in CandidatesTokensDetails
2026-04-24 00:34:06 +08:00
CaIon
3e5f2ee1d6
fix(billing): correct tiered billing settlement and edge cases
- quota.go: add missing SettleBilling call in PostWssConsumeQuota
- text_quota.go: gate InjectTieredBillingInfo on tieredBillingApplied bool
  instead of tieredResult != nil, so fallback billing still logs metadata
- price.go: remove quotaBeforeGroup == 0 from freeModel condition to avoid
  bypassing settlement for output-only expressions
- tiered_settle.go: split cc/cc1h subtraction using UsageSemantic to
  distinguish OpenAI vs Claude cache creation token formats
- pricing.go: only set BillingMode when a non-empty expression exists
- useModelPricingEditorState.js: only write billing_mode when
  finalBillingExpr is non-empty
2026-04-24 00:33:54 +08:00
CaIon
8eeae00737
fix: resolve runtime crashes in render.jsx and TieredPricingEditor.jsx
- render.jsx: change const destructuring of completionRatio/audioRatio to
  use raw names with ?? 0 defaults, preventing "Assignment to constant
  variable" errors in renderModelPrice, renderAudioModelPrice, and
  renderClaudeModelPrice
- TieredPricingEditor.jsx: add missing MATCH_GTE import, remove misleading
  alias help text, preserve conditions for single-tier configs
2026-04-24 00:33:41 +08:00
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
Calcium-Ion
55b7e485c1
Merge pull request #4162 from yyhhyyyyyy/fix/tiered-text-tool-surcharge
fix(billing): preserve text tool surcharges in tiered settlement
2026-04-23 19:01:13 +08:00
CaIon
5c4ed5be99
fix(billing): use tieredQuota fallback in composeTieredTextQuota error path
Remove the intermediate branch that recomputed quota from
EstimatedQuotaBeforeGroup when tieredResult is nil. This discarded the
FinalPreConsumedQuota fallback that TryTieredSettle already selected.
Now the error path simply adds tool surcharges to the passed-in
tieredQuota, preserving the existing fallback semantics.

Also removes unrelated mise.toml and adds a test covering the error
fallback with a pre-consumed quota that differs from the estimate.
2026-04-23 18:59:48 +08:00
Calcium-Ion
11f8d42d66
Merge pull request #4401 from XiaoAI1024/codex/legacy-token-key-compat
Relax token key column length for legacy migration compatibility
2026-04-23 13:32:45 +08:00
XiaoAI1024
49474520ec
Protect external token migration tests 2026-04-23 13:29:00 +08:00
XiaoAI1024
0feb6f2c3c
Add cross-database token migration tests 2026-04-23 13:29:00 +08:00
XiaoAI1024
81ddf6e722
Add legacy token migration test 2026-04-23 13:29:00 +08:00
XiaoAI1024
2431efc01f
Support longer legacy token keys 2026-04-23 13:29:00 +08:00
Calcium-Ion
01c2e909a0
Merge pull request #4399 from QuantumNous/dependabot/npm_and_yarn/electron/xmldom/xmldom-0.8.13
chore(deps-dev): bump @xmldom/xmldom from 0.8.12 to 0.8.13 in /electron
2026-04-23 12:43:28 +08:00
Calcium-Ion
e2e479c11d
Merge pull request #4397 from QuantumNous/dependabot/go_modules/github.com/jackc/pgx/v5-5.9.2
chore(deps): bump github.com/jackc/pgx/v5 from 5.9.0 to 5.9.2
2026-04-23 12:43:16 +08:00
dependabot[bot]
346de02683
chore(deps-dev): bump @xmldom/xmldom from 0.8.12 to 0.8.13 in /electron
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.12 to 0.8.13.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.12...0.8.13)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-version: 0.8.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 02:02:02 +00: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
Calcium-Ion
3afa439b5c
Merge pull request #4372 from feitianbubu/pr/723d3fea3a4c9092187f745fa8ac4a5e9ef1dc35
增加令牌最后使用时间
2026-04-23 00:34:31 +08:00
Calcium-Ion
2d4bdd297b
Show user ID in admin topup bills (#4349) 2026-04-23 00:33:38 +08:00
Seefs
1d83b5472a
fix: require proper verification for passkey changes (#4393)
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
v0.12.15
2026-04-22 22:55:06 +08:00
Seefs
e729b22197
fix: refresh codex credentials for auto-disabled channels (#4324) 2026-04-22 22:54:52 +08:00
Seefs
5f67d2a28b
fix: use stream for codex auto test (#4325) 2026-04-22 22:54:41 +08:00
Seefs
d586a567e4
chore: refine codex usage modal layout (#4386)
* chore: refine codex usage modal layout

* fix: polish codex usage modal responsiveness
2026-04-22 22:54:28 +08:00
gaoren002
6afaa58d28
fix(topup): import missing Tag in recharge card (#4388) 2026-04-22 22:22:09 +08:00
feitianbubu
b60bc94f9c
feat: show last used time column in tokens table 2026-04-21 17:20:26 +08:00
uskyu
600ae85998
Show user ID in admin topup bills 2026-04-20 00:14:19 +08:00
Seefs
f995a868e4
Merge pull request #4089 from seefs001/feature/waffo-pay
rafactor: payment
2026-04-18 14:22:54 +08:00
Seefs
5b9dcf1bda
Merge pull request #4311 from KoellM/fix-gemini-3-toolconfig
fix(gemini): add IncludeServerSideToolInvocations field to ToolConfig
2026-04-18 01:13:48 +08:00
CaIon
d75a046791
chore(docker-compose): set default redis password
Enable Redis requirepass in the compose template and embed the matching
credential in REDIS_CONN_STRING, aligning with the existing PostgreSQL
default password pattern so out-of-the-box deployments are not left with
an unauthenticated Redis instance.
2026-04-18 00:56:07 +08:00
CaIon
209645e26b
feat(topup-log): add NODE_NAME env var for audit logs
Introduce NODE_NAME environment variable to identify node identity in top-up
audit logs, improving readability over auto-detected container internal IPs
in Docker/K8s deployments. Surface node_name in admin expanded log rows and
add it as a commented example to docker-compose.yml.
2026-04-18 00:51:04 +08:00
CaIon
6ff8c7ab03
fix(topup-log): keep row expandable and warn admins on legacy logs
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
Top-up logs written by pre-upgrade instances have no admin_info, which
made the expanded row empty and the row un-expandable. For admins, always
emit an entry: either the audit fields from admin_info when present, or a
warning prompting the operator to upgrade the instance so audit fields
(server IP, callback IP, payment method, system version) are recorded.
v0.12.14
2026-04-18 00:36:05 +08:00
CaIon
c31343ac76
fix(log): hide admin identity in user-visible management logs
Admin username/ID was embedded directly into the log Content for
quota changes and forced 2FA disable, leaking the operator's
identity to the target user via their own usage log page.

Move operator info into Other.admin_info so formatUserLogs strips
it for non-admin viewers, and render it in the expand panel only
for admins as "操作管理员".

Closes #4301
2026-04-18 00:16:52 +08:00