- 04 Jan, 2026 40 commits
-
-
IanShaw027 authored
-
IanShaw027 authored
解决了以下文件的冲突: - backend/internal/handler/admin/setting_handler.go - 采用 upstream 的字段对齐风格和 *Configured 字段名 - 添加 EnableIdentityPatch 和 IdentityPatchPrompt 字段 - backend/internal/handler/gateway_handler.go - 采用 upstream 的 billingErrorDetails 错误处理方式 - frontend/src/api/admin/settings.ts - 采用 upstream 的 *_configured 字段名 - 添加 enable_identity_patch 和 identity_patch_prompt 字段 - frontend/src/views/admin/SettingsView.vue - 合并 turnstile_secret_key_configured 字段 - 保留 enable_identity_patch 和 identity_patch_prompt 字段
-
IanShaw027 authored
1. 资源管理冗余(ForwardGemini双重Close) - 错误分支读取body后立即关闭原始body,用内存副本重新包装 - defer添加nil guard,避免重复关闭 - fallback成功时显式关闭旧body,确保连接释放 2. Schema校验丢失(cleanJSONSchema移除字段无感知) - 新增schemaCleaningWarningsEnabled()支持环境变量控制 - 实现warnSchemaKeyRemovedOnce()在非release模式下告警 - 移除关键验证字段时输出warning,包含key和path 3. UI响应式风险(UsersView操作菜单硬编码定位) - 菜单改为先粗定位、渲染后测量、再clamp到视口内 - 添加max-height + overflow-auto,超出时可滚动 - 增强交互:点击其它位置/滚动/resize自动关闭或重新定位 4. 身份补丁干扰(TransformClaudeToGemini默认注入) - 新增TransformOptions + TransformClaudeToGeminiWithOptions - 系统设置新增enable_identity_patch、identity_patch_prompt - 完整打通handler/dto/service/frontend配置链路 - 默认保持启用,向后兼容现有行为 测试: - 后端单测全量通过:go test ./... - 前端类型检查通过:npm run typecheck
-
shaw authored
-
IanShaw027 authored
改进 cleanJSONSchema 函数: - 新增 schemaValidationKeys 映射表,标记关键验证字段 - 新增 warnSchemaKeyRemovedOnce 函数,在移除关键验证字段时输出警告(每个 key 仅警告一次) - 支持通过环境变量 SUB2API_SCHEMA_CLEAN_WARN 控制警告开关 - 默认在非 release 模式下启用警告,便于开发调试 此改进响应代码审查建议,帮助开发者识别可能影响模型输出质量的 Schema 字段移除。
-
IanShaw027 authored
主要改动: - request_transformer: thinking block 缺少签名时降级为文本而非丢弃,保留内容并在上层禁用 thinking mode - antigravity_gateway_service: 新增两阶段降级策略,先处理 thinking blocks,如仍失败且涉及 tool 签名错误则进一步降级 tool blocks - gateway_request: 新增 FilterSignatureSensitiveBlocksForRetry 函数,支持将 tool_use/tool_result 降级为文本 - gateway_request: 改进 FilterThinkingBlocksForRetry,禁用顶层 thinking 配置以避免结构约束冲突 - gateway_service: 实现保守的两阶段重试逻辑,优先保留内容,仅在必要时降级工具调用 - 新增 antigravity_gateway_service_test.go 测试签名块剥离逻辑 - 更新相关测试用例以验证降级行为 此修复解决了跨平台/账户切换时历史消息签名失效导致的请求失败问题。
-
IanShaw027 authored
- Standardized table loading logic with enhanced useTableLoader. - Unified form submission patterns via new useForm composable. - Extracted common UI components: SearchInput and StatusBadge. - Centralized common interface definitions in types/index.ts. - Achieved TypeScript zero-error status across refactored files. - Greatly improved code reusability and maintainability.
-
IanShaw027 authored
- Completed modular refactoring of KeysView.vue and SettingsView.vue. - Resolved remaining TypeScript errors in new components. - Standardized prop types and event emitters for sub-components. - Optimized bundle size by eliminating redundant template code and unused script variables. - Verified system stability with final type checking.
-
yangjianbo authored
补齐高亮渲染并保留纯文本回退 新增高亮 token 工具并做 HTML 转义
-
IanShaw027 authored
- Split UsersView.vue into UserCreateModal, UserEditModal, UserApiKeysModal, etc. - Split UsageView.vue into UsageStatsCards, UsageFilters, UsageTable, etc. - Split DashboardView.vue into UserDashboardStats, UserDashboardCharts, etc. - Split AccountsView.vue into AccountTableActions, AccountTableFilters, etc. - Standardized TypeScript types across new components to resolve implicit 'any' and 'never[]' errors. - Improved overall frontend maintainability and code clarity.
-
yangjianbo authored
修正测试中的 APIKey 名称引用 移除不可达返回与未使用函数 统一 gofmt 格式并处理 Close 错误
-
墨颜 authored
-
墨颜 authored
- 删除冗余的 vite.config.js,统一使用 TypeScript 配置 - 创建 GroupOptionItem 组件封装分组选项 UI 逻辑(GroupBadge + 描述 + 勾选状态) - 在密钥页面的分组选择器中显示分组描述文字 - 添加选中状态的勾选图标,提升交互体验 - 优化描述文字左对齐和截断显示效果 - 消除代码重复,简化维护成本
-
IanShaw027 authored
P0 严重问题修复: - 优化重试机制:降至 5 次 + 指数退避 + 10s 上限,防止请求堆积 - 修复 SSE 错误格式:符合 Anthropic API 规范,添加错误类型标准化 P1 重要问题修复: - 防止 DOS 攻击:使用 io.LimitReader 限制请求体 10MB,流式解析 - 修复计费数据丢失:改为同步计费,使用独立 context 防止中断 技术细节: - 新增 retryBackoffDelay() 和 sleepWithContext() 支持 context 取消 - 新增 normalizeAnthropicErrorType() 和 sanitizePublicErrorMessage() - 新增 parseGatewayRequestStream() 实现流式解析 - 新增 recordUsageSync() 确保计费数据持久化 影响: - 极端场景重试时间从 30s 降至 ≤10s - 防止高并发 OOM 攻击 - 消除计费数据丢失风险 - 提升客户端兼容性
-
IanShaw027 authored
-
-
IanShaw027 authored
-
IanShaw027 authored
- 添加 Accept-Language 请求头支持后端翻译 - 优化账户状态指示器和测试模态框 - 简化用户属性表单和配置模态框 - 新增多个国际化翻译条目 - 重构管理视图代码,提升可维护性
-
shaw authored
主要功能: - Gemini OAuth 配额系统优化:Google One tier 自动推断 - Antigravity 网关增强:Thinking Block 重试、Claude 模型 signature 透传 - 账号调度改进:临时不可调度功能、负载感知调度优化 - 前端用户体验:账号管理界面优化、使用教程改进 冲突解决:保留 handleUpstreamError 的 prefix 参数和日志记录能力, 同时合并 PR 的 thinking block 重试和 model fallback 功能。
-
yangjianbo authored
- 合并 wire/httpclient/http_upstream/proxy_probe 冲突并保留校验逻辑 - 引入 proxyutil 及测试,完善代理配置 - 更新 goreleaser/workflow 与前端细节调整 测试: go test ./...
-
yangjianbo authored
- 以读取时间戳判定流式间隔超时,避免下游阻塞误判 - antigravity 流式读取使用 MaxLineSize 配置 - 事件通道缓冲提升到 16 测试: go test ./...
-
shaw authored
-
yangjianbo authored
- 扩展SSE行长与间隔超时处理,补充keepalive - 写入失败与超长行时发送错误事件,修复并发释放 - 同步默认配置与示例配置,更新Caddy超时/压缩规则 - 新增OpenAI流式超时与超长行测试 测试: go test ./...
-
IanShaw027 authored
- 全局替换 ApiKey → APIKey(类型、字段、方法、变量) - 修复所有 initialism 命名(API, SMTP, HTML, URL 等) - 添加所有缺失的包注释 - 修复导出符号的注释格式 主要修改: - ApiKey → APIKey(所有出现的地方) - ApiKeyID → APIKeyID - ApiKeyIDs → APIKeyIDs - TestSmtpConnection → TestSMTPConnection - HtmlURL → HTMLURL - 添加 20+ 个包注释 - 修复 10+ 个导出符号注释格式 验证结果: - ✓ golangci-lint: 0 issues - ✓ 单元测试: 通过 - ✓ 集成测试: 通过
-
IanShaw027 authored
- 重新生成 Wire 依赖注入代码(修复服务构造函数签名不匹配) - 修复集成测试中的 err 变量重复声明 - 临时禁用 golangci-lint 的命名规范检查(ST1000/ST1003/ST1020/ST1021/ST1022) - 这些只是代码风格问题,不影响功能 - 后续将创建专门的 PR 系统地修复命名规范 测试结果: - ✓ golangci-lint: 通过(0 issues) - ✓ 单元测试: 通过 - ✓ 集成测试: 通过
-
IanShaw027 authored
- 接受上游 wire_gen.go 的简化构造函数参数 - 接受上游 account_test_service.go 的优化实现
-
IanShaw027 authored
-
shaw authored
-
IanShaw027 authored
-
IanShaw027 authored
-
IanShaw027 authored
- 后端:将 Smtp/Api/Doc 字段改为 SMTP/API/Doc(遵循 Go 命名规范) - 前端:添加 Gemini 帮助按钮,简化配额说明展示
-
song authored
-
song authored
-
song authored
-
song authored
-
song authored
-
song authored
- 修复合并冲突导致的逻辑错误 - Gemini 模型使用 dummy signature - Claude 模型跳过无 signature 的 thinking block - 删除未使用的 isValidThoughtSignature 函数
-
song authored
- 不可重试错误(invalid_grant等)直接标记 error,不重试 - 其他错误仅记录日志,不标记 error(可能是临时网络问题) - 仅影响 Antigravity 账户,其他平台保持原有逻辑
-
song authored
-
song authored
-