erio
ec9dfb0d3f
feat(web): support local file override for embedded static assets
...
Add override directory (data/public/) that takes precedence over
embed FS, allowing per-deployment static file customization via
docker volume mounts without rebuilding the image.
2026-03-15 19:25:43 +08:00
erio
ccffa0640a
chore: bump version to 0.1.99.6
2026-03-15 19:05:13 +08:00
erio
1394ae6535
fix(ops): align constant declarations for gofmt compliance
2026-03-15 19:05:02 +08:00
erio
3caa91985c
chore: bump version to 0.1.99.5
2026-03-15 18:44:38 +08:00
erio
5f60a1ad27
fix(ops): match "insufficient account balance" in error filter
...
The upstream Gemini API returns "Insufficient account balance" which
doesn't contain the substring "insufficient balance". Add explicit
match for the full phrase to ensure the filter works correctly.
2026-03-15 18:44:25 +08:00
erio
9f573fed55
chore: bump version to 0.1.99.4
2026-03-15 17:42:18 +08:00
erio
c23a6720cf
fix(i18n): correct insufficient balance error hint text
...
Remove misleading "upstream" wording - the error is about client API key
user balance, not upstream account balance.
2026-03-15 17:42:06 +08:00
erio
77a9b4f420
chore: bump version to 0.1.99.3
2026-03-15 17:35:10 +08:00
erio
6ba6fa5873
feat(ops): add ignore insufficient balance errors toggle and extract error constants
...
- Add 5th error filter switch IgnoreInsufficientBalanceErrors to suppress
upstream insufficient balance / insufficient_quota errors from ops log
- Extract hardcoded error strings into package-level constants for
shouldSkipOpsErrorLog, normalizeOpsErrorType, classifyOpsPhase, and
classifyOpsIsBusinessLimited
- Define ErrNoAvailableAccounts sentinel error and replace all
errors.New("no available accounts") call sites
- Update tests to use require.ErrorIs with the sentinel error
2026-03-15 17:34:57 +08:00
erio
7a5b9cffe5
chore: bump version to 0.1.99.2
2026-03-14 22:51:41 +08:00
erio
cfb8135b13
fix(frontend): pass missing reset mode props to QuotaLimitCard
...
Add dailyResetMode, dailyResetHour, weeklyResetMode, weeklyResetDay,
weeklyResetHour, and resetTimezone bindings to the apikey/bedrock
QuotaLimitCard instances in CreateAccountModal and EditAccountModal.
2026-03-14 22:51:27 +08:00
erio
b4452d656b
fix(test): correct 401 escalation test for Gemini platform
...
The test case was named "antigravity_stays_temp" but used PlatformGemini,
which should escalate on 401 second hit per upstream logic.
2026-03-14 21:14:45 +08:00
erio
085c0d7e17
chore: bump version to 0.1.99.1
2026-03-14 21:03:20 +08:00
erio
25a0030450
Merge branch 'main' into release/custom-0.1.99
...
# Conflicts:
# backend/cmd/server/wire_gen.go
# backend/cmd/server/wire_gen_test.go
# backend/internal/handler/dto/mappers.go
# backend/internal/service/ratelimit_service.go
# backend/internal/service/ratelimit_service_401_db_fallback_test.go
# backend/internal/service/ratelimit_service_401_test.go
# frontend/src/components/account/AccountCapacityCell.vue
# frontend/src/components/account/CreateAccountModal.vue
# frontend/src/components/account/EditAccountModal.vue
# frontend/src/views/admin/DataManagementView.vue
2026-03-14 21:03:09 +08:00
erio
43449ebe16
fix(ops): tune aggregation constants to prevent PG overload
...
Increase MAX(bucket_start) query timeout from 3s to 5s and shrink
backfill window from 30 days to 1 hour.
2026-03-14 20:55:04 +08:00
shaw
6da5fa01b9
fix(frontend): 修复运维设置对话框保存按钮始终禁用的问题
...
后端默认 alert.enabled=true 但 recipients 为空,前端验证将其视为
错误并阻断保存按钮。移除该阻断性验证,改为保存时自动禁用无收件人
的邮件通知配置。
2026-03-14 20:39:29 +08:00
shaw
616930f9d3
refactor(frontend): 将备份和数据管理页面合并为设置页的标签页
...
将独立的 /admin/backup 和 /admin/data-management 页面整合到设置页,
作为「备份」和「Sora 存储」标签页,减少侧边栏条目,集中管理配置。
- 移除 BackupView 和 DataManagementView 的 AppLayout 包装
- 在 SettingsView 中以子组件形式嵌入,使用 v-show 切换标签
- 删除独立路由和侧边栏菜单入口
- 备份/数据标签页下隐藏主保存按钮(各自有独立保存)
- 优化标签栏样式适配7个标签,PC端支持细滚动条
- 清理未使用的图标组件和 i18n 键
2026-03-14 20:22:39 +08:00
Wesley Liddick
b9c31fa7c4
Merge pull request #999 from InCerryGit/fix/enc_coot
...
fix: handle invalid encrypted content error and retry logic.
2026-03-14 19:29:07 +08:00
Wesley Liddick
17b339972c
Merge pull request #1000 from touwaeriol/fix/ops-agg-tuning
...
fix(ops): tune aggregation constants to prevent PG overload
2026-03-14 19:03:03 +08:00
shaw
39f8bd91b9
fix: remove unused saveRecords method to pass lint
2026-03-14 19:01:27 +08:00
Wesley Liddick
aa4e37d085
Merge pull request #966 from GuangYiDing/feat/db-backup-restore
...
feat: 数据库定时备份与恢复(S3 兼容存储,支持 Cloudflare R2)
2026-03-14 18:58:56 +08:00
erio
f59b66b7d4
fix(ops): tune aggregation constants to prevent PG overload
...
Increase MAX(bucket_start) query timeout from 3s to 5s to reduce
timeout-induced fallbacks. Shrink backfill window from 30 days to
1 hour so that fallback recomputation stays lightweight instead of
scanning the entire retention range.
2026-03-14 18:47:37 +08:00
InCerry
8f0ea7a02d
Merge branch 'main' into fix/enc_coot
2026-03-14 18:46:33 +08:00
Wesley Liddick
a1dc00890e
Merge pull request #944 from miraserver/feat/backend-mode
...
feat: add Backend Mode toggle to disable user self-service
2026-03-14 17:53:54 +08:00
Wesley Liddick
dfbcc363d1
Merge pull request #969 from wucm667/feat/quota-fixed-reset-mode
...
feat: 账号配额支持固定时间重置模式
2026-03-14 17:52:56 +08:00
Rose Ding and Claude Opus 4.6
1047f973d5
fix: 按 review 意见重构数据库备份服务(安全性 + 架构 + 健壮性)
...
1. S3 凭证加密存储:使用 SecretEncryptor (AES-256-GCM) 加密 SecretAccessKey,
防止备份文件中泄露 S3 凭证,兼容旧的未加密数据
2. 修复 saveRecord 竞态条件:添加 recordsMu 互斥锁保护 records 的 load/save
3. 恢复操作增加服务端验证:handler 层要求重新输入管理员密码,通过 bcrypt
校验,前端弹出密码输入框
4. pg_dump/psql/S3 操作抽象为接口:定义 DBDumper 和 BackupObjectStore 接口,
实现放入 repository 层,遵循项目依赖注入架构规范
5. 改为流式处理避免大数据库 OOM:备份时 pg_dump stdout -> gzip -> io.Pipe ->
S3 upload;恢复时 S3 download -> gzip reader -> psql stdin,不再全量加载
6. loadRecords 区分"无数据"和"数据损坏"场景:JSON 解析失败返回明确错误
7. 添加 18 个核心逻辑单元测试:覆盖加密、并发、流式备份/恢复、错误处理等
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-14 17:48:21 +08:00
Wesley Liddick
e32977dd73
Merge pull request #997 from SsageParuders/refactor/bedrock-channel-merge
...
refactor: merge bedrock-apikey into unified bedrock channel with auth_mode
2026-03-14 17:48:01 +08:00
wucm667
b5f78ec1e8
feat: 实现固定时间重置模式的 SQL 表达式,并添加相关单元测试
2026-03-14 17:37:34 +08:00
SsageParuders
e0f290fdc8
style: fix gofmt formatting for account type constants
2026-03-14 17:32:53 +08:00
Wesley Liddick
fc00a4e3b2
Merge pull request #959 from touwaeriol/feat/antigravity-403-detection
...
feat(antigravity): add 403 forbidden status detection and display
2026-03-14 17:23:22 +08:00
Wesley Liddick
db1f6ded88
Merge pull request #961 from 0xObjc/codex/ops-openai-token-visibility
...
feat(ops): make OpenAI token stats optional
2026-03-14 17:23:01 +08:00
SsageParuders
4644af2ccc
refactor: merge bedrock-apikey into bedrock with auth_mode credential
...
Consolidate two separate channel types (bedrock + bedrock-apikey) into
a single "AWS Bedrock" channel. Authentication mode is now distinguished
by credentials.auth_mode ("sigv4" | "apikey") instead of separate types.
Backend:
- Remove AccountTypeBedrockAPIKey constant
- IsBedrock() simplified; IsBedrockAPIKey() checks auth_mode
- Add IsAPIKeyOrBedrock() helper to eliminate repeated type checks
- Extend pool mode, quota scheduling, and billing to bedrock
- Add RetryableOnSameAccount to handleBedrockUpstreamErrors
- Add "bedrock" scope to Beta Policy for independent control
Frontend:
- Merge two buttons into one "AWS Bedrock" with auth mode radio
- Badge displays "Anthropic | AWS"
- Pool mode and quota limit UI available for bedrock
- Quota display in account list (usage bars, capacity badges, reset)
- Remove all bedrock-apikey type references
2026-03-14 17:13:30 +08:00
erio
5c4cbaea71
style: fix gofmt formatting
2026-03-14 14:49:46 +08:00
erio
dfca591037
fix(test): add missing gatewayCache parameter to NewAccountHandler in test
2026-03-14 14:42:01 +08:00
erio
11cb34e56e
chore: bump version to 0.1.98.1
2026-03-14 14:10:40 +08:00
erio
22e9fa72af
Merge tag 'v0.1.98' into release/custom-0.1.97
...
修复 Codex/Responses 原生 input id 被误改写的问题,修复 OpenAI 模型映射和 chat-completions 兼容层多项问题。
- 修复 Codex/Responses 原生 input id 被误改写成 fc_* 前缀的问题
- 修复 OpenAI OAuth 账号的模型映射未在管理员可用模型列表中生效的问题
- 修复账号级模型映射未优先于分组回退的问题
- 修复账号更新时调度器快照未同步的问题
- 修复 chat-completions 兼容层中 reasoning_content 输出丢失的问题
- 修复 chat-completions 兼容层中 function_call id 无效的问题
- 修复 chat-completions 兼容层中默认映射模型在非调度回退场景下被错误应用的问题
- 修复 assistant 消息解析中 strings.Builder 写入错误未处理的问题
- 清理未使用的通配符映射辅助函数
2026-03-14 14:10:20 +08:00
erio
4e149109de
chore: bump version to 0.1.97.1
2026-03-14 14:07:42 +08:00
erio
5e0a508eca
Merge branch 'main' into release/custom-0.1.97
...
# Conflicts:
# README.md
# README_CN.md
# backend/internal/handler/gateway_handler.go
# backend/internal/repository/user_group_rate_repo.go
# backend/internal/service/admin_service_group_rate_test.go
# backend/internal/service/gateway_service.go
# frontend/src/components/account/CreateAccountModal.vue
# frontend/src/views/admin/AccountsView.vue
2026-03-14 14:07:05 +08:00
Wesley Liddick
2e3e8687e1
Merge pull request #993 from xvhuan/fix/codex-responses-id-prefix-hotfix-20260314
...
fix: 止血 Codex/Responses 原生 input id 被误改成 fc_*
2026-03-14 13:54:26 +08:00
ius
ca42a45802
fix: stop rewriting native responses input ids
2026-03-14 13:47:01 +08:00
Wesley Liddick
9350ecb62b
Merge pull request #987 from Ethan0x0000/feat-chatcompletions2repsonses-fix
...
fix: chat compatibility model fallback and reasoning_content output
2026-03-14 13:41:47 +08:00
Wesley Liddick
a4a026e8da
Merge pull request #990 from LvyuanW/admin-openai-available-models-fix
...
fix: respect OpenAI OAuth model mapping in admin available models
2026-03-14 13:33:18 +08:00
Wesley Liddick
342fd03e72
Merge pull request #986 from LvyuanW/openai-model-mapping-fix
...
fix: honor account model mapping before group fallback
2026-03-14 13:32:26 +08:00
Ethan0x0000
e3f1fd9b63
fix: handle strings.Builder write errors in assistant parsing
2026-03-14 13:12:17 +08:00
InCerry
e4a4dfd038
Merge remote-tracking branch 'origin/main' into fix/enc_coot
...
# Conflicts:
# backend/internal/service/openai_gateway_service.go
2026-03-14 13:04:24 +08:00
Wang Lvyuan
a377e99088
fix: remove unused wildcard mapping helper
2026-03-14 12:56:34 +08:00
Wang Lvyuan
1d3d7a3033
fix: respect OpenAI model mapping in admin available models
2026-03-14 12:45:10 +08:00
Wesley Liddick
e7086cb3a3
Merge pull request #988 from LvyuanW/scheduler-snapshot-sync
...
fix: sync scheduler snapshot on account updates
2026-03-14 12:38:48 +08:00
shaw
4f2a97073e
chore: update docs
2026-03-14 12:37:36 +08:00
Wesley Liddick
7407e3b45d
Merge pull request #984 from touwaeriol/docs/ecosystem-projects
...
docs: add iframe integration feature and ecosystem projects section
2026-03-14 12:31:25 +08:00