tuxevil-rotator 3.7.0 → 3.7.2
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 +26 -0
- package/README.md +8 -3
- package/package.json +1 -1
- package/src/compat.ts +342 -15
- package/src/fetch-with-retry.ts +71 -0
- package/src/providers/adapter.ts +10 -0
- package/src/providers/credential-helpers.ts +12 -1
- package/src/providers/google-antigravity/forward.ts +30 -4
- package/src/providers/google-antigravity/translators.ts +2 -1
- package/src/providers/ollama/forward.ts +5 -2
- package/src/providers/ollama/index.ts +5 -3
- package/src/providers/ollama/quota-poll-store.ts +14 -6
- package/src/providers/ollama/quota.ts +31 -5
- package/src/providers/openai-codex/compat.ts +62 -7
- package/src/providers/openai-codex/forward.ts +53 -2
- package/src/providers/openai-codex/index.ts +26 -2
- package/src/providers/openai-codex/quota.ts +32 -6
- package/src/providers/opencode-zen/catalog.ts +15 -4
- package/src/providers/opencode-zen/forward.ts +739 -16
- package/src/providers/opencode-zen/quota.ts +1 -1
- package/src/providers/registry.ts +2 -0
- package/src/proxy.ts +40 -5
- package/src/rate-limit-parser.ts +29 -0
- package/src/rotator.ts +216 -71
- package/src/static/dashboard.css +1 -0
- package/src/static/dashboard.js +14 -15
- package/src/stream-guards.ts +85 -0
- package/src/telemetry.ts +1 -1
- package/src/types.ts +21 -23
- package/tools/telemetry-receiver/receiver.js +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [3.7.2] - 2026-09-16
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Cached token usage propagation**: Google Antigravity cached prompt usage is now preserved as OpenAI `prompt_tokens_details.cached_tokens` and Anthropic `cache_read_input_tokens` across the compatibility layer ([#34](https://github.com/tuxevil/tuxevil-rotator/pull/34) by [@toRolex](https://github.com/toRolex)).
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Native Gemini usage reporting**: Native `generateContent` responses now expose `cachedContentTokenCount` when Google reports cached prompt tokens.
|
|
14
|
+
- **OpenCode Zen Responses usage**: Cached input tokens now survive JSON and SSE translation through Chat and Responses compatibility paths, with regression coverage.
|
|
15
|
+
|
|
16
|
+
## [3.7.1] - 2026-09-12
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **OpenCode Zen free-model catalog update**: Added `big-pickle` to the OpenCode Zen catalog and removed the retired `deepseek-v4-flash-free` and `hy3-free` entries.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **Muse Spark routing**: `muse-spark-1.3-contributor-free` is now forwarded through the OpenCode Zen Responses endpoint while Chat, Responses, and Anthropic compatibility surfaces are all preserved.
|
|
25
|
+
- **Tier-first routing under concurrency**: Concurrent least-loaded account selection now respects tier priority, and persisted lower-tier assignments are re-evaluated while idle.
|
|
26
|
+
- **Ollama monthly quota parsing**: The Ollama monthly quota pool is correctly parsed when the provider reports monthly-style usage.
|
|
27
|
+
- **Provider quota labels**: Simplified and aligned provider-level quota display labels for Ollama, Codex, and OpenCode Zen.
|
|
28
|
+
- **Codex kickstart lifecycle**: Unstarted Codex quota timers are now kicked off on startup; stale kickstart responses are drained to avoid blocking subsequent requests.
|
|
29
|
+
- **Ollama pricing and forecast label**: Corrected the Ollama pricing entry and aligned the forecast label shown in the dashboard.
|
|
30
|
+
|
|
5
31
|
## [3.7.0] - 2026-09-07
|
|
6
32
|
|
|
7
33
|
### Added
|
package/README.md
CHANGED
|
@@ -53,6 +53,10 @@ Originally built as a multi-account rotator for Google Antigravity. It now gener
|
|
|
53
53
|
|
|
54
54
|
## Current Model Update
|
|
55
55
|
|
|
56
|
+
- **Cached Token Usage Propagation**: Google Antigravity cached prompt usage is preserved as `cachedContentTokenCount` for native Gemini responses and as cache-read details across OpenAI, Anthropic, and OpenCode Zen Responses compatibility routes. ([PR #34](https://github.com/tuxevil/tuxevil-rotator/pull/34) by [@toRolex](https://github.com/toRolex); follow-up compatibility fixes included in [v3.7.2](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v3.7.2))
|
|
57
|
+
- **OpenCode Zen catalog sync**: Added `big-pickle` and removed the retired `deepseek-v4-flash-free` and `hy3-free` entries; `muse-spark-1.3-contributor-free` is now routed through the Responses endpoint with full Chat, Responses, and Anthropic surface compatibility. ([v3.7.1](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v3.7.1))
|
|
58
|
+
- **Tier-first routing under concurrency**: Concurrent least-loaded account selection now enforces tier priority, and persisted lower-tier assignments are re-evaluated while idle. ([v3.7.1](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v3.7.1))
|
|
59
|
+
- **Codex kickstart lifecycle**: Unstarted Codex quota timers are kicked off on startup and stale kickstart responses are drained to avoid blocking subsequent requests. ([v3.7.1](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v3.7.1))
|
|
56
60
|
- **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
61
|
- **Dynamic Antigravity Discovery**: Successful quota polls reconcile live model IDs and metadata per full account identity. Newly advertised models appear in `/v1/models` and route only to accounts that advertised them; removed models disappear without falling back to the generic Gemini pool. Legacy `gemini-3.5-*` IDs stay hidden, and configured `modelSpecs` substring overrides retain precedence. ([PR #29](https://github.com/tuxevil/tuxevil-rotator/pull/29) by [@javargasm](https://github.com/javargasm))
|
|
58
62
|
- **Dynamic Catalog Hardening**: Quota snapshots reject malformed data while preserving the last known-good state, stale account responses are ignored, and dynamic model ownership and quota-safety state survive restarts without routing a model through an account that did not advertise it. ([PR #30](https://github.com/tuxevil/tuxevil-rotator/pull/30) by [@javargasm](https://github.com/javargasm))
|
|
@@ -65,7 +69,7 @@ Originally built as a multi-account rotator for Google Antigravity. It now gener
|
|
|
65
69
|
## v3.2 Highlights
|
|
66
70
|
|
|
67
71
|
- **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.
|
|
68
|
-
- **OpenCode Zen Provider**: Added `opencode-zen` provider support (`
|
|
72
|
+
- **OpenCode Zen Provider**: Added `opencode-zen` provider support (`big-pickle`, `mimo-v2.5-free`, `ling-3.0-flash-fin-free`, `nemotron-3-ultra-free`, `nemotron-3.5-lightning-free`, `muse-spark-1.3-contributor-free`) with static API key validation, onboarding UI tabs in `/login` and `/login-cli`, real-time quota tracking, and cost tracking.
|
|
69
73
|
- **Streaming Tool Call Reliability**: Stateful preservation of tool call names and IDs across fragmented SSE chunks in multi-turn tool calling sessions.
|
|
70
74
|
- **Standardized Rate-Limit Retries**: Error responses for 429 now provide `retryAfterMs` and `retry_after_seconds` headers and payload data for fine-grained cooldown handling.
|
|
71
75
|
- **Provider Precedence Order**: Standardized provider order across quota pools, credentials, and UI displays (`google-antigravity` -> `ollama` -> `opencode-zen` -> `openai-codex`).
|
|
@@ -141,7 +145,7 @@ Existing `enc:v1` records remain decryptable during migration; newly written rec
|
|
|
141
145
|
- **Multi-account load balancing** — Distributes traffic across a pool of accounts with per-model independent routing
|
|
142
146
|
- **One-command account setup** — `tuxevil-rotator login` auto-discovers (or provisions) the Cloud Code companion project for brand-new Google accounts; `login --provider ollama` adds an Ollama Cloud API key to an existing email or creates a new one
|
|
143
147
|
- **Smart rotation & health scoring** — Six routing policies (`timer-first`, `tier-first`, `quota-first`, `hybrid`, `sequential-quota`, `sticky-quota`) with composite health scores per account
|
|
144
|
-
- **Real-time quota monitoring** — Polls each provider's quota API on its own cadence; Antigravity quota pools are consolidated by family (`claude`, `gemini`) and Ollama reports
|
|
148
|
+
- **Real-time quota monitoring** — Polls each provider's quota API on its own cadence; Antigravity quota pools are consolidated by family (`claude`, `gemini`) and Ollama reports monthly usage
|
|
145
149
|
- **Infringement & abuse detection** — Flags accounts on enforcement signals and triggers protective pause to preserve the rest of the pool
|
|
146
150
|
- **Virtual Keys & access control** — Issue scoped `rk-...` keys for teams, agents, or CI pipelines with per-key model restrictions
|
|
147
151
|
- **Spend logging & audit inspector** — Full request/response audit trail with 6-decimal USD cost estimates for both Antigravity and Ollama traffic (requires PostgreSQL)
|
|
@@ -264,7 +268,7 @@ After starting the proxy, open `http://localhost:51200/dashboard`.
|
|
|
264
268
|
|
|
265
269
|
The dashboard shows:
|
|
266
270
|
- **Routing state** — real-time status, uptime, requests, protective pause timers
|
|
267
|
-
- **Account cards** — quota bars (Antigravity family buckets `claude` / `gemini`; Ollama
|
|
271
|
+
- **Account cards** — quota bars (Antigravity family buckets `claude` / `gemini`; Ollama monthly usage), per-model timers, health scores, flagged alerts
|
|
268
272
|
- **Token usage & savings** — interactive chart with time ranges and CSV/JSON export (real USD for both providers)
|
|
269
273
|
- **Latency (p50/p95)** — per-model TTFB and total duration
|
|
270
274
|
- **Activity heatmap** — 60-day GitHub-style request intensity grid
|
|
@@ -355,6 +359,7 @@ Thanks to these amazing people who have contributed to the project:
|
|
|
355
359
|
- **[@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, effort-based model routing, 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), [PR #32](https://github.com/tuxevil/tuxevil-rotator/pull/32))
|
|
356
360
|
- **[@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))
|
|
357
361
|
- **[@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))
|
|
362
|
+
- **[@toRolex](https://github.com/toRolex)** (Rolex) — Added cached prompt-token extraction from Google Antigravity/Cloud Code usage and mapped it to OpenAI and Anthropic compatibility responses, with focused regression tests. ([PR #34](https://github.com/tuxevil/tuxevil-rotator/pull/34))
|
|
358
363
|
- **[@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, account-scoped dynamic Antigravity discovery and routing, dynamic catalog and quota-safety hardening, persistent dynamic model ownership across restarts, 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, Ollama kickstart routing for multi-provider accounts, and OpenAI-compatible audio transcription plus bidirectional live WebSocket streaming through the local Antigravity observer model. ([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), [PR #29](https://github.com/tuxevil/tuxevil-rotator/pull/29), [PR #30](https://github.com/tuxevil/tuxevil-rotator/pull/30), [PR #31](https://github.com/tuxevil/tuxevil-rotator/pull/31), [PR #33](https://github.com/tuxevil/tuxevil-rotator/pull/33))
|
|
359
364
|
|
|
360
365
|
## Development
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tuxevil-rotator",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.2",
|
|
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",
|