tuxevil-rotator 4.4.6 → 4.4.8
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 +22 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/auto-routing-quality.ts +140 -14
- package/src/compat/model-specs.ts +43 -11
- package/src/providers/google-antigravity/catalog.ts +34 -1
- package/src/rotator.ts +38 -11
- package/src/web/lib/colors.ts +68 -4
- package/tools/telemetry-receiver/receiver.js +3158 -1028
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## [4.4.8] - 2026-11-23
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Invalid-provider polling & kickstart flag loop**: Stop `pollAccountQuotaOnce()`, `kickstartAllFreshTimers()`, and `kickstartTimerForAccount()` from repeatedly hitting providers already marked invalid or disabled on an account, emit `reportQuotaPollFlag()` only on valid-to-invalid transitions, and clear `invalidProviders` across all providers when updated credentials are saved via `addOrUpdateAccount()`.
|
|
10
|
+
- **Telemetry receiver aggregation & live flag deduplication**: Fix double-counting of `flags.totalFlags` / `daily[].flags` (using `-flags.jsonl` as the canonical source), compute `totalRequestsAcrossAll` by summing each unique install's cumulative maximum instead of summing repeated hourly heartbeats, and deduplicate repeating flag loops within a 24-hour sliding window (`FLAG_DEDUP_WINDOW_MS`) with startup warm-up.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Telemetry receiver UX**: Redesign `/dashboard`, `/notifications`, and `/stats` in a unified cyberpunk/retro-console UI with tabbed views (`Overview`, `Flags & Forensics`, `Models & USD`, `Installs`), interactive incident/node inspector drawers, concentration alerts, semver notification targeting simulator, quick templates/expiry presets, shared token SSO, keyboard shortcuts, and enriched `/v1/stats` & `/v1/public-stats` payloads.
|
|
15
|
+
|
|
16
|
+
### Security
|
|
17
|
+
|
|
18
|
+
- **Telemetry receiver hardening**: Fix unauthenticated Stored XSS in `/dashboard` (`proCount`/`freeCount`/`flaggedCount`/`disabledCount` validation + escaping), prevent `NaN` savings poisoning via prototype keys in `MODEL_PRICING` and `featuresCount`, enforce constant-time `timingSafeEqual` token comparison with `401` brute-force lockout, restrict `X-Forwarded-For` parsing to `TRUSTED_PROXIES` with bounded rate-limit maps and daily JSONL size caps, add CSP/XFO/nosniff/SRI headers and scoped CORS, add HTTP/body anti-Slowloris timeouts, enforce absolute `http(s)` notification URLs, write `notifications.json` atomically, and add incremental JSONL file caching.
|
|
19
|
+
|
|
20
|
+
## [4.4.7] - 2026-11-23
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Refresh Artificial Analysis Intelligence Index routing-quality snapshot (`2026-11-23`) with per-effort scores for Gemini 4 (`gemini-4-neon`, `gemini-4-hydrogen`, `gemini-4-carbon`, `gemini-4-argon`), Gemini 3.8 Flash, Claude 5.5 (`claude-opus-5-5`, `claude-sonnet-5-5`), and OpenAI Codex (`gpt-6.2-astra`, `gpt-6.2-sol`, `gpt-6.1-sol`).
|
|
25
|
+
- Add static model specs, context windows, and distinct dashboard chart colors for Gemini 4 (`carbon`, `neon`, `argon`, `hydrogen` + `-tiered`/`-sonar`), Claude 5.5, GPT-6.1/6.2, and newer Ollama Cloud models.
|
|
26
|
+
|
|
5
27
|
## [4.4.6] - 2026-11-23
|
|
6
28
|
|
|
7
29
|
### Changed
|
package/README.md
CHANGED
|
@@ -55,6 +55,8 @@ Originally built as a multi-account rotator for Google Antigravity. It now gener
|
|
|
55
55
|
|
|
56
56
|
## Current Model Update
|
|
57
57
|
|
|
58
|
+
- **v4.4.8: Invalid-provider flag loop fix & telemetry receiver overhaul**: Stop quota polling and auto-warmup kickstarts from looping every 5 minutes on already-invalidated or disabled providers (emitting flag telemetry only on transitions and clearing invalidation across all providers on re-auth). Overhaul the standalone telemetry receiver with a cyberpunk/retro-console UX across `/dashboard`, `/notifications`, and `/stats`, fix flag double-counting and request inflation, add 24h sliding-window flag-loop deduplication, and harden security (Stored XSS fix, prototype-safe pricing, constant-time auth + brute-force lockout, trusted-proxy rate limiting, CSP/SRI, scoped CORS, and HTTP timeouts). ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.8))
|
|
59
|
+
- **v4.4.7: Artificial Analysis scores, static specs, and dashboard colors**: Refresh the Artificial Analysis Intelligence Index routing-quality snapshot (`2026-11-23`) with exact per-effort scores for Gemini 4 (`neon`, `hydrogen`, `carbon`, `argon`), Gemini 3.8 Flash, Claude 5.5, and OpenAI `gpt-6.1`/`gpt-6.2`, and add static model specs, context windows, and distinct dashboard chart colors for Gemini 4, Claude 5.5, GPT-6.1/6.2, and newer Ollama Cloud models. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.7))
|
|
58
60
|
- **v4.4.6: Model pricing refresh**: Add official November 2026 pricing and family fallbacks for Gemini 4 (`neon`, `hydrogen`, `carbon`, `argon`), Claude 5.5 (`opus`, `sonnet`), OpenAI `gpt-6.1`/`gpt-6.2`, and newly published Ollama Cloud models in both the rotator and standalone telemetry receiver. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.6))
|
|
59
61
|
- **v4.4.5: Antigravity reasoning effort metadata**: Publish `meta.reasoning_efforts` and `meta.default_reasoning_effort` for Antigravity `effortRouting` aliases and adaptive `-tiered` Gemini models in `GET /v1/models`, and merge discovered effort controls in the OpenCode discovery plugin so Gemini and Claude models expose effort variants. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.5))
|
|
60
62
|
- **v4.4.4: Gemini image output**: Deliver generated images through OpenAI Chat, OpenAI Responses, and Anthropic Messages, with support for editing an image on a follow-up turn. Native Gemini responses return structured image parts. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.4))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tuxevil-rotator",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.8",
|
|
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",
|
|
@@ -47,24 +47,112 @@ export interface AARoutingAssessment {
|
|
|
47
47
|
relativeToBest?: number;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export const AA_ROUTING_SCORE_SNAPSHOT = "2026-
|
|
50
|
+
export const AA_ROUTING_SCORE_SNAPSHOT = "2026-11-23";
|
|
51
51
|
|
|
52
52
|
const SCORE_RECORDS: Record<string, AAScoreRecord> = {
|
|
53
53
|
"gemini-3.8-flash-high": {
|
|
54
54
|
name: "Gemini 3.8 Flash", effort: "High", scores: { "v4.3.2": 41, "v5.0": 31 },
|
|
55
|
-
source: "https://artificialanalysis.ai/models/
|
|
55
|
+
source: "https://artificialanalysis.ai/models/gemini-3-8-flash",
|
|
56
|
+
},
|
|
57
|
+
"gemini-3.8-flash-medium": {
|
|
58
|
+
name: "Gemini 3.8 Flash", effort: "Medium", scores: { "v5.0": 30 },
|
|
59
|
+
source: "https://artificialanalysis.ai/models/gemini-3-8-flash",
|
|
60
|
+
},
|
|
61
|
+
"gemini-3.8-flash-low": {
|
|
62
|
+
name: "Gemini 3.8 Flash", effort: "Low", scores: { "v5.0": 23 },
|
|
63
|
+
source: "https://artificialanalysis.ai/models/gemini-3-8-flash",
|
|
56
64
|
},
|
|
57
65
|
"gemini-4-argon-high": {
|
|
58
66
|
name: "Gemini 4 Argon", effort: "High", scores: { "v4.3.2": 53, "v5.0": 50 },
|
|
59
|
-
source: "https://artificialanalysis.ai/models/
|
|
67
|
+
source: "https://artificialanalysis.ai/models/gemini-4-argon",
|
|
68
|
+
},
|
|
69
|
+
"gemini-4-argon-medium": {
|
|
70
|
+
name: "Gemini 4 Argon", effort: "Medium", scores: { "v5.0": 48 },
|
|
71
|
+
source: "https://artificialanalysis.ai/models/gemini-4-argon",
|
|
72
|
+
},
|
|
73
|
+
"gemini-4-carbon-high": {
|
|
74
|
+
name: "Gemini 4 Carbon", effort: "High", scores: { "v5.0": 60 },
|
|
75
|
+
source: "https://artificialanalysis.ai/models/gemini-4-carbon",
|
|
76
|
+
},
|
|
77
|
+
"gemini-4-carbon-medium": {
|
|
78
|
+
name: "Gemini 4 Carbon", effort: "Medium", scores: { "v5.0": 58 },
|
|
79
|
+
source: "https://artificialanalysis.ai/models/gemini-4-carbon",
|
|
80
|
+
},
|
|
81
|
+
"gemini-4-carbon-low": {
|
|
82
|
+
name: "Gemini 4 Carbon", effort: "Low", scores: { "v5.0": 54 },
|
|
83
|
+
source: "https://artificialanalysis.ai/models/gemini-4-carbon",
|
|
84
|
+
},
|
|
85
|
+
"gemini-4-neon-xhigh": {
|
|
86
|
+
name: "Gemini 4 Neon", effort: "Xhigh", scores: { "v5.0": 61 },
|
|
87
|
+
source: "https://artificialanalysis.ai/models/gemini-4-neon",
|
|
88
|
+
},
|
|
89
|
+
"gemini-4-neon-high": {
|
|
90
|
+
name: "Gemini 4 Neon", effort: "High", scores: { "v5.0": 60 },
|
|
91
|
+
source: "https://artificialanalysis.ai/models/gemini-4-neon",
|
|
92
|
+
},
|
|
93
|
+
"gemini-4-neon-medium": {
|
|
94
|
+
name: "Gemini 4 Neon", effort: "Medium", scores: { "v5.0": 55 },
|
|
95
|
+
source: "https://artificialanalysis.ai/models/gemini-4-neon",
|
|
96
|
+
},
|
|
97
|
+
"gemini-4-neon-low": {
|
|
98
|
+
name: "Gemini 4 Neon", effort: "Low", scores: { "v5.0": 44 },
|
|
99
|
+
source: "https://artificialanalysis.ai/models/gemini-4-neon",
|
|
100
|
+
},
|
|
101
|
+
"gemini-4-hydrogen-xhigh": {
|
|
102
|
+
name: "Gemini 4 Hydrogen", effort: "Xhigh", scores: { "v5.0": 54 },
|
|
103
|
+
source: "https://artificialanalysis.ai/models/gemini-4-hydrogen",
|
|
104
|
+
},
|
|
105
|
+
"gemini-4-hydrogen-high": {
|
|
106
|
+
name: "Gemini 4 Hydrogen", effort: "High", scores: { "v5.0": 51 },
|
|
107
|
+
source: "https://artificialanalysis.ai/models/gemini-4-hydrogen",
|
|
108
|
+
},
|
|
109
|
+
"gemini-4-hydrogen-medium": {
|
|
110
|
+
name: "Gemini 4 Hydrogen", effort: "Medium", scores: { "v5.0": 41 },
|
|
111
|
+
source: "https://artificialanalysis.ai/models/gemini-4-hydrogen",
|
|
112
|
+
},
|
|
113
|
+
"gemini-4-hydrogen-low": {
|
|
114
|
+
name: "Gemini 4 Hydrogen", effort: "Low", scores: { "v5.0": 27 },
|
|
115
|
+
source: "https://artificialanalysis.ai/models/gemini-4-hydrogen",
|
|
60
116
|
},
|
|
61
117
|
"claude-sonnet-5-5-max": {
|
|
62
|
-
name: "Claude Sonnet 5.5", effort: "Max", scores: { "v4.3.2": 56, "v5.0":
|
|
63
|
-
source: "https://artificialanalysis.ai/models/
|
|
118
|
+
name: "Claude Sonnet 5.5", effort: "Max", scores: { "v4.3.2": 56, "v5.0": 55 },
|
|
119
|
+
source: "https://artificialanalysis.ai/models/claude-sonnet-5-5",
|
|
120
|
+
},
|
|
121
|
+
"claude-sonnet-5-5-xhigh": {
|
|
122
|
+
name: "Claude Sonnet 5.5", effort: "Xhigh", scores: { "v5.0": 50 },
|
|
123
|
+
source: "https://artificialanalysis.ai/models/claude-sonnet-5-5",
|
|
124
|
+
},
|
|
125
|
+
"claude-sonnet-5-5-high": {
|
|
126
|
+
name: "Claude Sonnet 5.5", effort: "High", scores: { "v5.0": 42 },
|
|
127
|
+
source: "https://artificialanalysis.ai/models/claude-sonnet-5-5",
|
|
128
|
+
},
|
|
129
|
+
"claude-sonnet-5-5-medium": {
|
|
130
|
+
name: "Claude Sonnet 5.5", effort: "Medium", scores: { "v5.0": 31 },
|
|
131
|
+
source: "https://artificialanalysis.ai/models/claude-sonnet-5-5",
|
|
132
|
+
},
|
|
133
|
+
"claude-sonnet-5-5-low": {
|
|
134
|
+
name: "Claude Sonnet 5.5", effort: "Low", scores: { "v5.0": 26 },
|
|
135
|
+
source: "https://artificialanalysis.ai/models/claude-sonnet-5-5",
|
|
64
136
|
},
|
|
65
137
|
"claude-opus-5-5-max": {
|
|
66
|
-
name: "Claude Opus 5.5", effort: "Max", scores: { "v4.3.2": 58, "v5.0":
|
|
67
|
-
source: "https://artificialanalysis.ai/models/
|
|
138
|
+
name: "Claude Opus 5.5", effort: "Max", scores: { "v4.3.2": 58, "v5.0": 59 },
|
|
139
|
+
source: "https://artificialanalysis.ai/models/claude-opus-5-5",
|
|
140
|
+
},
|
|
141
|
+
"claude-opus-5-5-xhigh": {
|
|
142
|
+
name: "Claude Opus 5.5", effort: "Xhigh", scores: { "v5.0": 57 },
|
|
143
|
+
source: "https://artificialanalysis.ai/models/claude-opus-5-5",
|
|
144
|
+
},
|
|
145
|
+
"claude-opus-5-5-high": {
|
|
146
|
+
name: "Claude Opus 5.5", effort: "High", scores: { "v5.0": 52 },
|
|
147
|
+
source: "https://artificialanalysis.ai/models/claude-opus-5-5",
|
|
148
|
+
},
|
|
149
|
+
"claude-opus-5-5-medium": {
|
|
150
|
+
name: "Claude Opus 5.5", effort: "Medium", scores: { "v5.0": 48 },
|
|
151
|
+
source: "https://artificialanalysis.ai/models/claude-opus-5-5",
|
|
152
|
+
},
|
|
153
|
+
"claude-opus-5-5-low": {
|
|
154
|
+
name: "Claude Opus 5.5", effort: "Low", scores: { "v5.0": 35 },
|
|
155
|
+
source: "https://artificialanalysis.ai/models/claude-opus-5-5",
|
|
68
156
|
},
|
|
69
157
|
"gpt-6-luna-max": {
|
|
70
158
|
name: "GPT-6 Luna", effort: "Max", scores: { "v4.3.2": 38, "v5.0": 28 },
|
|
@@ -74,6 +162,18 @@ const SCORE_RECORDS: Record<string, AAScoreRecord> = {
|
|
|
74
162
|
name: "Beam", effort: null, scores: { "v4.3.2": 30, "v5.0": 18 },
|
|
75
163
|
source: "https://artificialanalysis.ai/models/comparisons/reflection-beam-vs-step-5",
|
|
76
164
|
},
|
|
165
|
+
"gpt-6.2-astra-max": {
|
|
166
|
+
name: "GPT-6.2 Astra", effort: "Max", scores: { "v5.0": 62 },
|
|
167
|
+
source: "https://artificialanalysis.ai/models/gpt-6-2-astra",
|
|
168
|
+
},
|
|
169
|
+
"gpt-6.2-sol-max": {
|
|
170
|
+
name: "GPT-6.2 Sol", effort: "Max", scores: { "v5.0": 57 },
|
|
171
|
+
source: "https://artificialanalysis.ai/models/gpt-6-2-sol",
|
|
172
|
+
},
|
|
173
|
+
"gpt-6.1-sol-max": {
|
|
174
|
+
name: "GPT-6.1 Sol", effort: "Max", scores: { "v5.0": 55 },
|
|
175
|
+
source: "https://artificialanalysis.ai/models/gpt-6-1-sol",
|
|
176
|
+
},
|
|
77
177
|
"gpt-6-astra-max": {
|
|
78
178
|
name: "GPT-6 Astra", effort: "Max", scores: { "v4.3.2": 53, "v5.0": 57 },
|
|
79
179
|
source: "https://artificialanalysis.ai/models/gpt-6-astra/",
|
|
@@ -159,23 +259,49 @@ const SCORE_RECORDS: Record<string, AAScoreRecord> = {
|
|
|
159
259
|
|
|
160
260
|
/** Exact provider/model allowlist; unknown dynamic catalog entries remain unscored. */
|
|
161
261
|
const ROUTER_ALIASES: Record<string, AARouterAlias> = {
|
|
162
|
-
"google-antigravity/gemini-3.8-flash
|
|
163
|
-
"google-antigravity/gemini-3.8-flash-
|
|
262
|
+
"google-antigravity/gemini-3.8-flash": { scoreId: "gemini-3.8-flash-medium", alignment: "effort-proxy" },
|
|
263
|
+
"google-antigravity/gemini-3.8-flash-tiered": { scoreId: "gemini-3.8-flash-medium", alignment: "effort-proxy" },
|
|
264
|
+
"google-antigravity/gemini-3.8-flash-low": { scoreId: "gemini-3.8-flash-low", alignment: "model-effort-exact" },
|
|
265
|
+
"google-antigravity/gemini-3.8-flash-medium": { scoreId: "gemini-3.8-flash-medium", alignment: "model-effort-exact" },
|
|
164
266
|
"google-antigravity/gemini-3.8-flash-high": { scoreId: "gemini-3.8-flash-high", alignment: "model-effort-exact" },
|
|
165
|
-
"google-antigravity/gemini-4-argon-
|
|
267
|
+
"google-antigravity/gemini-4-argon-low": { scoreId: "gemini-4-argon-medium", alignment: "effort-proxy" },
|
|
268
|
+
"google-antigravity/gemini-4-argon-medium": { scoreId: "gemini-4-argon-medium", alignment: "model-effort-exact" },
|
|
166
269
|
"google-antigravity/gemini-4-argon-high": { scoreId: "gemini-4-argon-high", alignment: "model-effort-exact" },
|
|
167
|
-
"google-antigravity/gemini-4-argon": { scoreId: "gemini-4-argon-
|
|
270
|
+
"google-antigravity/gemini-4-argon": { scoreId: "gemini-4-argon-medium", alignment: "effort-proxy" },
|
|
271
|
+
"google-antigravity/gemini-4-carbon": { scoreId: "gemini-4-carbon-medium", alignment: "effort-proxy" },
|
|
272
|
+
"google-antigravity/gemini-4-carbon-low": { scoreId: "gemini-4-carbon-low", alignment: "model-effort-exact" },
|
|
273
|
+
"google-antigravity/gemini-4-carbon-medium": { scoreId: "gemini-4-carbon-medium", alignment: "model-effort-exact" },
|
|
274
|
+
"google-antigravity/gemini-4-carbon-high": { scoreId: "gemini-4-carbon-high", alignment: "model-effort-exact" },
|
|
275
|
+
"google-antigravity/gemini-4-neon": { scoreId: "gemini-4-neon-high", alignment: "effort-proxy" },
|
|
276
|
+
"google-antigravity/gemini-4-neon-low": { scoreId: "gemini-4-neon-low", alignment: "model-effort-exact" },
|
|
277
|
+
"google-antigravity/gemini-4-neon-medium": { scoreId: "gemini-4-neon-medium", alignment: "model-effort-exact" },
|
|
278
|
+
"google-antigravity/gemini-4-neon-high": { scoreId: "gemini-4-neon-high", alignment: "model-effort-exact" },
|
|
279
|
+
"google-antigravity/gemini-4-neon-xhigh": { scoreId: "gemini-4-neon-xhigh", alignment: "model-effort-exact" },
|
|
280
|
+
"google-antigravity/gemini-4-hydrogen": { scoreId: "gemini-4-hydrogen-high", alignment: "effort-proxy" },
|
|
281
|
+
"google-antigravity/gemini-4-hydrogen-low": { scoreId: "gemini-4-hydrogen-low", alignment: "model-effort-exact" },
|
|
282
|
+
"google-antigravity/gemini-4-hydrogen-medium": { scoreId: "gemini-4-hydrogen-medium", alignment: "model-effort-exact" },
|
|
283
|
+
"google-antigravity/gemini-4-hydrogen-high": { scoreId: "gemini-4-hydrogen-high", alignment: "model-effort-exact" },
|
|
284
|
+
"google-antigravity/gemini-4-hydrogen-xhigh": { scoreId: "gemini-4-hydrogen-xhigh", alignment: "model-effort-exact" },
|
|
285
|
+
"google-antigravity/gemini-4-hydrogen-tiered": { scoreId: "gemini-4-hydrogen-high", alignment: "effort-proxy" },
|
|
286
|
+
"google-antigravity/gemini-4-hydrogen-tiered-high": { scoreId: "gemini-4-hydrogen-high", alignment: "effort-proxy" },
|
|
287
|
+
"google-antigravity/gemini-4-hydrogen-tiered-xhigh": { scoreId: "gemini-4-hydrogen-xhigh", alignment: "effort-proxy" },
|
|
168
288
|
"google-antigravity/claude-sonnet-5-5": { scoreId: "claude-sonnet-5-5-max", alignment: "effort-proxy" },
|
|
169
|
-
"google-antigravity/claude-sonnet-5-5-
|
|
170
|
-
"google-antigravity/claude-sonnet-5-5-
|
|
289
|
+
"google-antigravity/claude-sonnet-5-5-low": { scoreId: "claude-sonnet-5-5-low", alignment: "model-effort-exact" },
|
|
290
|
+
"google-antigravity/claude-sonnet-5-5-medium": { scoreId: "claude-sonnet-5-5-medium", alignment: "model-effort-exact" },
|
|
291
|
+
"google-antigravity/claude-sonnet-5-5-high": { scoreId: "claude-sonnet-5-5-high", alignment: "model-effort-exact" },
|
|
171
292
|
"google-antigravity/claude-opus-5-5": { scoreId: "claude-opus-5-5-max", alignment: "effort-proxy" },
|
|
172
|
-
"google-antigravity/claude-opus-5-5-
|
|
293
|
+
"google-antigravity/claude-opus-5-5-low": { scoreId: "claude-opus-5-5-low", alignment: "model-effort-exact" },
|
|
294
|
+
"google-antigravity/claude-opus-5-5-medium": { scoreId: "claude-opus-5-5-medium", alignment: "model-effort-exact" },
|
|
295
|
+
"google-antigravity/claude-opus-5-5-high": { scoreId: "claude-opus-5-5-high", alignment: "model-effort-exact" },
|
|
173
296
|
"google-antigravity/claude-sonnet-4-6": { scoreId: "claude-sonnet-4-6-max", alignment: "effort-proxy" },
|
|
174
297
|
"google-antigravity/claude-sonnet-4-6-thinking": { scoreId: "claude-sonnet-4-6-max", alignment: "effort-proxy" },
|
|
175
298
|
"google-antigravity/claude-opus-4-6": { scoreId: "claude-opus-4-6-max", alignment: "estimated" },
|
|
176
299
|
"google-antigravity/claude-opus-4-6-thinking": { scoreId: "claude-opus-4-6-max", alignment: "estimated" },
|
|
177
300
|
"google-antigravity/claude-sonnet-4-6-high": { scoreId: "claude-sonnet-4-6-max", alignment: "effort-proxy" },
|
|
178
301
|
"google-antigravity/claude-opus-4-6-high": { scoreId: "claude-opus-4-6-max", alignment: "estimated" },
|
|
302
|
+
"openai-codex/gpt-6.2-astra": { scoreId: "gpt-6.2-astra-max", alignment: "effort-proxy" },
|
|
303
|
+
"openai-codex/gpt-6.2-sol": { scoreId: "gpt-6.2-sol-max", alignment: "effort-proxy" },
|
|
304
|
+
"openai-codex/gpt-6.1-sol": { scoreId: "gpt-6.1-sol-max", alignment: "effort-proxy" },
|
|
179
305
|
"openai-codex/gpt-6-astra": { scoreId: "gpt-6-astra-max", alignment: "effort-proxy" },
|
|
180
306
|
"openai-codex/gpt-6-sol": { scoreId: "gpt-6-sol-max", alignment: "effort-proxy" },
|
|
181
307
|
"openai-codex/gpt-6-luna": { scoreId: "gpt-6-luna-max", alignment: "effort-proxy" },
|
|
@@ -25,17 +25,49 @@ export const DEFAULT_MODEL_SPECS: Record<string, ModelSpec> = {
|
|
|
25
25
|
"gemini-3.6-flash-low": { maxOutputTokens: 65536, thinkingBudget: 1000, isThinking: true, contextWindow: 1_000_000 },
|
|
26
26
|
"gemini-3.6-flash-tiered": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
27
27
|
"gemini-3.7-flash-tiered": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
28
|
-
"gemini-3.8-flash
|
|
29
|
-
"gemini-3.8-flash-
|
|
30
|
-
"gemini-3.8-flash-
|
|
31
|
-
"gemini-
|
|
32
|
-
"gemini-
|
|
33
|
-
"gemini-4-
|
|
34
|
-
"gemini-4-
|
|
35
|
-
"gemini-
|
|
36
|
-
"gemini-
|
|
37
|
-
"gemini-
|
|
38
|
-
"gemini-
|
|
28
|
+
"gemini-3.8-flash": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
29
|
+
"gemini-3.8-flash-tiered": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
30
|
+
"gemini-3.8-flash-high": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
31
|
+
"gemini-3.8-flash-medium": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
32
|
+
"gemini-3.8-flash-low": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
33
|
+
"gemini-4-carbon": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
34
|
+
"gemini-4-carbon-disabled": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
35
|
+
"gemini-4-carbon-high": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
36
|
+
"gemini-4-carbon-medium": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
37
|
+
"gemini-4-carbon-low": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
38
|
+
"gemini-4-argon": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
39
|
+
"gemini-4-argon-disabled": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
40
|
+
"gemini-4-argon-high": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
41
|
+
"gemini-4-argon-medium": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
42
|
+
"gemini-4-argon-low": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
43
|
+
"gemini-4-neon": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
44
|
+
"gemini-4-neon-disabled": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
45
|
+
"gemini-4-neon-xhigh": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
46
|
+
"gemini-4-neon-high": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
47
|
+
"gemini-4-neon-medium": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
48
|
+
"gemini-4-neon-low": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
49
|
+
"gemini-4-hydrogen": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
50
|
+
"gemini-4-hydrogen-disabled":{ maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
51
|
+
"gemini-4-hydrogen-xhigh": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
52
|
+
"gemini-4-hydrogen-high": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
53
|
+
"gemini-4-hydrogen-medium": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
54
|
+
"gemini-4-hydrogen-low": { maxOutputTokens: 262144, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
55
|
+
"gemini-4-hydrogen-tiered": { maxOutputTokens: 262144, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
56
|
+
"gemini-4-hydrogen-tiered-high": { maxOutputTokens: 262144, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
57
|
+
"gemini-4-hydrogen-tiered-xhigh": { maxOutputTokens: 262144, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
58
|
+
"gemini-4-hydrogen-sonar": { maxOutputTokens: 65536, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
59
|
+
"gemini-3.5-flash-lite": { maxOutputTokens: 65536, thinkingBudget: -1, isThinking: true, contextWindow: 1_000_000 },
|
|
60
|
+
"gemini-3-flash": { maxOutputTokens: 65536, thinkingBudget: 4000, isThinking: true, contextWindow: 1_000_000 },
|
|
61
|
+
"gemini-2.5-flash": { maxOutputTokens: 65535, thinkingBudget: 24576, isThinking: true, contextWindow: 1_000_000 },
|
|
62
|
+
"gemini-2.5-pro": { maxOutputTokens: 65535, thinkingBudget: 1024, isThinking: true, contextWindow: 1_000_000 },
|
|
63
|
+
"claude-opus-5-5": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
64
|
+
"claude-opus-5-5-high": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
65
|
+
"claude-opus-5-5-medium": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
66
|
+
"claude-opus-5-5-low": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
67
|
+
"claude-sonnet-5-5": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
68
|
+
"claude-sonnet-5-5-high": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
69
|
+
"claude-sonnet-5-5-medium": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
70
|
+
"claude-sonnet-5-5-low": { maxOutputTokens: 128000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
39
71
|
"claude-sonnet-4-6": { maxOutputTokens: 64000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
40
72
|
"claude-sonnet-4-6-thinking":{ maxOutputTokens: 64000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
41
73
|
"claude-opus-4-6-thinking": { maxOutputTokens: 64000, thinkingBudget: 32768, isThinking: true, contextWindow: 1_000_000 },
|
|
@@ -26,6 +26,15 @@ export interface AntigravityModelSpec {
|
|
|
26
26
|
* `getAntigravityContextWindow` can do an O(1) lookup.
|
|
27
27
|
*/
|
|
28
28
|
export const ANTIGRAVITY_CONTEXT_WINDOWS: Record<string, number> = {
|
|
29
|
+
// Anthropic Claude 5.5 family — 1M context window per Anthropic docs.
|
|
30
|
+
"claude-opus-5-5": 1_000_000,
|
|
31
|
+
"claude-opus-5-5-high": 1_000_000,
|
|
32
|
+
"claude-opus-5-5-medium": 1_000_000,
|
|
33
|
+
"claude-opus-5-5-low": 1_000_000,
|
|
34
|
+
"claude-sonnet-5-5": 1_000_000,
|
|
35
|
+
"claude-sonnet-5-5-high": 1_000_000,
|
|
36
|
+
"claude-sonnet-5-5-medium": 1_000_000,
|
|
37
|
+
"claude-sonnet-5-5-low": 1_000_000,
|
|
29
38
|
// Anthropic Claude 4.6 family — 1M context window per Anthropic docs.
|
|
30
39
|
"claude-opus-4-6": 1_000_000,
|
|
31
40
|
"claude-opus-4-6-thinking": 1_000_000,
|
|
@@ -39,12 +48,36 @@ export const ANTIGRAVITY_CONTEXT_WINDOWS: Record<string, number> = {
|
|
|
39
48
|
// OpenAI gpt-oss-120b — 131,072 per platform.openai.com/docs/models/gpt-oss-120b.
|
|
40
49
|
"gpt-oss-120b": 131_072,
|
|
41
50
|
"gpt-oss-120b-medium": 131_072,
|
|
42
|
-
// Google Gemini 4
|
|
51
|
+
// Google Gemini 4 family — 1M unified context window per Google Gemini API docs.
|
|
52
|
+
"gemini-4-carbon": 1_000_000,
|
|
53
|
+
"gemini-4-carbon-disabled": 1_000_000,
|
|
54
|
+
"gemini-4-carbon-high": 1_000_000,
|
|
55
|
+
"gemini-4-carbon-medium": 1_000_000,
|
|
56
|
+
"gemini-4-carbon-low": 1_000_000,
|
|
43
57
|
"gemini-4-argon": 1_000_000,
|
|
58
|
+
"gemini-4-argon-disabled": 1_000_000,
|
|
44
59
|
"gemini-4-argon-high": 1_000_000,
|
|
45
60
|
"gemini-4-argon-medium": 1_000_000,
|
|
46
61
|
"gemini-4-argon-low": 1_000_000,
|
|
62
|
+
"gemini-4-neon": 1_000_000,
|
|
63
|
+
"gemini-4-neon-disabled": 1_000_000,
|
|
64
|
+
"gemini-4-neon-xhigh": 1_000_000,
|
|
65
|
+
"gemini-4-neon-high": 1_000_000,
|
|
66
|
+
"gemini-4-neon-medium": 1_000_000,
|
|
67
|
+
"gemini-4-neon-low": 1_000_000,
|
|
68
|
+
"gemini-4-hydrogen": 1_000_000,
|
|
69
|
+
"gemini-4-hydrogen-disabled": 1_000_000,
|
|
70
|
+
"gemini-4-hydrogen-xhigh": 1_000_000,
|
|
71
|
+
"gemini-4-hydrogen-high": 1_000_000,
|
|
72
|
+
"gemini-4-hydrogen-medium": 1_000_000,
|
|
73
|
+
"gemini-4-hydrogen-low": 1_000_000,
|
|
74
|
+
"gemini-4-hydrogen-tiered": 1_000_000,
|
|
75
|
+
"gemini-4-hydrogen-tiered-high": 1_000_000,
|
|
76
|
+
"gemini-4-hydrogen-tiered-xhigh": 1_000_000,
|
|
77
|
+
"gemini-4-hydrogen-sonar": 1_000_000,
|
|
47
78
|
// Google Gemini 3.x — 1M context window per deepmind.google/models/gemini/*.
|
|
79
|
+
"gemini-3.8-flash": 1_000_000,
|
|
80
|
+
"gemini-3.8-flash-tiered": 1_000_000,
|
|
48
81
|
"gemini-3.8-flash-high": 1_000_000,
|
|
49
82
|
"gemini-3.8-flash-medium": 1_000_000,
|
|
50
83
|
"gemini-3.8-flash-low": 1_000_000,
|
package/src/rotator.ts
CHANGED
|
@@ -1091,16 +1091,23 @@ export class AccountRotator {
|
|
|
1091
1091
|
setProviderCooldown: (acc, providerId, durationMs) =>
|
|
1092
1092
|
this.setProviderCooldown(acc, providerId, durationMs),
|
|
1093
1093
|
};
|
|
1094
|
-
// Parent-account model: poll quota for every provider credential
|
|
1094
|
+
// Parent-account model: poll quota for every active, valid provider credential
|
|
1095
1095
|
// the account holds (Google OAuth pools + Ollama usage pools).
|
|
1096
1096
|
const providerIds = new Set<string>(
|
|
1097
1097
|
(account.config.credentials ?? []).map((c) => c.provider),
|
|
1098
1098
|
);
|
|
1099
1099
|
if (providerIds.size === 0) providerIds.add(primaryProviderId(account.config));
|
|
1100
1100
|
for (const pid of providerIds) {
|
|
1101
|
+
if (account.invalidProviders?.[pid]) continue;
|
|
1102
|
+
if (this.isProviderOffForAccount(account, pid)) continue;
|
|
1103
|
+
const providerQuotaCtx: QuotaFetchContext = {
|
|
1104
|
+
...quotaCtx,
|
|
1105
|
+
reportQuotaPollFlag: (acc, statusCode, errorText) =>
|
|
1106
|
+
this.reportQuotaPollFlag(acc, statusCode, errorText, "quota-poll", pid),
|
|
1107
|
+
};
|
|
1101
1108
|
try {
|
|
1102
1109
|
await this.ensureValidTokenForProvider(account, pid);
|
|
1103
|
-
await getProviderAdapter(pid).fetchQuota(account,
|
|
1110
|
+
await getProviderAdapter(pid).fetchQuota(account, providerQuotaCtx);
|
|
1104
1111
|
if (pid === DEFAULT_PROVIDER) {
|
|
1105
1112
|
this.migratePersistedQuotaStateKeys();
|
|
1106
1113
|
}
|
|
@@ -1233,7 +1240,11 @@ export class AccountRotator {
|
|
|
1233
1240
|
statusCode: number,
|
|
1234
1241
|
errorText: string,
|
|
1235
1242
|
model = "quota-poll",
|
|
1243
|
+
providerId?: string,
|
|
1236
1244
|
): void {
|
|
1245
|
+
// Only emit flag telemetry on the transition into an invalid state; never
|
|
1246
|
+
// re-emit on repeated polls/kickstarts for an already-invalidated provider.
|
|
1247
|
+
if (providerId && account.invalidProviders?.[providerId]) return;
|
|
1237
1248
|
const modelKey = model === "quota-poll" ? account.quota[0]?.modelKey ?? model : model;
|
|
1238
1249
|
const ctx = this.getFlagContext(account, modelKey);
|
|
1239
1250
|
const lower = errorText.toLowerCase();
|
|
@@ -4696,15 +4707,20 @@ export class AccountRotator {
|
|
|
4696
4707
|
existing.consecutiveErrors = 0;
|
|
4697
4708
|
existing.accessToken = null;
|
|
4698
4709
|
existing.tokenExpires = 0;
|
|
4699
|
-
|
|
4710
|
+
const updatedProviders = new Set<string>(
|
|
4711
|
+
(accountConfig.credentials ?? []).map((credential) => credential.provider),
|
|
4712
|
+
);
|
|
4713
|
+
if (accountConfig.refreshToken) updatedProviders.add(DEFAULT_PROVIDER);
|
|
4714
|
+
if (receivesCodexCredential) updatedProviders.add("openai-codex");
|
|
4715
|
+
for (const pid of updatedProviders) {
|
|
4700
4716
|
if (existing.invalidProviders) {
|
|
4701
|
-
delete existing.invalidProviders[
|
|
4717
|
+
delete existing.invalidProviders[pid];
|
|
4702
4718
|
if (Object.keys(existing.invalidProviders).length === 0) {
|
|
4703
4719
|
delete existing.invalidProviders;
|
|
4704
4720
|
}
|
|
4705
4721
|
}
|
|
4706
4722
|
if (existing.providerTokens) {
|
|
4707
|
-
delete existing.providerTokens[
|
|
4723
|
+
delete existing.providerTokens[pid];
|
|
4708
4724
|
if (Object.keys(existing.providerTokens).length === 0) {
|
|
4709
4725
|
delete existing.providerTokens;
|
|
4710
4726
|
}
|
|
@@ -5089,6 +5105,14 @@ export class AccountRotator {
|
|
|
5089
5105
|
error: "provider turned off on the Models page",
|
|
5090
5106
|
};
|
|
5091
5107
|
}
|
|
5108
|
+
if (account.invalidProviders?.[target.providerId]) {
|
|
5109
|
+
return {
|
|
5110
|
+
ok: false,
|
|
5111
|
+
status: 409,
|
|
5112
|
+
upstreamModel: target.upstreamModel,
|
|
5113
|
+
error: `${target.providerId} credential requires re-authentication`,
|
|
5114
|
+
};
|
|
5115
|
+
}
|
|
5092
5116
|
if (isProviderModelOff(this, target.providerId, target.upstreamModel)) {
|
|
5093
5117
|
return {
|
|
5094
5118
|
ok: false,
|
|
@@ -5278,7 +5302,7 @@ export class AccountRotator {
|
|
|
5278
5302
|
// Provider-scoped invalidation: even with account-enforcement language
|
|
5279
5303
|
// in the response, only the specific provider credential is invalidated.
|
|
5280
5304
|
// Sibling providers on the same account remain routable.
|
|
5281
|
-
this.reportQuotaPollFlag(account, response.status, errorText, upstreamModel);
|
|
5305
|
+
this.reportQuotaPollFlag(account, response.status, errorText, upstreamModel, target.providerId);
|
|
5282
5306
|
this.markProviderInvalid(account, target.providerId, failure.description);
|
|
5283
5307
|
} else {
|
|
5284
5308
|
account.lastError = failure.description;
|
|
@@ -5333,11 +5357,14 @@ export class AccountRotator {
|
|
|
5333
5357
|
return { ok: false, error: "account not found", results: [] };
|
|
5334
5358
|
}
|
|
5335
5359
|
|
|
5336
|
-
const idlePools = account.quota.filter(
|
|
5337
|
-
(q)
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5360
|
+
const idlePools = account.quota.filter((q) => {
|
|
5361
|
+
if (!this.isQuotaIdleForKickstart(q)) return false;
|
|
5362
|
+
const target = this.getKickstartTarget(account, q.modelKey);
|
|
5363
|
+
if (!target) return false;
|
|
5364
|
+
if (account.invalidProviders?.[target.providerId]) return false;
|
|
5365
|
+
if (this.isProviderOffForAccount(account, target.providerId)) return false;
|
|
5366
|
+
return true;
|
|
5367
|
+
});
|
|
5341
5368
|
if (idlePools.length === 0) {
|
|
5342
5369
|
return { ok: true, results: [] };
|
|
5343
5370
|
}
|