You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**问题根源**: 1) `constants.rs` 中的 `KNOWN_STABLE_VERSION` 硬编码了低版本号,当本地 IDE 检测失败时回退该版本作为请求头,导致 Google 拒绝 Gemini 3.1 Pro 模型。2) 新增的远端版本网络调用直接在 `LazyLock` 初始化(Tokio 异步上下文)中执行,导致 `Cannot block the current thread` 严重崩溃。
- **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.
- **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.
286
302
* **v4.1.23 (2026-02-25)**:
287
303
- **[Security Enhancement] Aligned application-layer and low-level protocol fingerprints with native clients to improve request stability and anti-interception capabilities.**
- **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.
292
304
- **[Core Fix] Resolve Account Data Corruption and Background Task Infinite Loops (PR #2094)**:
293
305
- **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.
294
306
- **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.
295
307
- **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.
296
308
- **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.
- **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.
300
312
- **[Feature Enhancement] API Proxy Page and Settings Model Lists Now Fully Dynamic**:
301
313
- **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.
0 commit comments