Commit Graph

3370 Commits

Author SHA1 Message Date
kone 88ccd0ecbb feat: add registration abuse prevention
- Silently block verification code for IPs with 2+ registered accounts
- Silently block Gmail alias emails (containing + or . in local part)
- Add CountByRegistrationIP to UserRepository interface
- Pass client IP to SendVerifyCodeAsync for abuse detection

Both checks return fake success to prevent enumeration attacks.
2026-06-06 04:07:07 +08:00
kone ba5a09862f fix: remove hardcoded default update proxy URL
The default socks5 proxy (172.16.32.16:3389) was unreachable for most
deployments, causing version check to timeout after 30 seconds.

Setting the default to empty string allows direct connection to the
Gitea API, which is the expected behavior for most users.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-06 03:43:13 +08:00
kone a1b75400a6 ci: use go module proxy for gitea build 2026-06-04 00:53:13 +08:00
kone 711aab05e4 ci: use alpine mirror for gitea image build 2026-06-04 00:49:41 +08:00
kone 7fb962474b ci: pin pnpm for gitea image build 2026-06-04 00:39:07 +08:00
kone b1d837d800 ci: support manual gitea image release dispatch 2026-06-04 00:36:44 +08:00
kone dbf3278ba3 ci: add gitea image release workflow 2026-06-04 00:25:46 +08:00
kone 6f4a680156 release: prepare v0.1.140
Release / update-version (push) Has been cancelled
Release / build-frontend (push) Has been cancelled
Release / release (push) Has been cancelled
Release / sync-version-file (push) Has been cancelled
CI / test (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled
v0.1.140
2026-06-03 23:52:28 +08:00
kone d1b574bcad release: prepare v0.1.139 2026-06-03 00:15:27 +08:00
kone 6f1dd6b473 release: prepare v0.1.138 2026-05-17 06:52:06 +08:00
kone b866c0fd27 fix: satisfy backend lint 2026-05-17 06:45:35 +08:00
kone 3afb4afeda test: update gateway service constructor usage 2026-05-17 06:33:26 +08:00
kone dd2b08d875 release: prepare v0.1.137 2026-05-17 06:19:56 +08:00
kone f4055c773c release: prepare v0.1.136 2026-05-17 02:00:12 +08:00
kone ebb03dc91c fix: improve kiro usage token accounting 2026-05-17 01:25:37 +08:00
kone 4a06371bba release: prepare v0.1.134 2026-05-16 15:31:08 +08:00
kone 89080b4c5a Merge remote-tracking branch 'pr/2131' into release/v0.1.133
# Conflicts:
#	backend/cmd/server/wire_gen.go
#	backend/internal/config/config.go
#	backend/internal/service/gateway_service.go
#	backend/internal/service/pricing_service.go
#	backend/internal/service/wire.go
#	deploy/config.example.yaml
#	frontend/src/views/admin/AccountsView.vue
2026-05-16 01:55:39 +08:00
kone 042cfd448c release: prepare v0.1.133 2026-05-15 23:06:59 +08:00
kone b430cd4aa9 release: prepare v0.1.132 2026-05-15 22:33:43 +08:00
kone 41e60b20d6 release: prepare v0.1.131 2026-05-14 05:18:31 +08:00
kone 066ceb823e chore: prepare 0.1.130 release 2026-05-13 19:22:11 +08:00
kone 6461356047 feat: add OpenClaw key usage config 2026-05-12 05:25:28 +08:00
kone 908715ae9b chore: prepare 0.1.128 release 2026-05-12 04:47:16 +08:00
kone d81bc52547 chore: prepare 0.1.127 release 2026-05-12 04:31:07 +08:00
github-actions[bot] 02006feeea chore: sync VERSION to 0.1.126 [skip ci] 2026-05-11 17:57:05 +00:00
root 18c3a8b3ad feat: add useradmin role -运营管理员权限,支持管理用户/订单/风控等 2026-05-11 15:23:24 +00:00
Wesley Liddick 3d7e7b78cf Merge pull request #2356 from jack-atlas/fix/openai-messages-multi-tool-continuation
Preserve multi-tool context in OpenAI messages continuation
2026-05-11 23:03:24 +08:00
shaw ea751f6515 test: update admin settings contract for Antigravity UA 2026-05-11 22:55:02 +08:00
Wesley Liddick ca17c364e5 Merge pull request #2319 from wucm667/codex/fix-openai-unpriced-usage-log
fix(openai): record zero-cost usage for unpriced models
2026-05-11 22:45:17 +08:00
Wesley Liddick ac91de8592 Merge pull request #2353 from XiaoYu994/fix/openai-429-plan-type-sync
fix: sync OpenAI plan type from usage limit errors
2026-05-11 22:28:13 +08:00
shaw a07a0dac63 feat: add configurable Antigravity user agent version 2026-05-11 22:25:20 +08:00
shaw 9377c96746 fix: 让消息 cache_control 改写默认关闭 2026-05-11 21:26:41 +08:00
shaw 297b54d066 fix: 完善工具名改写测试和格式 2026-05-11 17:27:04 +08:00
Wesley Liddick 1088e27cd1 Merge pull request #2340 from iFwu/fix/mimic-rewrite-tool-use-in-messages
fix(mimic): rewrite tool_use names in messages to match renamed tools
2026-05-11 16:53:00 +08:00
XiaoYu994 c3a1471775 fix: sync OpenAI plan type from usage limit errors 2026-05-11 16:22:40 +08:00
Wesley Liddick 1e2f55078c Merge pull request #2289 from wucm667/fix/ccswitch-import-model
fix(ccswitch): 修复 Codex 导入缺少模型参数
2026-05-11 16:12:47 +08:00
Wesley Liddick 348eeaa06a Merge pull request #2297 from ZeroDeng01/dev
fix(gemini): 修复 Gemini Vertex Service Account 账号测试时,前置 OAuth token 请求没有使用账号代理的问题
2026-05-11 16:12:20 +08:00
Wesley Liddick f19421b16e Merge pull request #2247 from anzhen-tech/codex/fix-ws-replay-function-call-output
fix: preserve replay tool output continuation
2026-05-11 16:11:37 +08:00
shaw 18cc4691e6 优化系统设置页标签导航 2026-05-11 16:10:40 +08:00
Jack 87d73236f2 Preserve multi-tool context in OpenAI messages continuation
Claude Code can send one assistant turn with multiple tool_use blocks followed by a user turn containing matching tool_result blocks. The OpenAI /v1/messages compatibility path trimmed continuation input to the last user turn plus adjacent tool outputs, which could leave a function_call_output without its earlier function_call when previous_response_id was attached.

This keeps all function_call items needed by retained function_call_output entries so the upstream Responses API can resolve every call_id.

Constraint: Applies only to the OpenAI /v1/messages -> Responses compatibility continuation path.

Rejected: Disable previous_response_id for all tool outputs | loses continuation and cache benefits for valid turns.

Confidence: high

Scope-risk: narrow

Directive: Do not trim function_call_output entries without preserving their matching function_call call_id context.

Tested: go test ./internal/service -run 'TestForwardAsAnthropic_(PreviousResponseIDKeepsMultiToolCallContext|AttachesPreviousResponseIDForCompatContinuation|OAuthPreservesClaudeCodeToolCallID)' -count=1

Tested: go test ./internal/service -run 'TestForwardAsAnthropic|TestApplyAnthropicCompatFullReplayGuard|TestOpenAICompat|Test.*ToolContinuation' -count=1

Tested: go test ./internal/pkg/apicompat -count=1

Related: #2337
2026-05-11 12:03:17 +08:00
ZeroDeng 37ec21e1a5 Merge branch 'main' into dev 2026-05-11 11:48:55 +08:00
ZeroDeng f788e6bdba fix(service): handle unexpected default transport type, simplify warning append 2026-05-11 11:43:44 +08:00
Wesley Liddick 8b0b507a95 Merge pull request #2314 from dexcoder6/fix/payment-result-nan
Fix/payment result nan
2026-05-11 11:24:46 +08:00
shaw b23055af5b feat: add Airwallex payments and multi-currency support 2026-05-11 11:17:26 +08:00
iFwu f97b853460 fix(mimic): rewrite tool_use names in messages to match renamed tools
The Claude Code mimic path rewrites tool names in tools[] (and
tool_choice) but left tool_use blocks in messages[] with their
original names. Anthropic validates that every tool referenced by
a tool_use block is declared in tools[], so the mismatch produces:

    messages.N.content.M: Input tag 'original_name' not found in tools

(surfaced as HTTP 400 directly, or wrapped as 424 by upstream proxies
such as Bedrock gateways.)

The previous code comment asserted 'this matches Parrot; response-side
bytes.Replace will restore the names'. Parrot's behavior is fine for
Claude Code's own tool set, but breaks once the upstream client sends
additional tools (e.g. web_search) that are not part of Claude Code
and therefore get renamed here.

Fix: apply the same ToolNameRewrite to messages[].content[] blocks
where type == 'tool_use', keeping tools[], tool_choice and messages
self-consistent before the request reaches Anthropic. tool_result
blocks reference tools via tool_use_id, not name, so no change is
needed there.

A new unit test covers the full rewrite flow and guards against
server tools (type != '') being affected.
2026-05-10 18:01:19 +08:00
wucm667 6d69ae87c3 fix(openai): record zero-cost usage for unpriced models 2026-05-09 17:33:35 +08:00
dexcoder6 ba1c6fa5fd fix: 修复管理端订单详情充值金额显示 NaN
与支付成功页同源问题:fee_rate=0 时后端 omitempty 剔除字段,前端
`fee_rate <= 0` 判断对 undefined 失效,进入除法分支得到 NaN。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 13:47:57 +08:00
dexcoder6 6884b03e59 fix: 修复支付成功页充值金额显示 NaN
后端 ent 模型 PaymentOrder.FeeRate 带 omitempty,fee_rate=0 的订单
在 JSON 序列化时该字段会被剔除。前端 baseAmount 计算用 `fee_rate <= 0`
判断走分支,但 `undefined <= 0` 为 false,因此进入除法分支得到 NaN。

将 fee_rate 通过 Number(...) || 0 归一化,使缺失字段等价于 0。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 13:45:49 +08:00
shaw dbc8ae658c chore: update sponsors 2026-05-08 20:00:06 +08:00
wucm667 65493df95a fix(ccswitch): add codex model to import deeplink 2026-05-08 17:31:36 +08:00