- 31 Dec, 2025 39 commits
-
-
song authored
-
song authored
-
song authored
- 删除精确映射表 antigravityModelMapping,统一使用前缀映射 - 前缀映射支持模型版本号变化(如 -20251111, -thinking, -preview) - 简化 IsModelSupported 函数,所有 claude-/gemini- 前缀模型都支持 - 添加跨协议测试用例:Claude 端点调用 Gemini 模型、Gemini 端点调用 Claude 模型
-
shaw authored
-
shaw authored
-
NepetaLemon authored
* refactor: 迁移初始化 db 和 redis 到 repository * refactor: 迁移 errors 到 pkg
-
shaw authored
- NeedsRefresh 判断为 true 时输出 expires_at、time_until_expiry、window - 修正注释中的刷新窗口描述(10分钟 → 15分钟)
-
shaw authored
- 添加 normalizeLimit 函数,将 0 或负数限额规范化为 nil(无限制) - 简化 IncrementUsage,移除冗余的配额检查逻辑 - 配额检查已在请求前由中间件和网关完成 - 消费记录应无条件执行,确保数据完整性 - 删除测试限额超出行为的无效集成测试
-
IanShaw027 authored
-
IanShaw027 authored
基于 Gemini + Codex 审查结果的修复: 1. thinking block dummy signature 填充 - Gemini 模型现在会填充 dummyThoughtSignature - 与 tool_use 处理逻辑保持一致 2. 边界检查增强 - buildTools: 跳过空工具名称 - buildTools: 为 nil schema 提供默认值 - convertClaudeToolsToGeminiTools: 为 nil params 提供默认值 3. 防止下游 API 验证错误 - 确保所有工具都有有效的 parameters - 默认 schema: {type: 'object', properties: {}} 审查报告:Gemini 评分 95%, Codex 评分 8.2/10 -
IanShaw027 authored
- buildParts 函数检测 thinking block 的 signature - Claude 模型 (allowDummyThought=false) 时跳过无 signature 的 block - 记录警告日志以便调试 - Gemini 模型继续使用 dummy signature 兼容方案 修复 Issue 0.1: Claude thinking block signature 缺失错误
-
shaw authored
-
IanShaw027 authored
- ClaudeTool 结构体增加 Type 和 Custom 字段 - buildTools 函数支持从 custom 字段读取 input_schema - convertClaudeToolsToGeminiTools 函数支持 MCP 工具格式 - 修复 Antigravity upstream error 400: JSON schema invalid 修复 Issue 0.2: tools.X.custom.input_schema 验证错误
-
shaw authored
-
shaw authored
GoReleaser 不支持 lower 模板函数,改为: - 在 GitHub Actions 中预处理小写 owner - 传递 GITHUB_REPO_OWNER_LOWER 环境变量给 GoReleaser
-
shaw authored
-
shaw authored
-
程序猿MT authored
-
yangjianbo authored
问题:软删除的记录仍占用唯一约束位置,导致删后无法重建同名/同邮箱/同订阅 修复方案:使用 PostgreSQL 部分唯一索引(WHERE deleted_at IS NULL) - User.email: 移除字段级 Unique(),改用部分唯一索引 - Group.name: 移除字段级 Unique(),改用部分唯一索引 - UserSubscription.(user_id, group_id): 移除组合唯一索引,改用部分唯一索引 - ApiKey.key: 保留普通唯一约束(安全考虑,已删除的 Key 不应重用) 安全性: - 应用层已有 ExistsByXxx 检查,自动过滤软删除记录 - 数据库层部分唯一索引提供最后一道防线
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
shaw authored
新增 Account.GetCredentialAsTime 方法,统一处理凭证中的时间戳字段, 兼容 RFC3339 字符串、Unix 时间戳字符串和数字类型。 - 重构 Claude/Gemini/Antigravity TokenRefresher.NeedsRefresh - 移除重复的 parseExpiresAt/parseAntigravityExpiresAt 函数 - 简化 GetOpenAITokenExpiresAt 实现 - 新增 RFC3339 格式单元测试用例
-
yangjianbo authored
在以下端点添加 model 参数的必填验证,缺失时直接返回 400 错误: - /v1/messages - /v1/messages/count_tokens - /openai/v1/responses 修复前:空 model 会进入账号选择流程,最终由上游 API 返回错误 修复后:入口处直接拒绝,避免浪费资源和不明确的错误信息
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
shaw authored
Remove redundant alignment whitespace before comments.
-
-
yangjianbo authored
问题: 1. Setting.value 字段设置了 NotEmpty() 约束,导致保存空字符串值时验证失败 2. 数据库 settings 表缺少 key 字段的唯一约束,导致 ON CONFLICT 语句执行失败 修复: - 移除 ent/schema/setting.go 中 value 字段的 NotEmpty() 约束 - 新增迁移 015_fix_settings_unique_constraint.sql 添加缺失的唯一约束 - 添加3个回归测试确保空值保存功能正常
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
补齐 Redis ZSET 前缀处理,确保并发释放计数正确 删除时改用 Client().Mutate 走更新逻辑,保留软删除记录 测试: make test-integration
-
yangjianbo authored
- errcheck: 修复类型断言未检查返回值的问题 - pool.go: 添加 sync.Map 类型断言安全检查 - req_client_pool.go: 添加 sync.Map 类型断言安全检查 - concurrency_cache_benchmark_test.go: 显式忽略断言返回值 - gateway_service.go: 显式忽略 WriteString 返回值 - gofmt: 修复代码格式问题 - redis.go: 注释对齐 - api_key_repo.go: 结构体字段对齐 - concurrency_cache.go: 字段对齐 - http_upstream.go: 注释对齐 - unused: 删除未使用的代码 - user_repo.go: 删除未使用的 sql 字段 - usage_service.go: 删除未使用的 calculateStats 函数
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
程序猿MT authored
-
-
shaw authored
-
shaw authored
项目已有 BaseDialog.vue 组件提供相同功能,此组件属于误提交。
-
shaw authored
-
yangjianbo authored
冲突解决: - wire_gen.go: 合并 antigravityGatewayService 和 ProvideConcurrencyCache - user_repo_integration_test.go: 保留 NotFound 测试 - antigravity_gateway_service.go: 适配 httpUpstream.Do 新签名
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
## 数据完整性修复 (fix-critical-data-integrity) - 添加 error_translate.go 统一错误转换层 - 修复 nil 输入和 NotFound 错误处理 - 增强仓储层错误一致性 ## 仓储一致性修复 (fix-high-repository-consistency) - Group schema 添加 default_validity_days 字段 - Account schema 添加 proxy edge 关联 - 新增 UsageLog ent schema 定义 - 修复 UpdateBalance/UpdateConcurrency 受影响行数校验 ## 数据卫生修复 (fix-medium-data-hygiene) - UserSubscription 添加软删除支持 (SoftDeleteMixin) - RedeemCode/Setting 添加硬删除策略文档 - account_groups/user_allowed_groups 的 created_at 声明 timestamptz - 停止写入 legacy users.allowed_groups 列 - 新增迁移: 011-014 (索引优化、软删除、孤立数据审计、列清理) ## 测试补充 - 添加 UserSubscription 软删除测试 - 添加迁移回归测试 - 添加 NotFound 错误测试
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
超限且无可淘汰条目时拒绝新建 规范化代理地址并更新失败时的访问时间 补充连接池上限与代理规范化测试
-
Wei Shaw authored
-
yangjianbo authored
新增隔离策略与连接池缓存回收 连接池大小跟随账号并发并处理代理切换 同步配置默认值与示例并补充测试
-
shaw authored
-
yangjianbo authored
- system 字段存在即视为显式提供,避免 null 触发默认注入 - 日统计分组显式使用应用时区,缺失时从 TZ 回退到 UTC - 缓存写入队列丢弃日志节流汇总,关键任务同步回退 测试: go test ./internal/service -run TestBillingCacheServiceQueueHighLoad
-
yangjianbo authored
新增 DB/Redis 连接池配置与校验,并补充单测 网关请求体大小限制与 413 处理 HTTP/req 客户端池化并调整上游连接池默认值 并发槽位改为 ZSET+Lua 与指数退避 用量统计改 SQL 聚合并新增索引迁移 计费缓存写入改工作池并补测试/基准 测试: 在 backend/ 下运行 go test ./...
-
- 30 Dec, 2025 1 commit
-
-
song authored
-