tuxevil-rotator 3.3.2 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [3.4.0] - 2026-09-03
6
+
7
+ ### Added
8
+ - **Gemini 3.8 Flash support**: Added the native Antigravity IDs `gemini-3.8-flash-high`, `gemini-3.8-flash-medium`, and `gemini-3.8-flash-low` across model discovery, routing, context limits, pricing, dashboards, telemetry, and integration documentation. All three IDs were discovered across nine configured accounts and verified with live generation ([#28](https://github.com/tuxevil/tuxevil-rotator/pull/28) by [@CyR1en](https://github.com/CyR1en)).
9
+
10
+ ### Changed
11
+ - **Antigravity client version**: Updated the default Antigravity user agent from `1.107.0` to `2.11.0`; the newer user agent is required for Gemini 3.8 Flash discovery and generation ([#28](https://github.com/tuxevil/tuxevil-rotator/pull/28) by [@CyR1en](https://github.com/CyR1en)).
12
+ - **Gemini 3.5 Flash catalog removal**: Removed Gemini 3.5 Flash from the user-facing supported-model catalog and defaults to match Antigravity 2.11. Backend discovery may still return legacy 3.5 quota entries ([#28](https://github.com/tuxevil/tuxevil-rotator/pull/28) by [@CyR1en](https://github.com/CyR1en)).
13
+
3
14
  ## [3.3.2] - 2026-08-28
4
15
 
5
16
  ### Fixed
package/README.md CHANGED
@@ -51,6 +51,10 @@ Originally built as a multi-account rotator for Google Antigravity. It now gener
51
51
 
52
52
  ---
53
53
 
54
+ ## Current Model Update
55
+
56
+ - **Gemini 3.8 Flash Support**: Native Antigravity model IDs `gemini-3.8-flash-high`, `gemini-3.8-flash-medium`, and `gemini-3.8-flash-low`, with 1M-token context, 65,536-token output, pricing, quota routing, dashboard visualization, and telemetry support. Gemini 3.5 Flash has been removed from the user-facing catalog to match Antigravity 2.11. ([PR #28](https://github.com/tuxevil/tuxevil-rotator/pull/28) by [@CyR1en](https://github.com/CyR1en))
57
+
54
58
  ## v3.2 Highlights
55
59
 
56
60
  - **Gemini 3.7 Flash Support**: Full support for Google's Gemini 3.7 Flash models (`gemini-3.7-flash`, `gemini-3.7-flash-tiered`, `gemini-3.7-flash-high`, `gemini-3.7-flash-medium`, `gemini-3.7-flash-low`) with reasoning effort / thinking level translation, pricing, dashboard visualization, and telemetry.
@@ -341,7 +345,7 @@ Thanks to these amazing people who have contributed to the project:
341
345
 
342
346
  - **[@CelestialCreator](https://github.com/CelestialCreator)** (Akshay) — Fixed admin token propagation on the hosted login landing page (`/login` to `/auth/antigravity/start`). ([PR #25](https://github.com/tuxevil/tuxevil-rotator/pull/25))
343
347
  - **[@Codder-hermes](https://github.com/Codder-hermes)** — Fixed Claude Code tool-schema requests by stripping the unsupported JSON Schema `propertyNames` keyword for Gemini and Claude-via-Gemini routes, with regression coverage for both compatibility paths. ([PR #19](https://github.com/tuxevil/tuxevil-rotator/pull/19))
344
- - **[@CyR1en](https://github.com/CyR1en)** (Ethan Bacurio) — Added Gemini 3.6 Flash and Gemini 3.7 Flash model families, shared quota-pool routing, pricing, dashboard support, and regression coverage. ([PR #18](https://github.com/tuxevil/tuxevil-rotator/pull/18), [PR #21](https://github.com/tuxevil/tuxevil-rotator/pull/21))
348
+ - **[@CyR1en](https://github.com/CyR1en)** (Ethan Bacurio) — Added Gemini 3.6, Gemini 3.7, and Gemini 3.8 Flash model families, shared quota-pool routing, pricing, dashboard support, integration documentation, and regression coverage. ([PR #18](https://github.com/tuxevil/tuxevil-rotator/pull/18), [PR #21](https://github.com/tuxevil/tuxevil-rotator/pull/21), [PR #28](https://github.com/tuxevil/tuxevil-rotator/pull/28))
345
349
  - **[@josenicomaia](https://github.com/josenicomaia)** (José Nicodemos Maia Neto) — Modularized the compatibility layer architecture, added multimodal tool response support, fixed streaming pass-through for tool executions, and added PostgreSQL storage and weighted pool quota forecasting. ([PR #8](https://github.com/tuxevil/tuxevil-rotator/pull/8), [PR #9](https://github.com/tuxevil/tuxevil-rotator/pull/9), [PR #11](https://github.com/tuxevil/tuxevil-rotator/pull/11), [PR #13](https://github.com/tuxevil/tuxevil-rotator/pull/13), [PR #14](https://github.com/tuxevil/tuxevil-rotator/pull/14))
346
350
  - **[@yashyadav711](https://github.com/yashyadav711)** (Yash) — Fixed Draft-2020-12 inline JSON-Schema union type mapping for Gemini tools support. ([PR #10](https://github.com/tuxevil/tuxevil-rotator/pull/10))
347
351
  - **[@javargasm](https://github.com/javargasm)** (Jeisson Alexander Vargas Marroquin) — Queued multi-request Antigravity account pooling (5×5 concurrent streams), strict FIFO overflow queue, dashboard concurrency metrics, canonical project ID resolution, 429 quota resilience with account-scoped retry, synchronous leasing, snapshot-based token refresh with generation validation, provider-scoped token publication, spend-logger memory leak fix, atomic PostgreSQL CTE daily spend aggregation with idempotent retries, virtual-key cache bounding, Anthropic tool-use compatibility layer (`tool_use`/`tool_result` content block conversion), JSON schema round-trip fixes, compat test suite expansion, model-scoped cooldowns, explicit Antigravity reset-duration parsing, idle pool normalization, RAW POLL deadline reconciliation, serialized per-account quota polling, and Ollama kickstart routing for multi-provider accounts. ([PR #3](https://github.com/tuxevil/tuxevil-rotator/pull/3), [PR #7](https://github.com/tuxevil/tuxevil-rotator/pull/7), [PR #22](https://github.com/tuxevil/tuxevil-rotator/pull/22), [PR #23](https://github.com/tuxevil/tuxevil-rotator/pull/23), [PR #24](https://github.com/tuxevil/tuxevil-rotator/pull/24), [PR #26](https://github.com/tuxevil/tuxevil-rotator/pull/26))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuxevil-rotator",
3
- "version": "3.3.2",
3
+ "version": "3.4.0",
4
4
  "description": "Multi-provider, multi-account AI proxy rotator with per-model routing, real-time quota tracking, and infringement detection (Google Antigravity, Ollama Cloud)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,15 +15,14 @@ export const DEFAULT_MODEL_SPECS: Record<string, ModelSpec> = {
15
15
  "gemini-3.1-pro-high": { maxOutputTokens: 65535, thinkingBudget: 10001, isThinking: true, contextWindow: 1_000_000 },
16
16
  "gemini-3.1-pro-low": { maxOutputTokens: 65535, thinkingBudget: 1001, isThinking: true, contextWindow: 1_000_000 },
17
17
  "gemini-3.1-pro-preview": { maxOutputTokens: 65535, thinkingBudget: 10001, isThinking: true, contextWindow: 1_000_000 },
18
- "gemini-3.5-flash": { maxOutputTokens: 65536, thinkingBudget: 10000, isThinking: true, contextWindow: 1_000_000 },
19
- "gemini-3.5-flash-medium": { maxOutputTokens: 65536, thinkingBudget: 4000, isThinking: true, contextWindow: 1_000_000 },
20
- "gemini-3.5-flash-low": { maxOutputTokens: 65536, thinkingBudget: 4000, isThinking: true, contextWindow: 1_000_000 },
21
- "gemini-3.5-flash-high": { maxOutputTokens: 65536, thinkingBudget: 10000, isThinking: true, contextWindow: 1_000_000 },
22
18
  "gemini-3.6-flash-high": { maxOutputTokens: 65536, thinkingBudget: 10000, isThinking: true, contextWindow: 1_000_000 },
23
19
  "gemini-3.6-flash-medium": { maxOutputTokens: 65536, thinkingBudget: 4000, isThinking: true, contextWindow: 1_000_000 },
24
20
  "gemini-3.6-flash-low": { maxOutputTokens: 65536, thinkingBudget: 1000, isThinking: true, contextWindow: 1_000_000 },
25
21
  "gemini-3.6-flash-tiered": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
26
22
  "gemini-3.7-flash-tiered": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
23
+ "gemini-3.8-flash-high": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
24
+ "gemini-3.8-flash-medium": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
25
+ "gemini-3.8-flash-low": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
27
26
  "gemini-3-flash": { maxOutputTokens: 65536, thinkingBudget: 4000, isThinking: true, contextWindow: 1_000_000 },
28
27
  "gemini-2.5-flash": { maxOutputTokens: 65535, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
29
28
  "gemini-2.5-pro": { maxOutputTokens: 65535, thinkingBudget: 1024, isThinking: true, contextWindow: 1_000_000 },
package/src/compat.ts CHANGED
@@ -1966,31 +1966,31 @@ async function completeViaRotator(
1966
1966
 
1967
1967
  const MODEL_CATALOG = [
1968
1968
  {
1969
- id: "gemini-3.5-flash-medium",
1970
- family: "gemini-3.5-flash",
1969
+ id: "gemini-3-flash",
1970
+ family: "gemini-3-flash",
1971
1971
  ctx: 1048576,
1972
1972
  quotaPool: "gemini",
1973
1973
  multimodal: true,
1974
1974
  tools: true,
1975
1975
  },
1976
1976
  {
1977
- id: "gemini-3.5-flash-high",
1978
- family: "gemini-3.5-flash",
1977
+ id: "gemini-3.6-flash-high",
1978
+ family: "gemini-3.6-flash",
1979
1979
  ctx: 1048576,
1980
1980
  quotaPool: "gemini",
1981
1981
  multimodal: true,
1982
1982
  tools: true,
1983
1983
  },
1984
1984
  {
1985
- id: "gemini-3-flash",
1986
- family: "gemini-3.5-flash",
1985
+ id: "gemini-3.6-flash-medium",
1986
+ family: "gemini-3.6-flash",
1987
1987
  ctx: 1048576,
1988
1988
  quotaPool: "gemini",
1989
1989
  multimodal: true,
1990
1990
  tools: true,
1991
1991
  },
1992
1992
  {
1993
- id: "gemini-3.6-flash-high",
1993
+ id: "gemini-3.6-flash-low",
1994
1994
  family: "gemini-3.6-flash",
1995
1995
  ctx: 1048576,
1996
1996
  quotaPool: "gemini",
@@ -1998,7 +1998,7 @@ const MODEL_CATALOG = [
1998
1998
  tools: true,
1999
1999
  },
2000
2000
  {
2001
- id: "gemini-3.6-flash-medium",
2001
+ id: "gemini-3.6-flash-tiered",
2002
2002
  family: "gemini-3.6-flash",
2003
2003
  ctx: 1048576,
2004
2004
  quotaPool: "gemini",
@@ -2006,24 +2006,32 @@ const MODEL_CATALOG = [
2006
2006
  tools: true,
2007
2007
  },
2008
2008
  {
2009
- id: "gemini-3.6-flash-low",
2010
- family: "gemini-3.6-flash",
2009
+ id: "gemini-3.7-flash-tiered",
2010
+ family: "gemini-3.7-flash",
2011
2011
  ctx: 1048576,
2012
2012
  quotaPool: "gemini",
2013
2013
  multimodal: true,
2014
2014
  tools: true,
2015
2015
  },
2016
2016
  {
2017
- id: "gemini-3.6-flash-tiered",
2018
- family: "gemini-3.6-flash",
2017
+ id: "gemini-3.8-flash-high",
2018
+ family: "gemini-3.8-flash",
2019
2019
  ctx: 1048576,
2020
2020
  quotaPool: "gemini",
2021
2021
  multimodal: true,
2022
2022
  tools: true,
2023
2023
  },
2024
2024
  {
2025
- id: "gemini-3.7-flash-tiered",
2026
- family: "gemini-3.7-flash",
2025
+ id: "gemini-3.8-flash-medium",
2026
+ family: "gemini-3.8-flash",
2027
+ ctx: 1048576,
2028
+ quotaPool: "gemini",
2029
+ multimodal: true,
2030
+ tools: true,
2031
+ },
2032
+ {
2033
+ id: "gemini-3.8-flash-low",
2034
+ family: "gemini-3.8-flash",
2027
2035
  ctx: 1048576,
2028
2036
  quotaPool: "gemini",
2029
2037
  multimodal: true,
@@ -36,6 +36,9 @@ export const ANTIGRAVITY_CONTEXT_WINDOWS: Record<string, number> = {
36
36
  "gpt-oss-120b": 131_072,
37
37
  "gpt-oss-120b-medium": 131_072,
38
38
  // Google Gemini 3.x — 1M context window per deepmind.google/models/gemini/*.
39
+ "gemini-3.8-flash-high": 1_000_000,
40
+ "gemini-3.8-flash-medium": 1_000_000,
41
+ "gemini-3.8-flash-low": 1_000_000,
39
42
  "gemini-3.7-flash": 1_000_000,
40
43
  "gemini-3.7-flash-tiered": 1_000_000,
41
44
  "gemini-3.6-flash": 1_000_000,
@@ -43,11 +46,6 @@ export const ANTIGRAVITY_CONTEXT_WINDOWS: Record<string, number> = {
43
46
  "gemini-3.6-flash-medium": 1_000_000,
44
47
  "gemini-3.6-flash-low": 1_000_000,
45
48
  "gemini-3.6-flash-tiered": 1_000_000,
46
- "gemini-3.5-flash": 1_000_000,
47
- "gemini-3.5-flash-medium": 1_000_000,
48
- "gemini-3.5-flash-low": 1_000_000,
49
- "gemini-3.5-flash-high": 1_000_000,
50
- "gemini-3.5-flash-lite": 1_000_000,
51
49
  "gemini-3-flash": 1_000_000,
52
50
  "gemini-3-flash-agent": 1_000_000,
53
51
  "gemini-3-pro": 1_000_000,
@@ -1418,8 +1418,7 @@ export function mapReasoningEffortToThinkingLevel(
1418
1418
  const lowerModel = modelId.toLowerCase();
1419
1419
  const isGemini31Pro = /gemini-3\.1-pro/i.test(modelId);
1420
1420
  const isGemini3Flash =
1421
- lowerModel.includes("gemini-3-flash") ||
1422
- lowerModel.includes("gemini-3.5-flash");
1421
+ lowerModel.includes("gemini-3-flash");
1423
1422
 
1424
1423
  let effectiveEffort = effort;
1425
1424
  if (!effectiveEffort) {
@@ -21,13 +21,13 @@ export interface PoolBudgetEntry {
21
21
  // Measured on 2026-08-09 with controlled burns (see docs/usage-calibration.md).
22
22
  // Two gpt-oss:20b runs on different accounts agreed within ~1%, so these are
23
23
  // per-account, per-model budgets, not per-IP.
24
+ // minimax-m3 removed 2026-08-30: moved to subscription tier (HTTP 402 on free).
24
25
  export const CALIBRATED_MODEL_BUDGETS: Readonly<Record<string, PoolBudgetEntry>> = {
25
26
  "gpt-oss:20b": { sessionTokens: 1_560_000, weeklyTokens: 4_210_000 },
26
27
  "gemma4:31b": { sessionTokens: 1_150_000, weeklyTokens: 3_110_000 },
27
28
  "nemotron-3-nano:30b": { sessionTokens: 1_930_000, weeklyTokens: 5_190_000 },
28
29
  "gpt-oss:120b": { sessionTokens: 760_000, weeklyTokens: 2_050_000 },
29
30
  "nemotron-3-super": { sessionTokens: 740_000, weeklyTokens: 2_010_000 },
30
- "minimax-m3": { sessionTokens: 190_000, weeklyTokens: 520_000 },
31
31
  "nemotron-3-ultra": { sessionTokens: 120_000, weeklyTokens: 330_000 },
32
32
  };
33
33
 
package/src/rotator.ts CHANGED
@@ -2893,9 +2893,9 @@ export class AccountRotator {
2893
2893
  const lower = model.toLowerCase();
2894
2894
  if (lower.includes("opus")) pricing = MODEL_PRICING["claude-opus-4-6-thinking"];
2895
2895
  else if (lower.includes("sonnet")) pricing = MODEL_PRICING["claude-sonnet-4-6"];
2896
+ else if (lower.includes("3.8-flash")) pricing = MODEL_PRICING["gemini-3.8-flash-high"];
2896
2897
  else if (lower.includes("3.7-flash")) pricing = MODEL_PRICING["gemini-3.7-flash-tiered"];
2897
2898
  else if (lower.includes("3.6-flash")) pricing = MODEL_PRICING["gemini-3.6-flash-high"];
2898
- else if (lower.includes("3.5-flash")) pricing = MODEL_PRICING["gemini-3.5-flash-high"];
2899
2899
  else if (lower.includes("flash")) pricing = MODEL_PRICING["gemini-3-flash"];
2900
2900
  else if (lower.includes("pro")) pricing = MODEL_PRICING["gemini-3.1-pro"];
2901
2901
  }
@@ -260,12 +260,12 @@ export function calculateCost(model: string, promptTokens: number, completionTok
260
260
  pricing = MODEL_PRICING["claude-opus-4-6-thinking"];
261
261
  } else if (lower.includes("sonnet")) {
262
262
  pricing = MODEL_PRICING["claude-sonnet-4-6"];
263
+ } else if (lower.includes("3.8-flash")) {
264
+ pricing = MODEL_PRICING["gemini-3.8-flash-high"];
263
265
  } else if (lower.includes("3.7-flash")) {
264
266
  pricing = MODEL_PRICING["gemini-3.7-flash-tiered"];
265
267
  } else if (lower.includes("3.6-flash")) {
266
268
  pricing = MODEL_PRICING["gemini-3.6-flash-high"];
267
- } else if (lower.includes("3.5-flash")) {
268
- pricing = MODEL_PRICING["gemini-3.5-flash-high"];
269
269
  } else if (lower.includes("flash")) {
270
270
  pricing = MODEL_PRICING["gemini-3-flash"];
271
271
  } else if (lower.includes("pro")) {
@@ -251,14 +251,15 @@ function fetchModelCatalog() {
251
251
  var FALLBACK_MODEL_CATALOG = [
252
252
  { id: "gemini-3.1-pro-low", owned_by: "tuxevil-rotator" },
253
253
  { id: "gemini-3.1-pro-high", owned_by: "tuxevil-rotator" },
254
- { id: "gemini-3.5-flash-medium", owned_by: "tuxevil-rotator" },
255
- { id: "gemini-3.5-flash-high", owned_by: "tuxevil-rotator" },
256
254
  { id: "gemini-3-flash", owned_by: "tuxevil-rotator" },
257
255
  { id: "gemini-3.6-flash-low", owned_by: "tuxevil-rotator" },
258
256
  { id: "gemini-3.6-flash-medium", owned_by: "tuxevil-rotator" },
259
257
  { id: "gemini-3.6-flash-high", owned_by: "tuxevil-rotator" },
260
258
  { id: "gemini-3.6-flash-tiered", owned_by: "tuxevil-rotator" },
261
259
  { id: "gemini-3.7-flash-tiered", owned_by: "tuxevil-rotator" },
260
+ { id: "gemini-3.8-flash-low", owned_by: "tuxevil-rotator" },
261
+ { id: "gemini-3.8-flash-medium", owned_by: "tuxevil-rotator" },
262
+ { id: "gemini-3.8-flash-high", owned_by: "tuxevil-rotator" },
262
263
  { id: "claude-sonnet-4-6", owned_by: "tuxevil-rotator" },
263
264
  { id: "claude-opus-4-6-thinking", owned_by: "tuxevil-rotator" },
264
265
  { id: "gpt-oss-120b-medium", owned_by: "tuxevil-rotator" },
@@ -531,4 +532,4 @@ if (document.readyState === "loading") {
531
532
  document.addEventListener("DOMContentLoaded", initKeysPage);
532
533
  } else {
533
534
  initKeysPage();
534
- }
535
+ }
@@ -271,8 +271,11 @@ document.addEventListener("click", function(e) {
271
271
  var availableKeys = [];
272
272
  var selectedKeyValues = [];
273
273
  var availableModels = [
274
+ { value: "gemini-3.8-flash-high", label: "gemini-3.8-flash-high" },
275
+ { value: "gemini-3.8-flash-medium", label: "gemini-3.8-flash-medium" },
276
+ { value: "gemini-3.8-flash-low", label: "gemini-3.8-flash-low" },
277
+ { value: "gemini-3.7-flash-tiered", label: "gemini-3.7-flash-tiered" },
274
278
  { value: "gemini-3.6-flash", label: "gemini-3.6-flash" },
275
- { value: "gemini-3.5-flash", label: "gemini-3.5-flash" },
276
279
  { value: "gemini-3.1-pro", label: "gemini-3.1-pro" },
277
280
  { value: "claude-sonnet-4-6", label: "claude-sonnet-4-6" },
278
281
  { value: "claude-opus-4-6-thinking", label: "claude-opus-4-6-thinking" },
@@ -794,4 +797,4 @@ if (document.readyState === "loading") {
794
797
  document.addEventListener("DOMContentLoaded", initLogsPage);
795
798
  } else {
796
799
  initLogsPage();
797
- }
800
+ }
@@ -1079,16 +1079,15 @@ var TOKEN_MODEL_COLORS = {
1079
1079
  "gemini-3.1-pro-low": "#1d4ed8",
1080
1080
  "gemini-3-pro-high": "#1d4ed8",
1081
1081
  "gemini-3-pro-low": "#1d4ed8",
1082
- "gemini-3.5-flash": "#2563eb", // Gemini 3.5 Flash (Azul rey medio)
1083
- "gemini-3.5-flash-high": "#2563eb",
1084
- "gemini-3.5-flash-medium": "#2563eb",
1085
- "gemini-3.5-flash-low": "#2563eb",
1086
- "gemini-3-flash-agent": "#2563eb",
1087
1082
  "gemini-3.6-flash": "#38bdf8", // Gemini 3.6 Flash (Azul cielo brillante)
1088
1083
  "gemini-3.6-flash-high": "#38bdf8",
1089
1084
  "gemini-3.6-flash-medium": "#38bdf8",
1090
1085
  "gemini-3.6-flash-low": "#38bdf8",
1091
1086
  "gemini-3.6-flash-tiered": "#38bdf8",
1087
+ "gemini-3.8-flash-high": "#0284c7", // Gemini 3.8 Flash (Azul cielo profundo)
1088
+ "gemini-3.8-flash-medium": "#0284c7",
1089
+ "gemini-3.8-flash-low": "#0284c7",
1090
+ "gemini-3-flash-agent": "#93c5fd",
1092
1091
  "gemini-3-flash": "#93c5fd", // Gemini 3 Flash (Azul pastel claro)
1093
1092
 
1094
1093
  // Codex Pool (Amarillos) — de más caro a más barato
@@ -1132,7 +1131,7 @@ function getModelColor(model) {
1132
1131
 
1133
1132
  // Gemini pool (Azules)
1134
1133
  if (lower.indexOf("3.1-pro") !== -1 || lower.indexOf("3-pro") !== -1) return "#1d4ed8";
1135
- if (lower.indexOf("3.5-flash") !== -1) return "#2563eb";
1134
+ if (lower.indexOf("3.8-flash") !== -1) return "#0284c7";
1136
1135
  if (lower.indexOf("3.6-flash") !== -1) return "#38bdf8";
1137
1136
  if (lower.indexOf("gemini") !== -1 || lower.indexOf("3-flash") !== -1) return "#93c5fd";
1138
1137
 
@@ -1171,10 +1170,6 @@ var MODEL_PRICING_CLIENT = {
1171
1170
  "gemini-3.1-pro-low": { input: 2.0, output: 12.0 },
1172
1171
  "gemini-3.1-pro-high": { input: 2.0, output: 12.0 },
1173
1172
  "gemini-3-flash": { input: 0.5, output: 3.0 },
1174
- "gemini-3.5-flash": { input: 1.5, output: 9.0 },
1175
- "gemini-3.5-flash-low": { input: 1.5, output: 9.0 },
1176
- "gemini-3.5-flash-medium": { input: 1.5, output: 9.0 },
1177
- "gemini-3.5-flash-high": { input: 1.5, output: 9.0 },
1178
1173
  "gemini-3.6-flash": { input: 1.5, output: 7.5 },
1179
1174
  "gemini-3.6-flash-high": { input: 1.5, output: 7.5 },
1180
1175
  "gemini-3.6-flash-medium": { input: 1.5, output: 7.5 },
@@ -1184,6 +1179,11 @@ var MODEL_PRICING_CLIENT = {
1184
1179
  // Introductory rates through 2026-12-31; from 2027-01-01 these double to
1185
1180
  // input 1.50 / output 7.50 per 1M tokens — update this entry then.
1186
1181
  "gemini-3.7-flash-tiered": { input: 0.75, output: 3.75 },
1182
+ // Gemini 3.8 Flash introductory rates through 2026-12-31; these also
1183
+ // double to input 1.50 / output 7.50 on 2027-01-01.
1184
+ "gemini-3.8-flash-low": { input: 0.75, output: 3.75 },
1185
+ "gemini-3.8-flash-medium": { input: 0.75, output: 3.75 },
1186
+ "gemini-3.8-flash-high": { input: 0.75, output: 3.75 },
1187
1187
  "gpt-oss-120b-medium": { input: 2.0, output: 10.0 },
1188
1188
  // OpenAI Codex GPT-5.6 models — mirrors MODEL_PRICING in types.ts.
1189
1189
  "gpt-5.6-sol": { input: 5.0, output: 30.0 },
@@ -1223,9 +1223,9 @@ function getModelPricingClient(m) {
1223
1223
  var lower = (m || "").toLowerCase();
1224
1224
  if (lower.indexOf("opus") !== -1) return MODEL_PRICING_CLIENT["claude-opus-4-6-thinking"];
1225
1225
  if (lower.indexOf("sonnet") !== -1) return MODEL_PRICING_CLIENT["claude-sonnet-4-6"];
1226
+ if (lower.indexOf("3.8-flash") !== -1) return MODEL_PRICING_CLIENT["gemini-3.8-flash-high"];
1226
1227
  if (lower.indexOf("3.7-flash") !== -1) return MODEL_PRICING_CLIENT["gemini-3.7-flash-tiered"];
1227
1228
  if (lower.indexOf("3.6-flash") !== -1) return MODEL_PRICING_CLIENT["gemini-3.6-flash-high"];
1228
- if (lower.indexOf("3.5-flash") !== -1) return MODEL_PRICING_CLIENT["gemini-3.5-flash-high"];
1229
1229
  if (lower.indexOf("flash") !== -1) return MODEL_PRICING_CLIENT["gemini-3-flash"];
1230
1230
  if (lower.indexOf("pro") !== -1) return MODEL_PRICING_CLIENT["gemini-3.1-pro"];
1231
1231
  return null;
@@ -1953,7 +1953,7 @@ function renderForecastPanel(data) {
1953
1953
  function resolveQuotaPoolKey(displayKey) {
1954
1954
  var lower = String(displayKey).toLowerCase();
1955
1955
  if (lower.indexOf("gemini-3.6-flash") !== -1) return "gemini-3.6-flash";
1956
- if (lower.indexOf("gemini-3.5-flash") !== -1 || lower === "gemini-3-flash") return "gemini-3.5-flash";
1956
+ if (lower === "gemini-3-flash" || lower === "gemini-3-flash-agent") return "gemini-3-flash";
1957
1957
  if (lower.indexOf("gemini-3.1-pro") !== -1 || lower.indexOf("gemini-pro") !== -1) return "gemini-3.1-pro";
1958
1958
  if (lower.indexOf("claude") !== -1 || lower.indexOf("gpt-oss") !== -1) return "claude-opus-4-6-thinking";
1959
1959
  return displayKey;
@@ -1996,7 +1996,7 @@ function renderForecastPanel(data) {
1996
1996
  var displayName = m;
1997
1997
  if (m === "claude-opus-4-6-thinking") displayName = "claude";
1998
1998
  if (m === "gemini-3.1-pro") displayName = "gemini-3.1-pro";
1999
- if (m === "gemini-3.5-flash") displayName = "gemini-3.5-flash";
1999
+ if (m === "gemini-3-flash") displayName = "gemini-3-flash";
2000
2000
 
2001
2001
  var minResetRemaining = null;
2002
2002
  q.entries.forEach(function (entry) {
package/src/types.ts CHANGED
@@ -146,8 +146,8 @@ export interface Config {
146
146
  // matched case-insensitively. When set, replaces the bundled defaults entirely.
147
147
  modelSpecs?: Record<string, ModelSpecConfig>;
148
148
  // Override model-id aliases used to translate the operator-facing name
149
- // (e.g. "gemini-3.5-flash-high") to the upstream Antigravity name
150
- // (e.g. "gemini-3-flash-agent"). When set, replaces the bundled defaults.
149
+ // (e.g. "gemini-3.1-pro-high") to the upstream Antigravity name
150
+ // (e.g. "gemini-pro-agent"). When set, replaces the bundled defaults.
151
151
  modelAliases?: Record<string, string>;
152
152
  }
153
153
 
@@ -161,9 +161,6 @@ export const MAX_QUOTA_POLL_INTERVAL_MS = 24 * 60 * 60 * 1000;
161
161
  // updating. Operators can override via Config.modelAliases in accounts.json.
162
162
  const DEFAULT_MODEL_ALIASES: Record<string, string> = {
163
163
  "gemini-3.1-pro-high": "gemini-pro-agent",
164
- "gemini-3.5-flash": "gemini-3-flash-agent",
165
- "gemini-3.5-flash-high": "gemini-3-flash-agent",
166
- "gemini-3.5-flash-medium": "gemini-3-flash-agent",
167
164
  "gpt-oss-120b": "gpt-oss-120b-medium",
168
165
  };
169
166
  let modelAliasesOverride: Record<string, string> | null = null;
@@ -266,10 +263,6 @@ export const QUOTA_MODEL_KEYS: Record<
266
263
  "gemini-3.1-pro-high",
267
264
  "gemini-3-pro-high",
268
265
  "gemini-3-pro-low",
269
- "gemini-3.5-flash",
270
- "gemini-3.5-flash-low",
271
- "gemini-3.5-flash-medium",
272
- "gemini-3.5-flash-high",
273
266
  "gemini-3-flash-agent",
274
267
  "gemini-3-flash",
275
268
  "gemini-3.6-flash",
@@ -278,6 +271,9 @@ export const QUOTA_MODEL_KEYS: Record<
278
271
  "gemini-3.6-flash-low",
279
272
  "gemini-3.6-flash-tiered",
280
273
  "gemini-3.7-flash-tiered",
274
+ "gemini-3.8-flash-low",
275
+ "gemini-3.8-flash-medium",
276
+ "gemini-3.8-flash-high",
281
277
  ],
282
278
  display: "Gemini",
283
279
  },
@@ -319,7 +315,7 @@ export function resolveQuotaModelKey(requestModel: string): string | null {
319
315
  export function resolveDisplayModelKey(requestModel: string): string {
320
316
  const lower = requestModel.toLowerCase();
321
317
  // Explicit agent and gpt-oss overrides
322
- if (lower.includes("gemini-3-flash-agent")) return "gemini-3.5-flash-high";
318
+ if (lower.includes("gemini-3-flash-agent")) return "gemini-3-flash";
323
319
  if (lower.includes("gpt-oss-120b")) return "gpt-oss-120b-medium";
324
320
 
325
321
  // Claude — distinguish sonnet vs opus
@@ -334,6 +330,16 @@ export function resolveDisplayModelKey(requestModel: string): string {
334
330
  if (lower.includes("-high")) return "gemini-3.1-pro-high";
335
331
  return "gemini-3.1-pro"; // unspecified variant
336
332
  }
333
+ // Gemini 3.8 Flash — Antigravity exposes separate reasoning-level ids.
334
+ if (
335
+ lower.includes("gemini") &&
336
+ lower.includes("3.8") &&
337
+ lower.includes("flash")
338
+ ) {
339
+ if (lower.includes("-low")) return "gemini-3.8-flash-low";
340
+ if (lower.includes("-medium")) return "gemini-3.8-flash-medium";
341
+ if (lower.includes("-high")) return "gemini-3.8-flash-high";
342
+ }
337
343
  // Gemini 3.6 Flash — distinguish variants
338
344
  if (
339
345
  lower.includes("gemini") &&
@@ -357,17 +363,6 @@ export function resolveDisplayModelKey(requestModel: string): string {
357
363
  ) {
358
364
  return "gemini-3.7-flash-tiered";
359
365
  }
360
- // Gemini 3.5 Flash — distinguish medium vs high
361
- if (
362
- lower.includes("gemini") &&
363
- lower.includes("3.5") &&
364
- lower.includes("flash")
365
- ) {
366
- if (lower.includes("-low") || lower.includes("-medium"))
367
- return "gemini-3.5-flash-medium";
368
- if (lower.includes("-high")) return "gemini-3.5-flash-high";
369
- return "gemini-3.5-flash"; // unspecified variant
370
- }
371
366
  // Flash
372
367
  if (lower.includes("gemini") && lower.includes("flash"))
373
368
  return "gemini-3-flash";
@@ -712,30 +707,6 @@ export const MODEL_PRICING: Record<
712
707
  "gemini-3.1-pro-low": { inputPer1M: 2.0, outputPer1M: 12.0 },
713
708
  "gemini-3.1-pro-high": { inputPer1M: 2.0, outputPer1M: 12.0 },
714
709
  "gemini-3-flash": { inputPer1M: 0.5, outputPer1M: 3.0 },
715
- "gemini-3.5-flash": {
716
- inputPer1M: 1.5,
717
- outputPer1M: 9.0,
718
- cachingPer1M: 0.15,
719
- cachingStoragePer1MPerHour: 1.0,
720
- },
721
- "gemini-3.5-flash-low": {
722
- inputPer1M: 1.5,
723
- outputPer1M: 9.0,
724
- cachingPer1M: 0.15,
725
- cachingStoragePer1MPerHour: 1.0,
726
- },
727
- "gemini-3.5-flash-medium": {
728
- inputPer1M: 1.5,
729
- outputPer1M: 9.0,
730
- cachingPer1M: 0.15,
731
- cachingStoragePer1MPerHour: 1.0,
732
- },
733
- "gemini-3.5-flash-high": {
734
- inputPer1M: 1.5,
735
- outputPer1M: 9.0,
736
- cachingPer1M: 0.15,
737
- cachingStoragePer1MPerHour: 1.0,
738
- },
739
710
  "gemini-3.6-flash": {
740
711
  inputPer1M: 1.5,
741
712
  outputPer1M: 7.5,
@@ -778,6 +749,27 @@ export const MODEL_PRICING: Record<
778
749
  cachingPer1M: 0.075,
779
750
  cachingStoragePer1MPerHour: 0.5,
780
751
  },
752
+ // Gemini 3.8 Flash — introductory public Gemini API pricing verified
753
+ // 2026-09-02. These rates double on 2027-01-01. Antigravity exposes
754
+ // separate low/medium/high model ids.
755
+ "gemini-3.8-flash-low": {
756
+ inputPer1M: 0.75,
757
+ outputPer1M: 3.75,
758
+ cachingPer1M: 0.075,
759
+ cachingStoragePer1MPerHour: 0.5,
760
+ },
761
+ "gemini-3.8-flash-medium": {
762
+ inputPer1M: 0.75,
763
+ outputPer1M: 3.75,
764
+ cachingPer1M: 0.075,
765
+ cachingStoragePer1MPerHour: 0.5,
766
+ },
767
+ "gemini-3.8-flash-high": {
768
+ inputPer1M: 0.75,
769
+ outputPer1M: 3.75,
770
+ cachingPer1M: 0.075,
771
+ cachingStoragePer1MPerHour: 0.5,
772
+ },
781
773
  "gpt-oss-120b-medium": { inputPer1M: 2.0, outputPer1M: 10.0 },
782
774
 
783
775
  // OpenAI Codex GPT-5.6 models — official OpenAI API pricing checked
@@ -799,16 +791,18 @@ export const MODEL_PRICING: Record<
799
791
  cachingPer1M: 0.02,
800
792
  },
801
793
 
802
- // Ollama Cloud model pricing (USD per 1M tokens). Sourced from the
803
- // ~/ollama-rotator project (verified 2026-08-09).
794
+ // Ollama Cloud model pricing (USD per 1M tokens). Sourced from LiteLLM
795
+ // (https://models.litellm.ai/) and verified 2026-08-30 via /api/tags
796
+ // discovery + /api/chat probes. Run scripts/verify_ollama_models.ts to refresh.
804
797
  "gpt-oss:20b": { inputPer1M: 0.075, outputPer1M: 0.30 },
805
798
  "gpt-oss:120b": { inputPer1M: 0.15, outputPer1M: 0.60 },
806
- "deepseek-v4-flash:preview": { inputPer1M: 0.14, outputPer1M: 0.28, cachingPer1M: 0.0028 },
807
799
  "deepseek-v4-flash:0731": { inputPer1M: 0.14, outputPer1M: 0.28, cachingPer1M: 0.0028 },
808
- "deepseek-v4-pro": { inputPer1M: 0.435, outputPer1M: 0.87, cachingPer1M: 0.0036 },
800
+ "deepseek-v4-pro:0813": { inputPer1M: 1.74, outputPer1M: 3.48 },
809
801
  "qwen3.5:397b": { inputPer1M: 0.60, outputPer1M: 3.60 },
810
802
  "glm-5.1": { inputPer1M: 0.80, outputPer1M: 2.56 },
811
803
  "glm-5.2": { inputPer1M: 0.80, outputPer1M: 2.56 },
804
+ "glm-5.3": { inputPer1M: 1.40, outputPer1M: 4.40 },
805
+ "glm-5.3-flash": { inputPer1M: 0.15, outputPer1M: 0.50 },
812
806
  "gemma4:31b": { inputPer1M: 0.38, outputPer1M: 1.15 },
813
807
  "kimi-k2.6": { inputPer1M: 0.95, outputPer1M: 4.00 },
814
808
  "kimi-k2.7-code": { inputPer1M: 0.95, outputPer1M: 4.00 },
@@ -830,28 +824,30 @@ export const MODEL_PRICING: Record<
830
824
  };
831
825
 
832
826
  // Which Ollama Cloud models respond on which subscription tiers, verified
833
- // 2026-08-09 with minimal /api/chat probes against free-tier accounts
834
- // (HTTP 200 vs 403). "free" = served on the free tier; "subscription" =
835
- // the API returns "this model requires a subscription" until the account
836
- // is upgraded. Sourced from ~/ollama-rotator.
827
+ // 2026-08-30 via scripts/verify_ollama_models.ts (/api/tags discovery +
828
+ // /api/chat probes: HTTP 200 = free, HTTP 402 = subscription-only).
829
+ // "free" = served on the free tier; "subscription" = requires a paid plan.
837
830
  export type ModelTierAccess = "free" | "subscription";
838
831
  export const MODEL_TIER_ACCESS: Record<string, ModelTierAccess> = {
832
+ // ── Free tier (HTTP 200 on free accounts) ───────────────────────────────
839
833
  "gpt-oss:20b": "free",
840
834
  "gpt-oss:120b": "free",
841
835
  "gemma4:31b": "free",
842
- "minimax-m3": "free",
843
836
  "nemotron-3-nano:30b": "free",
844
837
  "nemotron-3-super": "free",
845
838
  "nemotron-3-ultra": "free",
839
+ // ── Subscription tier (HTTP 402 on free accounts) ───────────────────────
846
840
  "deepseek-v4-flash:0731": "subscription",
847
- "deepseek-v4-flash:preview": "subscription",
848
- "deepseek-v4-pro": "subscription",
841
+ "deepseek-v4-pro:0813": "subscription",
849
842
  "glm-5.1": "subscription",
850
843
  "glm-5.2": "subscription",
844
+ "glm-5.3": "subscription",
845
+ "glm-5.3-flash": "subscription",
851
846
  "kimi-k2.6": "subscription",
852
847
  "kimi-k2.7-code": "subscription",
853
848
  "kimi-k3": "subscription",
854
849
  "minimax-m2.7": "subscription",
850
+ "minimax-m3": "subscription",
855
851
  "mistral-large-3:675b": "subscription",
856
852
  "qwen3.5:397b": "subscription",
857
853
  };
@@ -909,7 +905,7 @@ export const TAGS_CACHE_TTL_MS = 5 * 60 * 1000;
909
905
  export const ANTIGRAVITY_VERSION =
910
906
  rotatorEnv("ANTIGRAVITY_VERSION") ||
911
907
  process.env.PI_AI_ANTIGRAVITY_VERSION ||
912
- "1.107.0";
908
+ "2.11.0";
913
909
  export const QUOTA_USER_AGENT =
914
910
  rotatorEnv("QUOTA_USER_AGENT") ||
915
911
  `antigravity/${ANTIGRAVITY_VERSION} darwin/arm64`;
@@ -328,10 +328,6 @@ const MODEL_PRICING = {
328
328
  "gemini-3.1-pro-low": { inputPer1M: 2.00, outputPer1M: 12.00 },
329
329
  "gemini-3.1-pro-high": { inputPer1M: 2.00, outputPer1M: 12.00 },
330
330
  "gemini-3-flash": { inputPer1M: 0.50, outputPer1M: 3.00 },
331
- "gemini-3.5-flash": { inputPer1M: 1.50, outputPer1M: 9.00 },
332
- "gemini-3.5-flash-low": { inputPer1M: 1.50, outputPer1M: 9.00 },
333
- "gemini-3.5-flash-medium": { inputPer1M: 1.50, outputPer1M: 9.00 },
334
- "gemini-3.5-flash-high": { inputPer1M: 1.50, outputPer1M: 9.00 },
335
331
  "gemini-3.6-flash": { inputPer1M: 1.50, outputPer1M: 7.50 },
336
332
  "gemini-3.6-flash-high": { inputPer1M: 1.50, outputPer1M: 7.50 },
337
333
  "gemini-3.6-flash-medium": { inputPer1M: 1.50, outputPer1M: 7.50 },
@@ -341,6 +337,10 @@ const MODEL_PRICING = {
341
337
  // 2026-08-13. Introductory rates through 2026-12-31; from 2027-01-01
342
338
  // these double to input 1.50 / output 7.50 per 1M tokens.
343
339
  "gemini-3.7-flash-tiered": { inputPer1M: 0.75, outputPer1M: 3.75 },
340
+ // Gemini 3.8 Flash uses the same introductory window and doubles on 2027-01-01.
341
+ "gemini-3.8-flash-low": { inputPer1M: 0.75, outputPer1M: 3.75 },
342
+ "gemini-3.8-flash-medium": { inputPer1M: 0.75, outputPer1M: 3.75 },
343
+ "gemini-3.8-flash-high": { inputPer1M: 0.75, outputPer1M: 3.75 },
344
344
  "gpt-oss-120b-medium": { inputPer1M: 2.00, outputPer1M: 10.00 },
345
345
 
346
346
  // Ollama Cloud models — mirrors MODEL_PRICING in src/types.ts
@@ -383,9 +383,9 @@ function getModelPricing(model) {
383
383
  const lower = (model || "").toLowerCase();
384
384
  if (lower.includes("opus")) return MODEL_PRICING["claude-opus-4-6-thinking"];
385
385
  if (lower.includes("sonnet")) return MODEL_PRICING["claude-sonnet-4-6"];
386
+ if (lower.includes("3.8-flash")) return MODEL_PRICING["gemini-3.8-flash-high"];
386
387
  if (lower.includes("3.7-flash")) return MODEL_PRICING["gemini-3.7-flash-tiered"];
387
388
  if (lower.includes("3.6-flash")) return MODEL_PRICING["gemini-3.6-flash-high"];
388
- if (lower.includes("3.5-flash")) return MODEL_PRICING["gemini-3.5-flash-high"];
389
389
  if (lower.includes("flash")) return MODEL_PRICING["gemini-3-flash"];
390
390
  if (lower.includes("pro")) return MODEL_PRICING["gemini-3.1-pro"];
391
391
  return null;