- 18 Apr, 2026 4 commits
-
-
Wesley Liddick authored
docs(payment): add Kyren Topup as international EasyPay provider option
-
erio authored
-
erio authored
-
erio authored
Restructure the EasyPay recommendation block to present two options side by side so users can pick by funding channel and settlement currency: - Domestic / CNY — ZPay: official Alipay/WeChat API with 1.6% fee and T+1 automatic settlement (existing recommendation, expanded with fee and settlement details). - International / USDT or USD — Kyren Topup (https://kyren.top): global payment stack supporting WeChat Pay and Alipay with local-currency checkout, USD settlement, and USDT/USD withdrawal. Fees: WeChat 2%, Alipay 2.5%, withdrawal 0.1% ($40 min / $150 max). Fills the gap for users who cannot use domestic Chinese channels or tolerate Stripe's 6%+ fees. Both recommendations share a single disclaimer at the end. The Chinese heading uses "易支付" while the English one keeps "EasyPay".
-
- 17 Apr, 2026 6 commits
-
-
github-actions[bot] authored
-
Wesley Liddick authored
fix:修复上游账号为OpenAI API key时Claude Code调用缓存率低的问题
-
Wesley Liddick authored
refactor: extract ReadUpstreamResponseBody to deduplicate response read + too-large handling
-
Wesley Liddick authored
fix: fix outbox watermark context expiry and add in-batch group rebuild dedup
-
shaw authored
-
shaw authored
-
- 16 Apr, 2026 7 commits
-
-
Elysia authored
Each retry in the SetOutboxWatermark loop now gets its own 5s context. Previously a shared context could already be expired when the second or third attempt ran, making the retries pointless. Co-Authored-By:Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
-
Elysia authored
Fixes #1691 - pollOutbox() reused a 10s context for SetOutboxWatermark after event processing could take much longer, causing "outbox watermark write failed: context deadline exceeded". The watermark never advanced so the same 200 events were reprocessed every poll cycle, spiking CPU. Now uses an independent 5s context with up to 3 retries (200ms apart). - When multiple Codex accounts sharing the same 21-22 groups are all rate-limited in quick succession, each account_changed event triggered redundant bucket rebuild attempts for the same groups. Introduce batchSeenKey{groupID, platform} and thread a seen map through the handler chain; rebuildBucketsForPlatform skips (group, platform) pairs already rebuilt within the same poll batch (~80% fewer rebuild calls in the 5-accounts-same-groups scenario). Co-Authored-By:Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
-
Wesley Liddick authored
fix: preserve openai ws flags in scheduler cache
-
shaw authored
-
shaw authored
-
KnowSky404 authored
-
KnowSky404 authored
-
- 15 Apr, 2026 15 commits
-
-
erio authored
refactor: extract ReadUpstreamResponseBody to deduplicate upstream response read + too-large error handling Consolidates 9 call sites of resolveUpstreamResponseReadLimit + readUpstreamResponseBodyLimited + ErrUpstreamResponseBodyTooLarge error handling into a single ReadUpstreamResponseBody function with TooLargeWriter callback for API-format-specific error responses (Anthropic, OpenAI, countTokens).
-
fjl5 authored
-
github-actions[bot] authored
-
Wesley Liddick authored
修复 OpenAI 账号限流回流误判:7d 窗口可用时不因 5h 窗口为 0 回写 429
-
Wesley Liddick authored
feat(usage): add account cost display to admin dashboard and usage pages
-
Wesley Liddick authored
fix(ui): allow closing test dialog during active SSE stream
-
Wesley Liddick authored
feat(payment): balance recharge multiplier and fee rate
-
erio authored
-
erio authored
- Cost cell: change gray "A $xxx" to orange "成本 $xxx" with i18n - Remove standalone account_cost column from column settings (redundant)
-
erio authored
- UserBreakdownItem: add AccountCost field + SQL aggregation - UserBreakdownSubTable: add orange account cost column - Admin usage table: add account_cost column (after cost, default visible) - Column settings: add account_cost toggle option
-
Wesley Liddick authored
-
erio authored
-
erio authored
- Fix mock for GetModelStatsWithFilters: add account_cost column - Add assertion: GetStatsWithFilters always returns TotalAccountCost - New test: GetModelStatsAccountCostColumn verifies scan of AccountCost - New test: GetGroupStatsAccountCostColumn verifies scan of AccountCost - New test: GetStatsWithFiltersAlwaysReturnsAccountCost (no AccountID filter) - Integration test: add TotalAccountCost/TodayAccountCost assertions - Fix gofmt alignment in usage_log_types.go
-
erio authored
- Add account_cost column to dashboard aggregation tables (migration 107) - DashboardStats: add TotalAccountCost/TodayAccountCost fields - ModelStat/GroupStat: add AccountCost field with SQL aggregation - GetStatsWithFilters: always return TotalAccountCost (remove accountID filter) - Dashboard Token cards: show user(green)/cost(orange)/standard(gray) - Usage stats card: show account cost and standard below main value - Model/Group distribution tables: add orange cost column
-
erio authored
Replace dead EventSource variable with AbortController to enable cancelling fetch streams. Remove close-button disable during connecting status so users can dismiss the dialog at any time.
-
- 14 Apr, 2026 8 commits
-
-
erio authored
-
erio authored
Product name (e.g. "快代码科技工作室 100 元") should show the user's original recharge amount (limitAmount), not the fee-inclusive pay amount. The gateway receives payAmount separately for actual charging.
-
erio authored
-
erio authored
- Fix gofmt alignment in setting_handler.go, settings.go, payment_config_service.go - Add payment_balance_recharge_multiplier and payment_recharge_fee_rate to API contract test expected JSON
-
erio authored
- Show base amount (充值金额) as first line - Show fee amount with percentage when fee_rate > 0 - Show pay_amount (实付金额) in bold primary color - Show credited amount (到账金额) when different from pay_amount - Compute baseAmount and feeAmount from backend order data
-
erio authored
Backend: - Validate recharge_fee_rate: 0 ≤ rate ≤ 100, max 2 decimal places Frontend settings: - Add % suffix icon to fee rate input - Enforce max=100, min=0, step=0.01 with 2 decimal precision
-
erio authored
Backend: - Use cfg.RechargeFeeRate in order creation instead of hardcoded 0 - Remove dead getFeeRate stub method - All amounts computed server-side: order_amount, pay_amount, fee_rate Frontend - PaymentView: - Read recharge_fee_rate from checkout-info API (not per-method) - Show fee breakdown only when fee_rate > 0 - Show credited amount only when multiplier ≠ 1 Frontend - Order display (user + admin): - Fix fee_rate * 100 bug (fee_rate is already a percentage) - OrderTable: show pay_amount as primary, fee/credited as sub-lines - AdminOrderDetail: full breakdown (base/fee/paid/credited) - AdminRefundDialog: label "到账金额" for clarity - PaymentResultView: show pay_amount with fee info Types + i18n: - Add recharge_fee_rate to CheckoutInfoResponse - Add fee_rate to CreateOrderResult - Add translations: creditedAmount, fee, baseAmount, includedInPayAmount
-
erio authored
- Add recharge_fee_rate system setting (percentage fee on top of recharge amount) - Full backend chain: config constant, PaymentConfig struct, update validation, read/write persistence, DTO, handler GET/PUT responses - Frontend: settings input with preview, i18n (zh/en), API types - Fix provider card toggle layout: labels above switches to save width - Fix Chinese translation: "EasyPay" → "易支付" in provider description
-