1. 12 Apr, 2026 2 commits
    • github-actions[bot]'s avatar
      ad64190b
    • bot's avatar
      fix: handle Anthropic credit balance exhausted (400) as account error · cb016ad8
      bot authored
      When an Anthropic API key's credit balance is depleted, the upstream
      returns HTTP 400 with message containing "credit balance". Previously,
      the 400 handler only checked for "organization has been disabled",
      so credit-exhausted accounts kept being scheduled — every request
      returned the same error.
      
      Treat this case identically to 402 (Payment Required): call
      handleAuthError → SetError to stop scheduling the account until
      an admin manually recovers it after topping up credits.
      
      Closes #1586
      cb016ad8
  2. 11 Apr, 2026 5 commits
    • erio's avatar
      chore: remove all sora dead code and fork-specific sora_client_enabled · d67ecf89
      erio authored
      Upstream removed sora feature (090_drop_sora.sql) but left i18n keys
      and wire.go references. Clean up:
      - Remove entire sora i18n block from en.ts and zh.ts (~190 lines)
      - Remove sora nav key and unused 'data' settings tab key
      - Remove sora_client_enabled from settings (fork-specific)
      - Remove SoraMediaCleanupService from wire.go
      d67ecf89
    • erio's avatar
      feat(payment): add H5/mobile payment support · 75155903
      erio authored
      Backend:
      - Parse EasyPay `payurl2` field, prefer H5 link on mobile
      - Add `device=mobile` to EasyPay submit.php (popup) mode
      - Expand isMobile detection keywords (add ipad/ipod)
      
      Frontend:
      - Add `isMobileDevice()` utility (userAgentData + UA regex)
      - Mobile + pay_url: direct redirect instead of QR/popup
      - Popup blocked fallback: auto-redirect when window.open fails
      - Stripe WeChat Pay: dynamic client param (mobile_web vs web)
      75155903
    • erio's avatar
      refactor(payment): code standards fixes and regression repairs · e3a000e0
      erio authored
      Backend:
      - Split payment_order.go (546→314 lines) into payment_order_lifecycle.go
      - Replace magic strings with constants in factory, easypay, webhook handler
      - Add rate limit/validity unit constants in payment_order_lifecycle, payment_service
      - Fix critical regression: add PaymentEnabled to GetPublicSettings response
      - Add missing migration 099_fix_migrated_purchase_menu_label_icon.sql
      
      Frontend:
      - Fix StripePopupView.vue: replace `as any` with typed interface, use extractApiErrorMessage
      - Fix AdminOrderTable.vue: replace hardcoded column labels with i18n t() calls
      - Fix SubscriptionsView.vue: replace hardcoded Today/Tomorrow with i18n
      - Extract duplicate statusBadgeClass/canRefund/formatOrderDateTime to orderUtils.ts
      - Add missing i18n keys: common.today, common.tomorrow, payment.orders.orderType/actions
      - Remove dead PurchaseSubscriptionView.vue (replaced by PaymentView)
      e3a000e0
    • erio's avatar
      fix(payment): resolve PR audit issues · e1547d78
      erio authored
      - Add payment navigation to AppSidebar (user orders + admin payment menu group with collapse)
      - Add 5 missing nav i18n keys (myOrders, orderManagement, paymentDashboard, paymentConfig, paymentPlans)
      - Renumber payment migrations 090-100 → 092-102 to avoid conflict with upstream 090/091
      - Remove non-payment sora_client_enabled change, restore upstream purchase_subscription fields
      - Remove extra 'data' from SettingsTab type union
      e1547d78
    • erio's avatar
      feat(payment): add complete payment system with multi-provider support · 63d1860d
      erio authored
      Add a full payment and subscription system supporting EasyPay (Alipay/WeChat),
      Stripe, and direct Alipay/WeChat Pay providers with multi-instance load balancing.
      63d1860d
  3. 10 Apr, 2026 4 commits
  4. 09 Apr, 2026 17 commits
  5. 08 Apr, 2026 6 commits
    • ius's avatar
      265687b5
    • github-actions[bot]'s avatar
      0d69c0cd
    • shaw's avatar
      fix: resolve errcheck lint and add missing enable_cch_signing to test · b982076e
      shaw authored
      - Suppress errcheck for xxhash Digest.Write (never returns error)
      - Add enable_cch_signing field to settings API contract test
      b982076e
    • shaw's avatar
      fix: bump Go from 1.26.1 to 1.26.2 to resolve 6 stdlib CVEs · 7060596a
      shaw authored
      Fixes GO-2026-4947, GO-2026-4946, GO-2026-4870, GO-2026-4869,
      GO-2026-4866, GO-2026-4865 in crypto/x509, crypto/tls, archive/tar,
      and html/template.
      7060596a
    • shaw's avatar
      feat: sync billing header cc_version with User-Agent and add opt-in CCH signing · e51c9e50
      shaw authored
      - Sync cc_version in x-anthropic-billing-header with the fingerprint
        User-Agent version, preserving the message-derived suffix
      - Implement xxHash64-based CCH signing to replace the cch=00000
        placeholder with a computed hash
      - Add admin toggle (enable_cch_signing) under gateway forwarding settings,
        disabled by default
      e51c9e50
    • shaw's avatar
      fix: 修复非CC客户端OAuth伪装被Anthropic检测为第三方应用的问题 · 1c9a2128
      shaw authored
      commit f3aa54b7 的 rewriteSystemForNonClaudeCode 未能通过 Anthropic 第三方检测,
      根因是两个关键信号与真实 Claude Code 不一致:
      
      1. anthropic-beta 头缺少 claude-code-20250219:伪装路径主动将该 beta
         加入 drop set 并移除,但 Anthropic 依赖此 beta 识别 Claude Code 请求。
         修复:非 haiku 模型的伪装请求强制包含 claude-code beta。
      
      2. system 字段使用 string 格式而非 array+cache_control:真实 Claude Code
         始终以 [{type,text,cache_control:{type:"ephemeral"}}] 发送 system,
         string 格式成为第三方检测信号。
         修复:rewriteSystemForNonClaudeCode 改为注入 array 格式。
      
      附带调整:stripSystemCacheControl 按 system 是否被重写动态决定,
      重写时保留 CC prompt 的 cache_control,未重写时(haiku/已含CC前缀)
      保持原有剥离行为。
      1c9a2128
  6. 07 Apr, 2026 6 commits