- 05 Feb, 2026 5 commits
-
-
ianshaw authored
-
ianshaw authored
当 Gemini for Google Cloud API 未启用时(SERVICE_DISABLED 错误), 系统现在会: - 自动检测 403 PERMISSION_DENIED 错误 - 从错误响应中提取 API 激活 URL - 向用户显示清晰的错误消息和可点击的激活链接 - 提供操作指引(启用后等待几分钟) 新增文件: - internal/pkg/googleapi/error.go: Google API 错误解析器 - internal/pkg/googleapi/error_test.go: 完整的测试覆盖 - GEMINI_API_ERROR_HANDLING.md: 实现文档 修改文件: - internal/repository/geminicli_codeassist_client.go: 在 LoadCodeAssist 和 OnboardUser 中增强错误处理 这大大改善了用户体验,用户不再需要手动从错误日志中查找激活 URL。
-
IanShaw027 authored
问题:Google One Ultra 等已注册用户在 OAuth 授权时,如果 LoadCodeAssist 返回了 currentTier/paidTier 但没有返回 cloudaicompanionProject,之前的 逻辑会继续调用 onboardUser,导致 INVALID_ARGUMENT 错误。 修复:对齐 Gemini CLI 的处理逻辑: - 当检测到用户已注册(有 currentTier/paidTier)时,不再调用 onboardUser - 先尝试从 Cloud Resource Manager 获取可用项目 - 如果仍无法获取,返回友好的错误提示,引导用户手动填写 Project ID 这个修复解决了 Google One 订阅用户无法正常授权的问题。
-
shaw authored
未知工具名不再进行 PascalCase/snake_case 转换,保持原样透传。 修复 text_editor_20250728 等 Anthropic 特殊工具被错误转换的问题。
-
Wesley Liddick authored
fix: remove unsupported safety_identifier and previous_response_id fields from upstream requests
-
- 04 Feb, 2026 4 commits
-
-
shaw authored
问题:normalizeClaudeModelForAnthropic 函数错误地将长模型ID截断为短ID, 导致 APIKey 账号的模型名被错误修改。 修复: - 删除错误的 normalizeClaudeModelForAnthropic 函数和 anthropicPrefixMappings 变量 - 直接使用 claude.NormalizeModelID(正确的短ID->长ID扩展) - APIKey 账号无显式映射时透传原始模型名
-
Wesley Liddick authored
fix(gemini): 优化 Gemini 接口认证兼容性,支持 Authorization: Bearer
-
柴叁 authored
调整 API key 提取优先级,让 /v1beta 接口同时支持 x-goog-api-key 和 Authorization: Bearer 两种认证方式,解决 OpenClaw 等使用 Bearer 认证 的客户端无法直接访问 Gemini 接口的问题。
-
Payne Fu authored
Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
- 03 Feb, 2026 31 commits
-
-
Wesley Liddick authored
fix(api): 修复 thinking 块被意外修改导致的 400 错误
-
Wesley Liddick authored
fix(gemini): 导出 DummyThoughtSignature 常量并修复跨账号签名验证
-
Wesley Liddick authored
fix(openai): 统一 OAuth instructions 处理逻辑,修复 Codex CLI 400 错误
-
shaw authored
-
Wesley Liddick authored
Antigravity 相关BUG修复及调度优化
-
Wesley Liddick authored
-
liuxiongfeng authored
- 将 dummyThoughtSignature 改为导出的 DummyThoughtSignature 常量,供跨包使用 - 修改 gemini_native_signature_cleaner.go 将删除签名改为替换为 dummy 签名 这样可以跳过 Gemini 3 的签名验证,解决粘性会话切换账号时的验证失败问题 - 更新相关测试文件 Fixes: 粘性会话切换账号时 thoughtSignature 验证失败导致 400 错误
-
liuxiongfeng authored
- 修改 applyCodexOAuthTransform 函数签名,增加 isCodexCLI 参数 - 移除 && !isCodexCLI 条件,对所有 OAuth 请求统一处理 - 新增 applyInstructions/applyCodexCLIInstructions/applyOpenCodeInstructions 辅助函数 - 新增 isInstructionsEmpty 函数检查 instructions 字段是否为空 - 添加 Codex CLI 和非 Codex CLI 场景的测试用例 逻辑说明: - Codex CLI + 有 instructions: 保持不变 - Codex CLI + 无 instructions: 补充 opencode 指令 - 非 Codex CLI: 使用 opencode 指令覆盖
-
Wesley Liddick authored
feat(api-key): 添加API密钥独立配额和过期时间功能
-
bayma888 authored
-
bayma888 authored
Add quota, quota_used, expires_at fields to expected JSON responses in POST /api/v1/keys and GET /api/v1/keys test cases.
-
Wesley Liddick authored
fix(proxy): 增加代理探测的多 URL 回退机制
-
bayma888 authored
- Add missing IncrementQuotaUsed method to stubApiKeyRepo in api_contract_test.go - Fix gofmt formatting issues in api_key_service.go, dto/types.go, api_key_handler.go
-
Wesley Liddick authored
feat(admin): 管理员可查看每个用户充值和并发变动记录、点击余额可直接查看、优化弹框UI
-
bayma888 authored
Add the missing IncrementQuotaUsed method to: - fakeAPIKeyRepo (api_key_auth_google_test.go) - stubApiKeyRepo (api_key_auth_test.go) - apiKeyRepoStub (api_key_service_delete_test.go) - authRepoStub (api_key_service_cache_test.go)
-
bayma888 authored
This feature allows API Keys to have their own quota limits and expiration times, independent of the user's balance. Backend: - Add quota, quota_used, expires_at fields to api_key schema - Implement IsExpired() and IsQuotaExhausted() checks in middleware - Add ResetQuota and ClearExpiration API endpoints - Integrate quota billing in gateway handlers (OpenAI, Anthropic, Gemini) - Include quota/expiration fields in auth cache for performance - Expiration check returns 403, quota exhausted returns 429 Frontend: - Add quota and expiration inputs to key create/edit dialog - Add quick-select buttons for expiration (+7, +30, +90 days) - Add reset quota confirmation dialog - Add expires_at column to keys list - Add i18n translations for new features (en/zh) Migration: - Add 045_add_api_key_quota.sql for new columns
-
bayma888 authored
Add ListByUserPaginated and SumPositiveBalanceByUser methods
-
bayma888 authored
Add ListByUserPaginated and SumPositiveBalanceByUser to redeemRepoStub Add GetUserBalanceHistory to stubAdminService Fixes CI test compilation errors
-
JIA-ss authored
某些 AI API 专用代理只允许访问特定域名(如 anthropic.com、openai.com), 会拦截对 ip-api.com 的请求。本次修改增加了多 URL 回退机制: 1. 优先使用 ip-api.com(可获取详细地理信息:城市、地区、国家) 2. 若失败则回退到 httpbin.org/ip(仅获取 IP 地址,速度快) 主要变更: - 新增 probeURLs 列表支持多个探测 URL - 重构 ProbeProxy() 实现回退逻辑 - 新增 parseHTTPBin() 解析 httpbin.org 响应 - 优化错误信息,JSON 解析失败时显示响应体前 200 字符 Co-Authored-By:Claude <noreply@anthropic.com>
-
song authored
-
song authored
-
song authored
-
song authored
-
song authored
-
JIA-ss authored
问题描述: 使用扩展思考功能时,偶现以下错误: "thinking or redacted_thinking blocks in the latest assistant message cannot be modified" 根因分析: 当代理服务修改请求体中的某些字段时(如 metadata.user_id、model), 使用 map[string]any 解析整个 JSON 后重新序列化,导致: 1. 字段顺序改变(Go map 序列化按字母排序) 2. 数字格式变化(如 1.0 → 1) 3. Unicode 转义变化 Claude API 对 thinking 块进行字节级验证,任何变化都会触发错误。 修复内容: 1. identity_service.go - RewriteUserID/RewriteUserIDWithMasking 使用 json.RawMessage 保留其他字段的原始字节 2. gateway_service.go - replaceModelInBody 使用 json.RawMessage 保留其他字段的原始字节 3. gateway_service.go - normalizeClaudeOAuthRequestBody 保留 messages 的原始字节,跳过包含 thinking 块的消息修改 4. gateway_service.go - isThinkingBlockSignatureError 添加 "cannot be modified" 错误检测,触发自动重试 5. antigravity_gateway_service.go - isSignatureRelatedError 添加 "cannot be modified" 错误检测 Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
song authored
-
Wesley Liddick authored
fix: 混合渠道警告确认框和过滤 prompt_cache_retention 参数
-
Wesley Liddick authored
feat(antigravity): 支持按配额域(scope)级别限流
-
Wesley Liddick authored
feat(usage): add reasoning effort column
-
Wesley Liddick authored
feat(antigravity): map all gemini-2.5 to gemini-3 series
-
Wesley Liddick authored
fix(gemini): 为 Gemini 工具调用添加 thoughtSignature 避免 INVALID_ARGUMENT 错误
-