Skip to content

Commit 36327b4

Browse files
committed
release: v4.1.24 - dynamic model limits, warmup fix and version update
1 parent 128249e commit 36327b4

File tree

25 files changed

+519
-152
lines changed

25 files changed

+519
-152
lines changed

Casks/antigravity-tools.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cask "antigravity-tools" do
2-
version "4.1.23"
2+
version "4.1.24"
33
sha256 :no_check
44

55
name "Antigravity Tools"

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Antigravity Tools 🚀
2-
> 专业级 AI 账号管理与协议代理系统 (v4.1.23)
2+
> 专业级 AI 账号管理与协议代理系统 (v4.1.24)
33
<div align="center">
44
<img src="public/icon.png" alt="Antigravity Logo" width="120" height="120" style="border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);">
55
@@ -8,7 +8,7 @@
88

99
<p>
1010
<a href="https://github.com/lbjlaq/Antigravity-Manager">
11-
<img src="https://img.shields.io/badge/Version-4.1.23-blue?style=flat-square" alt="Version">
11+
<img src="https://img.shields.io/badge/Version-4.1.24-blue?style=flat-square" alt="Version">
1212
</a>
1313
<img src="https://img.shields.io/badge/Tauri-v2-orange?style=flat-square" alt="Tauri">
1414
<img src="https://img.shields.io/badge/Backend-Rust-red?style=flat-square" alt="Rust">
@@ -121,7 +121,7 @@ graph TD
121121

122122
**Linux / macOS:**
123123
```bash
124-
curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/v4.1.23/install.sh | bash
124+
curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/v4.1.24/install.sh | bash
125125
```
126126

127127
**Windows (PowerShell):**
@@ -131,7 +131,7 @@ irm https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.ps
131131

132132
> **支持的格式**: Linux (`.deb` / `.rpm` / `.AppImage`) | macOS (`.dmg`) | Windows (NSIS `.exe`)
133133
>
134-
> **高级用法**: 安装指定版本 `curl -fsSL ... | bash -s -- --version 4.1.23`,预览模式 `curl -fsSL ... | bash -s -- --dry-run`
134+
> **高级用法**: 安装指定版本 `curl -fsSL ... | bash -s -- --version 4.1.24`,预览模式 `curl -fsSL ... | bash -s -- --dry-run`
135135
136136
#### macOS - Homebrew
137137
如果您已安装 [Homebrew](https://brew.sh/),也可以通过以下命令安装:
@@ -431,6 +431,22 @@ response = client.chat.completions.create(
431431
## 📝 开发者与社区
432432

433433
* **版本演进 (Changelog)**:
434+
* **v4.1.24 (2026-02-26)**:
435+
- **[功能调整] 禁用自动预热调度程序,保留手动预热**:
436+
- **变更说明**: 为了减少不必要的后台资源占用,本版本已注释掉自动预热(Smart Warmup)的后台调度逻辑。
437+
- **设置隐藏**: 设置页面中的“智能预热”配置项已隐藏。
438+
- **手动保留**: 账号管理页面的手动预热功能保持不变,仍可正常使用。
439+
- **恢复指引**: 如果您需要自动预热功能,可以自行拉取本项目源代码,在 `src-tauri/src/lib.rs` 中取消 `start_scheduler` 的注释并解除 `Settings.tsx` 中相关 UI 的注释后重新编译使用。
440+
- **[核心修复] 智能版本指纹选择与启动 Panic 修复 (Issue #2123)**:
441+
- **问题根源**: 1) `constants.rs` 中的 `KNOWN_STABLE_VERSION` 硬编码了低版本号,当本地 IDE 检测失败时回退该版本作为请求头,导致 Google 拒绝 Gemini 3.1 Pro 模型。2) 新增的远端版本网络调用直接在 `LazyLock` 初始化(Tokio 异步上下文)中执行,导致 `Cannot block the current thread` 严重崩溃。
442+
- **修复方案**: 1) 引入"智能最大版本"策略 `max(本地版本, 远端版本, 4.1.24)`,始终取最高值。2) 将网络探测逻辑移至独立 OS 线程并配合 `mpsc` 通道,安全避开异步运行时限制。保证无论本地版本新旧,指纹均不低于上游要求,且应用能稳定启动。
443+
- **[核心修复] 动态模型 maxOutputTokens 限额系统 (替代 PR #2119 硬编码方案)**:
444+
- **问题根源**: 部分客户端发送的 `maxOutputTokens` 超过模型物理上限(如 Flash 限制 64k),导致上游返回 400 错误。
445+
- **三层限额架构**:
446+
- **第一层(动态优先)**: 实时读取账号 `quota.models` 数据。
447+
- **第二层(静态默认表)**: `model_limits.rs` 内置已知限额(如 Flash 65536)。
448+
- **第三层(全局兜底)**: 默认 131072。
449+
- **实现细节**: 在 `wrap_request()` 中注入裁剪逻辑,确保请求参数合法。
434450
* **v4.1.23 (2026-02-25)**:
435451
- **[安全增强] 优化与原生对齐应用层与底层特征指纹,提升请求稳定性与防拦截能力。**
436452
- **[核心修复] 将 v1beta thinkingLevel 转换为 v1internal thinkingBudget (PR #2095)**:
@@ -444,7 +460,7 @@ response = client.chat.completions.create(
444460
- **输入验证 (`Settings.tsx`)**: 将 `refresh_interval``sync_interval` 输入框的 `max` 属性从 `60` 更新为 `35791`(35791 min × 60000 < INT32_MAX),并在 `onChange` 中添加 `NaN` fallback(默认为 1)及范围夹紧 `[1, 35791]`,从源头阻断非法值输入。
445461
- **[核心优化] OAuth 换票专属:剔除 JA3 指纹与动态 User-Agent 伪装**:
446462
- **纯净请求**: 仅针对 `exchange_code`(首次授权)和 `refresh_access_token`(静默续期)的换票请求,移除了底层网络库的 Chrome JA3 指纹伪装,恢复标准纯净的 TLS特征。
447-
- **动态 UA**: 换票时自动提取编译时版本号 (`CURRENT_VERSION`) 构建专属的 `User-Agent`(如 `vscode/1.X.X (Antigravity/4.1.23)`),以匹配纯净 TLS 链路。
463+
- **动态 UA**: 换票时自动提取编译时版本号 (`CURRENT_VERSION`) 构建专属的 `User-Agent`(如 `vscode/1.X.X (Antigravity/4.1.24)`),以匹配纯净 TLS 链路。
448464
- **[功能增强] API 反代页面与设置页模型列表全面接入动态模型数据**:
449465
- **问题根源**: "API 反代 → 支持模型与集成"列表与"模型路由中心"的目标模型选择下拉框,以及"设置 → 固定配额模型"列表,此前均仅从静态 `MODEL_CONFIG` 读取硬编码模型信息,导致账号实际下发的动态新模型(如 `GPT-OSS 120B``Gemini 3.1 Pro (High)` 等)无法出现在这些列表中。
450466
- **修复方案**:

README_EN.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Antigravity Tools 🚀
2-
> Professional AI Account Management & Protocol Proxy System (v4.1.23)
2+
> Professional AI Account Management & Protocol Proxy System (v4.1.24)
33
44
<div align="center">
55
<img src="public/icon.png" alt="Antigravity Logo" width="120" height="120" style="border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);">
@@ -9,7 +9,7 @@
99

1010
<p>
1111
<a href="https://github.com/lbjlaq/Antigravity-Manager">
12-
<img src="https://img.shields.io/badge/Version-4.1.23-blue?style=flat-square" alt="Version">
12+
<img src="https://img.shields.io/badge/Version-4.1.24-blue?style=flat-square" alt="Version">
1313
</a>
1414
<img src="https://img.shields.io/badge/Tauri-v2-orange?style=flat-square" alt="Tauri">
1515
<img src="https://img.shields.io/badge/Backend-Rust-red?style=flat-square" alt="Rust">
@@ -122,7 +122,7 @@ Automatically detects your OS, architecture, and package manager — one command
122122

123123
**Linux / macOS:**
124124
```bash
125-
curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/v4.1.23/install.sh | bash
125+
curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/v4.1.24/install.sh | bash
126126
```
127127

128128
**Windows (PowerShell):**
@@ -132,7 +132,7 @@ irm https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.ps
132132

133133
> **Supported formats**: Linux (`.deb` / `.rpm` / `.AppImage`) | macOS (`.dmg`) | Windows (NSIS `.exe`)
134134
>
135-
> **Advanced usage**: Install a specific version `curl -fsSL ... | bash -s -- --version 4.1.23`, dry-run mode `curl -fsSL ... | bash -s -- --dry-run`
135+
> **Advanced usage**: Install a specific version `curl -fsSL ... | bash -s -- --version 4.1.24`, dry-run mode `curl -fsSL ... | bash -s -- --dry-run`
136136
137137
#### macOS - Homebrew
138138
If you have [Homebrew](https://brew.sh/) installed, you can also install via:
@@ -283,20 +283,32 @@ print(response.choices[0].message.content)
283283
## 📝 Developer & Community
284284
285285
* **Changelog**:
286+
* **v4.1.24 (2026-02-26)**:
287+
- **[Feature Adjustment] Disabled Automatic Warmup Scheduler, Retained Manual Warmup**:
288+
- **Change Summary**: To reduce unnecessary background resource usage, the background scheduler for Automatic Warmup (Smart Warmup) has been commented out in this version.
289+
- **UI Hidden**: The "Smart Warmup" configuration section in the Settings page has been hidden.
290+
- **Manual Retained**: Manual warmup functionality in the Account Management page remains fully functional.
291+
- **Restoration Guide**: Users who require automatic warmup can clone the repository and uncomment the `start_scheduler` calls in `src-tauri/src/lib.rs` and the related UI in `Settings.tsx` before rebuilding.
292+
- **[Core Fix] Smart Version Fingerprint Selection & Startup Panic Fix (Issue #2123)**:
293+
- **Root Cause**: 1) `KNOWN_STABLE_VERSION` in `constants.rs` was hardcoded to an outdated version. When local detection failed, this old version was used as `x-client-version`, causing Google to reject Gemini 3.1 Pro requests. 2) The new remote version fetching logic was executed within its `LazyLock` initializer on the main thread (Tokio async context), triggering a `Cannot block the current thread` panic.
294+
- **Fix**: 1) Implemented a "Smart Max Version" strategy: `max(local_version, remote_version, 4.1.24)`. 2) Refactored the network probe to run in a dedicated OS thread over `mpsc` channels, safely bypassing async runtime restrictions. This ensures that the client fingerprint always meets upstream requirements and the application starts reliably.
295+
- **[Core Fix] Dynamic Model maxOutputTokens Limit System (Replaces hardcoded approach in PR #2119)**:
296+
- **Root Cause**: Some clients send `maxOutputTokens` exceeding the physical limits of models (e.g., Flash capped at 64k), causing `400 INVALID_ARGUMENT` from the upstream API.
297+
- **Three-Tier Limit Architecture**:
298+
- **Tier 1 (Dynamic Priority)**: Reads real-time quota data from accounts.
299+
- **Tier 2 (Static Default Table)**: `model_limits.rs` with known defaults (e.g., Flash: 65536).
300+
- **Tier 3 (Global Fallback)**: Default 131072.
301+
- **Implementation Details**: Injected clamping logic in `wrap_request()` to ensure parameter compliance.
286302
* **v4.1.23 (2026-02-25)**:
287303
- **[Security Enhancement] Aligned application-layer and low-level protocol fingerprints with native clients to improve request stability and anti-interception capabilities.**
288-
- **[Core Fix] Convert v1beta thinkingLevel to v1internal thinkingBudget (PR #2095)**:
289-
- **Root Cause**: Clients like OpenClaw and Cline send v1beta-style `thinkingLevel` strings (`"NONE"` / `"LOW"` / `"MEDIUM"` / `"HIGH"`) in `generationConfig.thinkingConfig`. When AGM proxies through Google's v1internal API, Google rejects `thinkingLevel` with `400 INVALID_ARGUMENT` because v1internal only accepts the numeric `thinkingBudget`.
290-
- **Fix**: Inserted an early conversion step inside `wrap_request()` before any existing budget processing logic: detect the `thinkingLevel` string, map it to a numeric `thinkingBudget` (`NONE`→0, `LOW`→4096, `MEDIUM`→8192, `HIGH`→24576), remove `thinkingLevel`, and write `thinkingBudget`. This ensures all downstream logic (budget capping, `maxOutputTokens` adjustment, adaptive detection) sees the correct numeric budget.
291-
- **Testing**: Verified with OpenClaw sending `thinkingLevel: "LOW"` to `gemini-3.1-pro-high` via Gemini native protocol — requests now return `200 OK` instead of the previous `400` error.
292304
- **[Core Fix] Resolve Account Data Corruption and Background Task Infinite Loops (PR #2094)**:
293305
- **Root Cause**: When a user enters an excessively large interval value (e.g., 999999999), `interval * 60 * 1000` exceeds the JS engine's signed 32-bit integer limit (`2,147,483,647ms`). The browser silently clamps the `setInterval` delay to 1ms, causing the frontend to fire `refreshAllQuotas`/`syncAccountFromDb` thousands of times per second, flooding the backend with concurrent writes to the same `[uuid].json` file, interleaving byte streams, and permanently corrupting account data.
294306
- **Atomic File Writes (`account.rs`)**: `save_account` now writes to a UUID-suffixed temp file first, then atomically replaces the target via `fs::rename` (POSIX) / `MoveFileExW` (Windows), consistent with the existing `save_account_index` implementation, eliminating race-condition corruption at the source.
295307
- **setInterval Overflow Guard (`BackgroundTaskRunner.tsx`)**: Applied `Math.min(..., 2147483647)` to the computed delay for both the refresh and sync timers, preventing INT32_MAX overflow from silently clamping intervals to 1ms.
296308
- **Input Validation (`Settings.tsx`)**: Updated the `max` attribute for `refresh_interval` and `sync_interval` inputs from `60` to `35791` (35791 min × 60000 < INT32_MAX), and added `NaN` fallback (defaults to 1) with range clamping `[1, 35791]` in `onChange` to block invalid values at the source.
297309
- **[Core Optimization] OAuth Token Exchange Only: Remove JA3 Fingerprinting and Dynamic User-Agent Masking**:
298310
- **Pure Requests**: Specifically for `exchange_code` (initial authorization) and `refresh_access_token` (silent renewal) requests, the Chrome JA3 fingerprint emulation has been removed to revert to standard pure TLS characteristics.
299-
- **Dynamic UA**: During token exchange, the system automatically extracts the compiled version (`CURRENT_VERSION`) to construct a dedicated `User-Agent` (e.g., `vscode/1.X.X (Antigravity/4.1.23)`), matching the pure TLS connection.
311+
- **Dynamic UA**: During token exchange, the system automatically extracts the compiled version (`CURRENT_VERSION`) to construct a dedicated `User-Agent` (e.g., `vscode/1.X.X (Antigravity/4.1.24)`), matching the pure TLS connection.
300312
- **[Feature Enhancement] API Proxy Page and Settings Model Lists Now Fully Dynamic**:
301313
- **Root Cause**: The "API Proxy → Supported Models & Integration" list, the target model dropdown in "Model Router", and the "Settings → Pinned Quota Models" list all previously read only from the static `MODEL_CONFIG`, causing dynamically issued models (e.g., `GPT-OSS 120B`, `Gemini 3.1 Pro (High)`) to never appear in these lists.
302314
- **Fix**:

install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Usage: irm https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.ps1 | iex
33
#
44
# Parameters (set before running):
5-
# $Version = "4.1.23" # Install specific version
5+
# $Version = "4.1.24" # Install specific version
66
# $DryRun = $true # Preview commands without executing
77

88
if (-not $Version) { $Version = "" }
@@ -85,12 +85,12 @@ function Get-ReleaseVersion {
8585
}
8686

8787
Script-Error "Failed to determine latest version. Try specifying version manually:"
88-
Write-Host ' $Version = "4.1.23"; irm https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.ps1 | iex' -ForegroundColor Yellow
88+
Write-Host ' $Version = "4.1.24"; irm https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.ps1 | iex' -ForegroundColor Yellow
8989
return $false
9090
}
9191

9292
function Get-DownloadUrl {
93-
# NSIS installer: Antigravity.Tools_4.1.23_x64-setup.exe
93+
# NSIS installer: Antigravity.Tools_4.1.24_x64-setup.exe
9494
$script:DownloadUrl = "https://github.com/$Repo/releases/download/v$($script:ReleaseVersion)/Antigravity.Tools_$($script:ReleaseVersion)_x64-setup.exe"
9595
$script:Filename = "Antigravity.Tools_$($script:ReleaseVersion)_x64-setup.exe"
9696

install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Usage:
4343
curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash
4444
4545
# Install specific version
46-
curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | VERSION=4.1.20 bash
46+
curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | VERSION=4.1.24 bash
4747
4848
Options:
4949
--help Show this help message
@@ -151,17 +151,17 @@ build_download_url() {
151151
linux)
152152
case "$PKG_EXT" in
153153
deb)
154-
# Antigravity.Tools_4.1.20_amd64.deb or _arm64.deb
154+
# Antigravity.Tools_4.1.24_amd64.deb or _arm64.deb
155155
DOWNLOAD_URL="${base_url}/Antigravity.Tools_${RELEASE_VERSION}_${DEB_ARCH}.deb"
156156
FILENAME="Antigravity.Tools_${RELEASE_VERSION}_${DEB_ARCH}.deb"
157157
;;
158158
rpm)
159-
# Antigravity.Tools-4.1.20-1.x86_64.rpm or -1.aarch64.rpm
159+
# Antigravity.Tools-4.1.24-1.x86_64.rpm or -1.aarch64.rpm
160160
DOWNLOAD_URL="${base_url}/Antigravity.Tools-${RELEASE_VERSION}-1.${RPM_ARCH}.rpm"
161161
FILENAME="Antigravity.Tools-${RELEASE_VERSION}-1.${RPM_ARCH}.rpm"
162162
;;
163163
AppImage)
164-
# Antigravity.Tools_4.1.20_amd64.AppImage or _aarch64.AppImage
164+
# Antigravity.Tools_4.1.24_amd64.AppImage or _aarch64.AppImage
165165
local appimage_arch
166166
if [[ "$ARCH_LABEL" == "x86_64" ]]; then
167167
appimage_arch="amd64"

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "4.1.23",
2+
"version": "4.1.24",
33
"name": "antigravity-tools",
44
"type": "module",
55
"private": true,

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "antigravity_tools"
3-
version = "4.1.23"
3+
version = "4.1.24"
44
description = "A Tauri App"
55
authors = ["you"]
66
license = "CC-BY-NC-SA-4.0"

0 commit comments

Comments
 (0)