Wesley Liddick
8b4c8823d9
Merge pull request #4658 from superman2003/fix/cc-bridge-compact-sse
...
fix(gateway): Chat Completions 桥接受 Anthropic 上游的 SSE 紧凑格式
2026-07-21 10:41:33 +08:00
Wesley Liddick
d1dd512bef
Merge pull request #4650 from superman2003/fix/plan-validity-unit-display
...
fix(frontend): 用户侧套餐有效期单位不再把「月/周」显示成「天」
2026-07-21 10:41:16 +08:00
Wesley Liddick
7b934d6888
Merge pull request #4649 from superman2003/fix/preserve-call-id-length-20260720
...
fix(openai): preserve 路径 call_id 超长时压缩至 64 字符上限
2026-07-21 10:40:37 +08:00
Wesley Liddick
a753e91e2c
Merge pull request #4662 from Milesians/fix/proxy-probe-dual-stack
...
fix: use dual-stack fallback for proxy probe
2026-07-21 10:40:20 +08:00
Wesley Liddick
e5384ac13b
Merge pull request #4659 from feitianbubu/fix/graceful-shutdown-cleanup
...
fix: 优雅关停超时不再跳过 Cleanup,避免缓冲的用量/计费记录丢失
2026-07-21 10:40:03 +08:00
Wesley Liddick
0738eadcb5
Merge pull request #4652 from suuuuuu-1/refactor/clean-zh-accounts-redundant-keys
...
refactor(i18n): 清理 zh/admin/accounts.ts 中重构遗留的冗余 keys
2026-07-21 10:39:46 +08:00
shaw
ef3c770d95
fix(deps): 升级 axios 至 1.18.1 修复 GHSA-gcfj-64vw-6mp9 前端安全审计失败
2026-07-21 10:30:41 +08:00
Wesley Liddick
9da816154e
Merge pull request #4654 from yyyyyzc/main
...
docs (dcoker-cpmpose): 修正示例 compose 中错误的镜像地址
2026-07-21 10:01:02 +08:00
milesians
de094fb63e
fix: use dual-stack fallback for proxy probe
2026-07-20 22:33:08 +08:00
feitianbubu
304fcb04e3
fix: 优雅关停超时不再跳过 Cleanup,避免缓冲的用量/计费记录丢失
2026-07-20 21:31:25 +08:00
superman2003
2707f2793d
fix(gateway): CC 桥接受 Anthropic 上游的 SSE 紧凑格式
...
SSE 规范允许字段冒号后省略空格(event:message_start / data:{...})。
Kimi 等 Anthropic 兼容上游返回紧凑格式时,Anthropic → Chat Completions
桥按 "event: " / "data: " 严格匹配会丢弃全部事件,且 dataLine[6:] 按带
空格前缀硬切载荷,最终流式/缓冲两条路径都报 "Upstream stream ended
without a response"(与 #4653 同根因;#4657 只修了 /v1/responses 桥,
本补丁补齐对称的 /v1/chat/completions 桥)。
复用 OpenAI 链路既有的 extractOpenAISSEEventLine / extractOpenAISSEDataLine
(正确处理可选空格/tab),流式与缓冲两处统一替换;补充紧凑格式的
缓冲/流式回归测试,原带空格格式用例保持通过。
2026-07-20 21:00:29 +08:00
yyyyyzc
106043fd9a
docs (dcoker-cpmpose): 修正示例 compose 中错误的镜像地址
2026-07-20 19:28:49 +08:00
suuuuuu-1
3258f7c620
refactor(i18n): 清理 zh/admin/accounts.ts 中重构遗留的 29 个冗余 keys
...
在 d9e514f98 (2026-07-07) 重构拆分语言包时,部分中文 keys 被错误保留
在 admin/accounts.ts 中。这些 keys 在英文文件中不存在,且代码中无引用。
删除的冗余 keys:
- form 对象(13 个子 keys):nameLabel, platformLabel, typeLabel 等
- filters 对象(6 个子 keys):platform, type, status 等
- 独立 keys(10 个):
* accountCreatedSuccess, accountUpdatedSuccess, accountDeletedSuccess
* noAccounts, noAccountsDescription
* saving, refreshing, testSuccess
* cookieRefreshedSuccess, failedToSave
* deleteConfirmMessage, refreshCookie, testAccount
* api_key, cookie
验证:
- 英文 keys: 1184, 中文 keys: 1184 (修复前: 1220)
- 差异: 0 (修复前: -36)
- 已确认代码中无对 admin.accounts.* 路径的引用
- 正确的翻译在 common.ts 等文件中已存在
2026-07-20 19:11:21 +08:00
superman2003 and Cursor
c401595e01
fix(openai): preserve 路径 call_id 超长时压缩至 64 字符上限
...
生产环境真实报错:客户端走 /v1/messages(Anthropic Messages 格式)入站,
OAuth 账号转发上游 OpenAI /v1/responses 时(PreserveToolCallIDs=true),
客户端历史中出现超长工具 ID(如嵌套代理拼接产生的 78 字符 srvtoolu_ ID)
会被原样透传,上游 400 拒绝:
"Invalid 'input[614].call_id': string too long. Expected a string with
maximum length 64, but got a string with length 78 instead."
#4612 为非 preserve 路径增加了 call_id 归一化与压缩,但有意将
PreserveToolCallIDs=true 的路径排除在外。本次在 preserve 路径补上长度护栏:
- len(id) <= 64 时仍原样透传,保持 #4612 承诺的"保持原样"语义;
- 超过 64 时复用已有的 compactCodexCallID 做确定性 SHA-256 压缩。
由于压缩是确定性的,同一逻辑 ID 在 function_call 与 function_call_output
两侧结果一致,tool_use/tool_result 配对不破坏;OAuth 路径 store=false
每轮全量重放历史,跨轮结果亦一致。改写点 fixCallIDPrefix 是
filterCodexInputWithOptions 内所有 call_id 修正的单一入口(含 item_reference
的 call_* 引用),同时覆盖 Messages 桥接(openai_gateway_messages.go)与
/v1/responses 透传(openai_gateway_forward.go)两条 preserve 路径。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-20 18:49:24 +08:00
superman2003
a6ecc202f0
fix(frontend): 用户侧套餐有效期单位不再把「月/周」显示成「天」
...
管理端表单保存的有效期单位是复数(days/weeks/months),数据库默认值
与历史数据是单数(day)。用户侧套餐卡片与订单确认面板此前只匹配单数
'month'(以及计费根本不支持的 'year'),管理端存的 'months' 永远落进
默认分支:「1 个月」的套餐被显示成「1天」(#4607),'weeks' 则会把
周数错标成天数。
后端计费 psComputeValidityDays 对 week/weeks、month/months 单复数均
按 ×7/×30 天换算,实扣是对的——这是纯显示缺陷,但直接造成「显示 1 天、
实付 1 个月」的定价误解。
修复:抽出与计费语义一一对应的 planValiditySuffix 辅助函数(单复数
归一化;month→「月/N个月」、week→「N周」、其余含未知单位一律按天,
与后端兜底一致),SubscriptionPlanCard 与 PaymentView 两处共用;
补充 zh/en 的 weeks 文案与单元/组件测试。
2026-07-20 18:40:42 +08:00
github-actions[bot]
e625ce3b3b
chore: sync VERSION to 0.1.162 [skip ci]
2026-07-20 08:43:19 +00:00
Wesley Liddick
27f094e096
Merge pull request #4638 from superman2003/fix/s3-secret-ephemeral-encryption-key
...
fix(backup): 拒绝用自动生成的临时密钥持久化 S3 SecretAccessKey,修复重启后解密失败
v0.1.162
2026-07-20 16:21:46 +08:00
shaw
fa402b909a
feat(branding): 启用新版 SVG logo 并在 README 头部展示
...
- 新增 assets/logo.svg 作为项目默认 logo(512x512 深色圆角底 + 渐变 S 标)
- 前端 favicon 与组件兜底 logo 由 logo.png 切换为 frontend/public/logo.svg
- 三个 README(EN/CN/JA)头部新增居中 logo 与标题布局
- 删除旧 logo.png 及多余的 lobe 变体 SVG
2026-07-20 16:06:59 +08:00
Wesley Liddick
2e5973b165
Merge pull request #4575 from Astrenix/feat/batch-image-guide-i18n
...
feat(frontend): 批量生图页面完整迁移至 vue-i18n
2026-07-20 15:32:21 +08:00
Wesley Liddick
ecf199d29d
Merge pull request #4573 from Astrenix/fix/dark-palette-slate-consistency
...
style(frontend): 统一暗色模式表面色板为项目 slate 色系
2026-07-20 15:32:16 +08:00
Wesley Liddick
7cbb0d8552
Merge pull request #4629 from yan9651688/fix/issue-4609-plan-currency-symbol
...
fix(payment): show plan prices with configured currency symbols
2026-07-20 15:32:11 +08:00
Wesley Liddick
c4a8878f1f
Merge pull request #4626 from put-go/fix/grok-chained-video-content
...
fix(grok): support chained video content proxies
2026-07-20 15:30:46 +08:00
Wesley Liddick
95c8b2401e
Merge pull request #4616 from zhangxaochen/codex/openai-quota-error
...
fix(openai): return standard insufficient quota errors
2026-07-20 15:30:41 +08:00
Wesley Liddick
e669e51b92
Merge pull request #4565 from abbzbb/fix/prompt-audit-fail-closed-4560
...
fix(security-audit): 仅在 blocking 意图下 fail-closed,修复无法关闭审计
2026-07-20 15:30:36 +08:00
Wesley Liddick
ce9e70d5cf
Merge pull request #4569 from Astrenix/fix/codex-models-openai-list-envelope
...
fix(openai): accept standard OpenAI model list for Codex model discovery
2026-07-20 15:30:31 +08:00
Wesley Liddick
deb5e8756a
Merge pull request #4572 from catoncat/fix/openai-agent-identity-team-isolation
...
fix(openai): 按 Team 隔离 Agent Identity 导入
2026-07-20 15:30:26 +08:00
Wesley Liddick
2ee66c401d
Merge pull request #4574 from Astrenix/fix/i18n-hardcoded-strings
...
fix(frontend): 补齐零星硬编码 UI 文案的国际化
2026-07-20 15:29:05 +08:00
Wesley Liddick
3071d41443
Merge pull request #4570 from Astrenix/fix/available-channels-scroll
...
fix(frontend): 修复可用渠道页面内容过多时无法滚动的问题
2026-07-20 15:29:00 +08:00
Wesley Liddick
58ee0c8d75
Merge pull request #4571 from Astrenix/fix/user-balance-modal-dark-text
...
fix(frontend): 修复余额弹窗暗色模式下用户邮箱不可读
2026-07-20 15:28:56 +08:00
Wesley Liddick
78f85583ea
Merge pull request #4630 from feitianbubu/fix/api-key-update-ip-list-clear
...
fix: 部分更新 API Key 时不再静默清空 IP 白/黑名单
2026-07-20 15:28:51 +08:00
superman2003
7a7f51a534
fix(backup): 拒绝用自动生成的临时密钥持久化 S3 SecretAccessKey
...
totp.encryption_key 未配置时,加密密钥每次进程启动都会随机重新生成。
备份/图床把 S3 SecretAccessKey 用这把临时密钥加密落库后,重启或升级
即无法解密(decrypt: cipher: message authentication failed),S3 备份
与图床静默失效(#4524)。
对齐支付(payment.ProvideEncryptionKey)与 TOTP 启用已有的护栏:在
持久化新 secret 之前,若密钥非固定配置则返回可操作的
SECRET_ENCRYPTION_KEY_NOT_CONFIGURED(400),提示配置固定
TOTP_ENCRYPTION_KEY。不带 secret 的更新(沿用已存值)与
ReuseBackupS3 模式不受影响;已配置固定密钥的部署无感。
2026-07-20 15:20:51 +08:00
Wesley Liddick
db4295d646
Merge pull request #4591 from huangjunsen0406/fix/grok-claude-messages-prompt-cache
...
fix(grok): improve Claude Messages prompt-cache round-trip
2026-07-20 11:57:36 +08:00
shaw
3c41984733
style(apicompat): gofmt types.go after merge
2026-07-20 11:47:13 +08:00
shaw
04617cc0ff
Merge branch 'main' into fix/grok-claude-messages-prompt-cache
...
Resolve const-block conflict in openai_gateway_grok_cache.go:
keep #4590 client tool cache constants and #4585 xai-package limit
(grokFreeRolling24hTokenLimit removed), add claudeCodeSessionHeader.
2026-07-20 11:39:37 +08:00
Wesley Liddick
dabca7ca79
Merge pull request #4585 from superman2003/fix/issues-4561-4562-4566-4582
...
fix(grok): improve token counting, quota probes, and proxy checks
2026-07-20 11:37:02 +08:00
shaw
a90c18cbea
Merge branch 'main' into fix/issues-4561-4562-4566-4582
...
Resolve const-block conflict in openai_gateway_grok_cache.go:
keep #4590 's client tool cache constants, drop grokFreeRolling24hTokenLimit
(moved to pkg/xai as IsGrokFreeRolling24hTokenLimit with legacy 2M support).
2026-07-20 11:25:11 +08:00
feitianbubu
e502766170
fix: 部分更新 API Key 时不再静默清空 IP 白/黑名单
2026-07-20 11:15:37 +08:00
Wesley Liddick
b8e844f4ee
Merge pull request #4612 from catoncat/fix/codex-call-id-length
...
fix(openai): 限制 Codex call_id 归一化后的长度
2026-07-20 11:05:18 +08:00
Wesley Liddick
80a533c890
Merge pull request #4606 from orchief/codex/issue-4603-dedupe-oauth-system-prompt
...
fix(openai): 避免 OAuth Chat 转译重复 system 前缀
2026-07-20 11:03:00 +08:00
Wesley Liddick
6d152893ff
Merge pull request #4590 from superman2003/fix/grok-client-cache-codex-trae
...
fix(grok): cache client tools from Codex, Trae, and Claude Desktop
2026-07-20 10:47:05 +08:00
shaw
97afb4089c
fix(lint): check strings.Builder WriteString return value (errcheck)
2026-07-20 10:46:37 +08:00
put-go
48fad26433
fix(grok): support chained video content proxies
2026-07-20 10:40:18 +08:00
yan9651688
a05b873215
fix(payment): prevent configured currencies from looking like USD
...
Subscription plans can carry a display-only ISO currency code, but the admin plan table and user plan cards still used a hard-coded dollar sign. Resolve the symbol through the shared currency helper while retaining existing number formatting, the currency code label, and legacy blank-currency behavior.
Constraint: Plans without a currency must keep the legacy USD display
Rejected: Reformat complete prices with Intl.NumberFormat | it would change existing decimals and remove the explicit currency code
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep plan currency symbols aligned across admin and user displays
Tested: targeted Vitest 4 tests; targeted ESLint; vue-tsc; Vite production build; full Vitest 1222 tests passed
Not-tested: Full Vitest has 2 unrelated upstream failures in admin.system.rollback.spec.ts
Related: https://github.com/Wei-Shaw/sub2api/issues/4609
2026-07-20 10:33:04 +08:00
Wesley Liddick
1b4029b050
Merge pull request #4595 from kinsolee/fix/http-bridge-failover-terminal-safety
...
fix(openai): make HTTP bridge failover safe
2026-07-20 10:29:00 +08:00
Wesley Liddick
139a3d4346
Merge pull request #4589 from huangjunsen0406/fix/anthropic-message-start-stop-reason-null
...
fix(apicompat): emit null stop_reason on Anthropic message_start
2026-07-20 10:28:52 +08:00
Wesley Liddick
8c9cda1803
Merge pull request #4583 from BenjaminAaron196/codex/ops-report-email-template
...
(feat) 运维定时报表支持可编辑摘要模板与多语言展示
2026-07-20 10:28:44 +08:00
Wesley Liddick
0a8831777b
Merge pull request #4619 from superman2003/fix/grok-manual-test-scheduling-gate
...
fix(grok): let manual connection tests bypass the scheduling gate
2026-07-20 10:26:55 +08:00
Wesley Liddick
34c8dbd604
Merge pull request #4618 from superman2003/fix/system-update-detach-request-ctx
...
fix(update): detach in-place update from the HTTP request lifetime
2026-07-20 10:26:47 +08:00
Wesley Liddick
e311d368d3
Merge pull request #4611 from superman2003/fix/codex-models-manifest-401-unschedulable
...
fix(openai): mark OAuth accounts unschedulable on Codex models manifest 401
2026-07-20 10:26:39 +08:00
Wesley Liddick
f133fde643
Merge pull request #4602 from jianjianai/new/perf-responses-image-intent
...
perf(openai): 复用 Responses 生图意图判定
2026-07-20 10:26:31 +08:00