- 05 Apr, 2026 2 commits
- 04 Apr, 2026 3 commits
-
-
erio authored
- Remove unused claudeMax*Tokens constants (Claude Max feature not included) - Remove unused UsageMapHook type, SetUsageMapHook method, and usageToMap function - Fix gofmt formatting in channel_service.go, openai_model_mapping_test.go, chatcompletions_to_responses.go
-
erio authored
- Add int64(0) param to SelectAccountWithLoadAwareness callers (signature change from channel scheduling refactor) - Add UsageMapHook type and struct field to StreamingProcessor - Revert Claude Max cache billing code to upstream/main (not part of channel feature) - Revert credits overages logic to upstream/main (non-channel change) - Remove Instructions field reference (non-channel OpenAI feature) - Restore sora_client_handler_test.go from upstream + add channel service nil params
-
erio authored
- Parse candidatesTokensDetails from Gemini API to separate image/text output tokens - Add image_output_tokens and image_output_cost to usage_log (migration 089) - Support per-image-token pricing via output_cost_per_image_token from model pricing data - Channel pricing ImageOutputPrice override works in token billing mode - Auto-fill image_output_price in channel pricing form from model defaults - Add "channel_mapped" billing model source as new default (migration 088) - Bills by model name after channel mapping, before account mapping - Fix channel cache error TTL sign error (115s → 5s) - Fix Update channel only invalidating new groups, not removed groups - Fix frontend model_mapping clearing sending undefined instead of {} - Credits balance precheck via shared AccountUsageService cache before injection - Skip credits injection for accounts with insufficient balance - Don't mark credits exhausted for "exhausted your capacity on this model" 429s
-
- 31 Mar, 2026 2 commits
- 25 Mar, 2026 3 commits
-
-
QTom authored
- gofmt: 修复 admin_service/antigravity_oauth_service/token_refresh_service 格式 - staticcheck S1009: 移除 SetUserSettingsResponse.IsSuccess 中冗余的 nil 检查 - unused: 将仅测试使用的 applyAntigravitySubscriptionResult 移至测试文件 Made-with: Cursor
-
QTom authored
复用已有 GetTier() 返回的 tier ID(free-tier / g1-pro-tier / g1-ultra-tier),通过 TierIDToPlanType 映射为 Free / Pro / Ultra, 在 loadProjectIDWithRetry 中顺带提取并写入 credentials.plan_type; 前端增加 Abnormal 异常套餐红色标记。 Made-with: Cursor
-
QTom authored
新增 Antigravity OAuth 隐私设置能力,在账号创建、刷新、导入和后台 Token 刷新路径自动调用 setUserSettings + fetchUserInfo 关闭遥测; 持久化后同步内存 Extra,错误处理改为日志记录。 Made-with: Cursor
-
- 19 Mar, 2026 2 commits
-
-
erio authored
## Problem When a proxy is unreachable, token refresh retries up to 4 times with 30s timeout each, causing requests to hang for ~2 minutes before failing with a generic 502 error. The failed account is not marked, so subsequent requests keep hitting it. ## Changes ### Proxy connection fast-fail - Set TCP dial timeout to 5s and TLS handshake timeout to 5s on antigravity client, so proxy connectivity issues fail within 5s instead of 30s - Reduce overall HTTP client timeout from 30s to 10s - Export `IsConnectionError` for service-layer use - Detect proxy connection errors in `RefreshToken` and return immediately with "proxy unavailable" error (no retries) ### Token refresh temp-unschedulable - Add 8s context timeout for token refresh on request path - Mark account as temp-unschedulable for 10min when refresh fails (both background `TokenRefreshService` and request-path `GetAccessToken`) - Sync temp-unschedulable state to Redis cache for immediate scheduler effect - Inject `TempUnschedCache` into `AntigravityTokenProvider` ### Account failover - Return `UpstreamFailoverError` on `GetAccessToken` failure in `Forward`/`ForwardGemini` to trigger handler-level account switch instead of returning 502 directly ### Proxy probe alignment - Apply same 5s dial/TLS timeout to shared `httpclient` pool - Reduce proxy probe timeout from 30s to 10s
-
shaw authored
-
- 16 Mar, 2026 1 commit
-
-
erio authored
-
- 15 Mar, 2026 2 commits
-
-
erio authored
- Fix gofmt alignment in admin_service.go and trailing newline in antigravity_credits_overages.go - Suppress errcheck for fmt.Sscanf in client.go GetMinimumAmount
-
SilentFlower authored
-
- 13 Mar, 2026 1 commit
-
-
erio authored
Backend: - Detect and classify 403 responses into three types: validation (account needs Google verification), violation (terms of service / banned), forbidden (generic 403) - Extract verification/appeal URLs from 403 response body (structured JSON parsing with regex fallback) - Add needs_verify, is_banned, needs_reauth, error_code fields to UsageInfo (omitempty for zero impact on other platforms) - Handle 403 in request path: classify and permanently set account error - Save validation_url in error_message for degraded path recovery - Enrich usage with account error on both success and degraded paths - Add singleflight dedup for usage requests with independent context - Differentiate cache TTL: success/403 → 3min, errors → 1min - Return degraded UsageInfo instead of HTTP 500 on quota fetch errors Frontend: - Display forbidden status badges with color coding (red for banned, amber for needs verification, gray for generic) - Show clickable verification/appeal URL links - Display needs_reauth and degraded error states in usage cell - Add Antigravity tier label badge next to platform type Tests: - Comprehensive unit tests for classifyForbiddenType (7 cases) - Unit tests for extractValidationURL (8 cases including unicode escapes) - Integration test for FetchQuota forbidden path
-
- 12 Mar, 2026 1 commit
-
-
kunish authored
The SSE stream termination marker string was incorrectly included in DefaultStopSequences, causing Gemini to prematurely stop generating output whenever the model produced text containing that marker. The SSE-level protocol filtering in stream_transformer.go already handles this marker correctly; it should not be a stop sequence for the model's text generation.
-
- 11 Mar, 2026 1 commit
-
-
Rose Ding authored
-
- 09 Mar, 2026 2 commits
- 06 Mar, 2026 1 commit
-
-
Elysia authored
-
- 03 Mar, 2026 1 commit
-
-
shaw authored
PR #682 (release → main 全量同步) 将 Antigravity 和 Gemini CLI 的 OAuth client_secret 硬编码值替换为了 "GOCSPX-your-client-secret" 占位符, 导致未配置环境变量的部署环境中 token 刷新失败。 恢复内容: - antigravity/oauth.go: 恢复真实 client_secret - antigravity/oauth_test.go: 恢复测试断言中的真实值 - geminicli/constants.go: 恢复真实 client_secret
-
- 02 Mar, 2026 1 commit
-
-
QTom authored
提取 proxyurl.Parse() 公共包,将分散在 6 处的代理 URL 验证逻辑 统一收敛,确保无效代理配置在创建时立即失败,永不静默回退直连。 主要变更: - 新增 proxyurl 包:统一 TrimSpace → url.Parse → Host 校验 → Scheme 白名单 - socks5:// 自动升级为 socks5h://,防止 DNS 泄漏(大小写不敏感) - antigravity: http.ProxyURL → proxyutil.ConfigureTransportProxy 支持 SOCKS5 - openai_oauth: 删除 newOpenAIOAuthHTTPClient,收编至 httpclient.GetClient - 移除未使用的 ProxyStrict 字段(fail-fast 已是全局默认行为) - 补充 15 个 proxyurl 测试 + pricing/usage fail-fast 测试
-
- 28 Feb, 2026 1 commit
-
-
yangjianbo authored
-
- 27 Feb, 2026 1 commit
-
-
erio authored
Update the default user-agent version from 1.18.4 to 1.19.6 to match the latest official antigravity client.
-
- 26 Feb, 2026 1 commit
-
-
cagedbird043 authored
-
- 25 Feb, 2026 2 commits
-
-
cagedbird043 authored
-
cagedbird043 authored
-
- 24 Feb, 2026 7 commits
-
-
erio authored
The ClientSecret constant was left as an empty string after getClientSecret() was refactored to use defaultClientSecret. Remove the dead constant and update the test accordingly.
-
erio authored
- Fix oauth_test.go and client_test.go to use defaultClientSecret variable instead of env var (init() already sets the default) - Align migration 058 gemini-3-pro-high/low/preview mappings with constants.go (map to 3.1 versions)
-
erio authored
Add a built-in default for ANTIGRAVITY_OAUTH_CLIENT_SECRET so the service works out of the box without requiring environment variable configuration. The env var can still override the default.
-
erio authored
-
erio authored
Update the default ANTIGRAVITY_USER_AGENT_VERSION from 1.84.2 to 1.18.4 to match the current Antigravity-Manager desktop client.
-
erio authored
Add claude-sonnet-4-6 to identity injection modelInfoMap and Antigravity model selector. Add gemini-3.1-pro-high/low to Antigravity model list and Sonnet 4.6 preset mapping.
-
shaw authored
- oauth.go: GetUserAgent() 缺少闭合大括号导致语法错误 - client_test.go/oauth_test.go: UserAgent 变量已重构为 GetUserAgent(),更新测试引用 - model_rate_limit_test.go: gemini-3-pro-preview 映射目标已更新为 gemini-3.1-pro-high,同步测试
-
- 23 Feb, 2026 1 commit
-
-
cagedbird043 authored
-
- 11 Feb, 2026 4 commits
-
-
sususu98 authored
Gemini 2.5 Pro/Flash thinking models return thoughtsTokenCount separately from candidatesTokenCount in usageMetadata, but this field was not parsed or included in billing calculations, causing thinking tokens to be unbilled. - Add ThoughtsTokenCount field to GeminiUsageMetadata struct - Include thoughtsTokenCount in OutputTokens across all 3 Gemini usage parsing paths (non-streaming, streaming, compat layer) - Add tests covering thinking token scenarios Closes #554
-
Edric Li authored
- 新增 OnboardUser API 客户端方法,支持账号 onboarding 获取 project_id - loadProjectIDWithRetry 增加 onboard 回退:LoadCodeAssist 未返回 project_id 时自动触发 onboarding - GetAccessToken 中 project_id 补齐改用轻量 FillProjectID 替代全量 RefreshAccountToken - 补齐逻辑增加 5 分钟冷却机制,防止频繁重试 - OnboardUser 轮询等待改为 context 感知,支持提前取消 - 提取 mergeCredentials 辅助方法消除重复代码 - 新增 extractProjectIDFromOnboardResponse 和 resolveDefaultTierID 单元测试
-
SilentFlower authored
🧠 refactor(antigravity): 完善 thinking 预算分配策略并重构工具构建逻辑
-
SilentFlower authored
✨ feat(antigravity): 支持 thinking adaptive 类型并适配 Opus 4.6 动态预算 🧪 test(gateway): 增加 thinking 模式解析与签名块过滤的边界用例测试
-