- 19 Jan, 2026 1 commit
-
-
yangjianbo authored
为共享 req 客户端增加 HTTP/2 选项与缓存隔离 OpenAI OAuth 超时提升到 120s,并按协议控制强制 新增客户端池与 OAuth 客户端单测覆盖 修复 usage cleanup 相关 errcheck/ineffassign/staticcheck 并统一格式 测试: make test
-
- 18 Jan, 2026 1 commit
-
-
yangjianbo authored
-
- 16 Jan, 2026 2 commits
- 15 Jan, 2026 4 commits
-
-
LLLLLLiulei authored
-
yangjianbo authored
-
LLLLLLiulei authored
This reverts commit 09c4f82927ddce1c9528c146a26457f53d02b034.
-
LLLLLLiulei authored
-
- 14 Jan, 2026 13 commits
-
-
IanShaw027 authored
- 在错误日志列表和详情中显示用户邮箱 - 在 GetErrorLogByID 中关联 users 表获取用户邮箱 - 在 OpsErrorLogFilter 中添加 UserQuery 字段 - 在 buildOpsErrorLogsWhere 中添加用户邮箱搜索条件 - 在 GetErrorLogs handler 中支持 user_query 参数
-
IanShaw027 authored
- 格式化代码(gofmt) - 修复空指针检查(staticcheck) - 删除未使用的函数(unused)
-
IanShaw027 authored
- 新增 GetErrorLogByID 接口用于获取单个错误日志详情 - 优化 GetErrorLogs 过滤逻辑,简化参数处理 - 简化前端错误详情模态框代码,提升可维护性 - 更新相关 API 接口和 i18n 翻译
-
longgexx authored
修复两个问题: 1. Token使用趋势图和模型分布图未响应筛选条件 2. 上午时段选择今天刷新后日期回退到前一天 前端修改: - 更新 dashboard API 类型定义,添加 model、account_id、group_id、stream 参数支持 - 修改 UsageView 趋势图加载逻辑,传递所有筛选参数到后端 - 修复日期格式化函数,使用本地时区避免 UTC 转换导致的日期偏移 后端修改: - Handler 层:接收并解析所有筛选参数(model、account_id、group_id、stream) - Service 层:传递完整的筛选参数到 Repository 层 - Repository 层:SQL 查询动态添加所有过滤条件 - 更新接口定义和所有调用点以保持一致性 影响范围: - /admin/dashboard/trend 端点现支持完整筛选 - /admin/dashboard/models 端点现支持完整筛选 - 用户在后台使用记录页面选择任意筛选条件时,趋势图和模型分布图会实时响应 - 日期选择器在任何时区下都能正确保持今天的选择
-
LLLLLLiulei authored
-
IanShaw027 authored
后端改动: - 添加 resolved 参数默认值处理(向后兼容,默认显示未解决错误) - 新增 status_codes_other 查询参数支持 - 移除 service 层的高级设置过滤逻辑,简化错误日志查询流程 前端改动: - 完善错误日志相关组件的国际化支持 - 优化 Ops 监控面板和设置对话框的用户体验
-
墨颜 authored
- 新增 accounts.rate_multiplier(默认 1.0,允许 0) - 使用 usage_logs.account_rate_multiplier 记录倍率快照,避免历史回算 - 统计/导出/管理端展示账号口径费用(total_cost * account_rate_multiplier)
-
IanShaw027 authored
-
IanShaw027 authored
-
IanShaw027 authored
-
IanShaw027 authored
主要改动: - 移除 p95_latency_ms 和 p99_latency_ms 告警指标类型 - 移除配置中的 latency_p99_ms_max 阈值设置 - 简化健康分数计算(移除latency权重,重新归一化SLA和错误率) - 移除duration相关的诊断规则和阈值检查 - 统一术语:延迟 → 请求时长 - 保留duration数据展示,但不再用于告警判断 - 聚焦TTFT作为主要的响应速度告警指标 影响范围: - Backend: handler, service, models, tests - Frontend: API types, i18n, components
-
IanShaw027 authored
- 增强告警事件状态验证,添加合法状态值检查 - 移除重试逻辑中的遗留字段赋值 - 修正仓库不可用时的错误类型 - 格式化测试文件代码
-
IanShaw027 authored
- 添加告警静默管理接口 - 扩展错误日志查询和操作接口 - 新增重试和解决状态相关端点 - 完善错误日志记录功能
-
- 13 Jan, 2026 3 commits
-
-
yangjianbo authored
完善 function_call_output 续链校验与引用匹配 续链场景强制 store=true,过滤 input 时避免副作用 补充续链判断与过滤相关单元测试 测试: go test ./...
-
ianshaw authored
-
ianshaw authored
## 主要改动 1. **模型规范化扩展到所有账号** - 将 Codex 模型规范化(如 gpt-5-nano → gpt-5.1)应用到所有 OpenAI 账号类型 - 不再仅限于 OAuth 非 CLI 请求 - 解决 Codex CLI 使用 ChatGPT 账号时的模型兼容性问题 2. **reasoning.effort 参数规范化** - 自动将 `minimal` 转换为 `none` - 解决 gpt-5.1 模型不支持 `minimal` 值的问题 3. **Session/Conversation ID fallback 机制** - 从请求体多个字段提取 session_id/conversation_id - 优先级:prompt_cache_key → session_id → conversation_id → previous_response_id - 支持 Codex CLI 的会话保持 4. **Tool Call ID fallback** - 当 call_id 为空时使用 id 字段作为 fallback - 确保 tool call 输出能正确匹配 - 保留 item_reference 类型的 items 5. **Header 优化** - 添加 conversation_id 到允许的 headers - 移除删除 session headers 的逻辑 ## 相关 Issue - 参考 OpenCode issue #3118 关于 item_reference 的讨论
-
- 12 Jan, 2026 11 commits
-
-
xiluo authored
此提交解决了思考块 (thinking blocks) 在转发过程中的兼容性问题。 主要变更: 1. **思考块优化 (Thinking Blocks)**: - 在 AntigravityGatewayService 中增加了 sanitizeThinkingBlocks 处理,强制移除思考块中不支持的 cache_control 字段(避免 Anthropic/Vertex AI 报错) - 实现历史思考块展平 (Flattening):将非最后一条消息中的思考块转换为普通文本块,以绕过上游对历史思考块签名的严格校验 - 增加 cleanCacheControlFromGeminiJSON 作为最后一道防线,确保转换后的 Gemini 请求中不残留非法的 cache_control 2. **GatewayService 缓存控制优化**: - 更新缓存控制逻辑,跳过 thinking 块(thinking 块不支持 cache_control 字段) - 增加 removeCacheControlFromThinkingBlocks 函数强制清理 关联 Issue: #225
-
shaw authored
-
IanShaw027 authored
功能特性: - 自动识别并标记 count_tokens 请求的错误 - 支持配置是否在统计中忽略 count_tokens 错误 - 错误数据完整保留,仅在统计时动态过滤 技术实现: - ops_error_logger.go: 自动标记 count_tokens 请求 - ops_repo.go: INSERT 语句添加 is_count_tokens 字段 - ops_repo_dashboard.go: buildErrorWhere 核心过滤函数 - ops_repo_preagg.go: 预聚合统计中添加过滤 - ops_repo_trends.go: 趋势统计查询添加过滤(2 处) - ops_settings_models.go: 添加 ignore_count_tokens_errors 配置 - ops_settings.go: 配置验证和默认值设置 - ops_port.go: 错误日志模型添加 IsCountTokens 字段 业务价值: - count_tokens 是探测性请求,其错误不影响真实业务 SLA - 用户可根据需求灵活控制是否计入统计 - 提升错误率、告警等运维指标的准确性 影响范围: - Dashboard 概览统计 - 错误趋势图表 - 告警规则评估 - 预聚合指标(hourly/daily) - 健康分数计算
-
shaw authored
在 nginx 反向代理场景下,使用 ip.GetClientIP() 替代 c.ClientIP() 以正确获取客户端真实 IP 地址
-
shaw authored
- 在 Messages 方法中调用 SetClaudeCodeClientContext 启用客户端检测 - 修复 RecordUsageInput 未传递 UserAgent 和 IPAddress 的问题
-
IanShaw027 authored
-
IanShaw027 authored
- 添加实时流量handler处理逻辑 - 注册实时流量路由 - 扩展ops service接口定义
-
ianshaw authored
- 移除 TimeoutSeconds 字段,超时判定由网关配置控制 - 默认禁用流超时处理功能
-
ianshaw authored
- 添加 StreamTimeoutSettings 配置结构体和系统设置 - 实现 TimeoutCounterCache Redis 计数器用于累计超时次数 - 在 RateLimitService 添加 HandleStreamTimeout 方法 - 在 gateway_service、openai_gateway_service、antigravity_gateway_service 中调用超时处理 - 添加后端 API 端点 GET/PUT /admin/settings/stream-timeout - 添加前端配置界面到系统设置页面 - 支持配置:启用开关、超时阈值、处理方式、暂停时长、触发阈值、阈值窗口 默认配置: - 启用:true - 超时阈值:60秒 - 处理方式:临时不可调度 - 暂停时长:5分钟 - 触发阈值:3次 - 阈值窗口:10分钟
-
IanShaw027 authored
- 新增GetMetricThresholds和UpdateMetricThresholds接口 - 支持配置SLA、延迟P99、TTFT P99、请求错误率、上游错误率阈值 - 添加参数验证逻辑 - 提供默认阈值配置
-
shaw authored
-
- 11 Jan, 2026 5 commits
-
-
IanShaw027 authored
- 修复 ops_ws_handler.go 代码格式问题 - 修复所有未检查的错误返回值(Rows.Close 和 WriteString) - 更新 .golangci.yml 排除 ops 相关服务文件的 redis 导入检查
-
IanShaw027 authored
- 修复 ops_ws_handler.go 中的代码格式和返回值 - 移除 ops_repo_latency_histogram_buckets.go 中不必要的错误检查 - 修复 api_contract_test.go 缩进并添加运维监控配置项测试 - 移除 ops_cleanup_service.go 中未使用的变量 - 添加 ops_retry.go 中缺失的 status 字段
-
IanShaw027 authored
- 修复depguard错误:为ops service文件添加redis导入例外 - 修复errcheck错误:添加错误检查和类型断言检查 - 修复gofmt错误:格式化代码 - 修复ineffassign错误:移除无效的idx++赋值 - 修复staticcheck错误:合并条件赋值 - 修复unused错误:移除未使用的字段和函数 - ops_cleanup_service.go: entryID字段 - ops_retry.go: status字段 - ops_upstream_context.go: getOpsUpstreamErrors函数
-
IanShaw027 authored
- 优化错误日志中间件,即使请求成功也记录上游重试/故障转移事件 - 新增OpsScheduledReportService支持定时报告功能 - 使用Redis分布式锁确保定时任务单实例执行 - 完善依赖注入配置 - 优化前端错误趋势图表展示
-
IanShaw027 authored
- 在 .env.example 和 config.example.yaml 中添加 ops.enabled 配置项 - 默认值为 true,保持现有行为 - 当设置为 false 时,左侧栏隐藏运维监控菜单并禁用所有运维监控功能 - 修改后端 GetSettings API,让 ops_monitoring_enabled 受 config.ops.enabled 控制 - 数据清理和预聚合任务默认保持开启状态(通过运维监控设置对话框配置)
-