tuxevil-rotator 3.1.0 → 3.2.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 +23 -0
- package/README.md +13 -3
- package/package.json +1 -1
- package/src/account-store.ts +2 -2
- package/src/compat/model-specs.ts +1 -0
- package/src/compat.ts +458 -24
- package/src/config-normalize.ts +15 -9
- package/src/dashboard.ts +43 -42
- package/src/onboarding.ts +117 -0
- package/src/providers/adapter.ts +7 -0
- package/src/providers/credential-helpers.ts +57 -0
- package/src/providers/google-antigravity/index.ts +9 -0
- package/src/providers/google-antigravity/quota.ts +2 -1
- package/src/providers/google-antigravity/translators.ts +53 -3
- package/src/providers/ollama/index.ts +8 -0
- package/src/providers/ollama/quota.ts +2 -1
- package/src/providers/openai-codex/index.ts +12 -1
- package/src/providers/openai-codex/quota.ts +13 -1
- package/src/providers/opencode-zen/catalog.ts +0 -2
- package/src/providers/opencode-zen/credentials.ts +1 -1
- package/src/providers/opencode-zen/forward.ts +19 -4
- package/src/providers/opencode-zen/index.ts +9 -0
- package/src/providers/opencode-zen/login.ts +1 -1
- package/src/providers/opencode-zen/quota.ts +2 -1
- package/src/providers/registry.ts +22 -4
- package/src/proxy.ts +31 -46
- package/src/rate-limit-parser.ts +2 -1
- package/src/rotator.ts +41 -30
- package/src/spend-logger.ts +2 -0
- package/src/static/dashboard-keys.js +152 -2
- package/src/static/dashboard.js +36 -16
- package/src/types.ts +31 -10
- package/tools/telemetry-receiver/receiver.js +14 -0
package/src/types.ts
CHANGED
|
@@ -277,6 +277,7 @@ export const QUOTA_MODEL_KEYS: Record<
|
|
|
277
277
|
"gemini-3.6-flash-medium",
|
|
278
278
|
"gemini-3.6-flash-low",
|
|
279
279
|
"gemini-3.6-flash-tiered",
|
|
280
|
+
"gemini-3.7-flash-tiered",
|
|
280
281
|
],
|
|
281
282
|
display: "Gemini",
|
|
282
283
|
},
|
|
@@ -291,8 +292,6 @@ export function resolveQuotaModelKey(requestModel: string): string | null {
|
|
|
291
292
|
lower === "nemotron-3-ultra-free" ||
|
|
292
293
|
lower === "mimo-v2.5-free" ||
|
|
293
294
|
lower === "hy3-free" ||
|
|
294
|
-
lower === "ling-3.0-tiny-free" ||
|
|
295
|
-
lower === "laguna-s-2.1-free" ||
|
|
296
295
|
lower.endsWith("-free")
|
|
297
296
|
) {
|
|
298
297
|
return "opencode-zen";
|
|
@@ -347,6 +346,17 @@ export function resolveDisplayModelKey(requestModel: string): string {
|
|
|
347
346
|
if (lower.includes("-high")) return "gemini-3.6-flash-high";
|
|
348
347
|
return "gemini-3.6-flash-high"; // unspecified variant
|
|
349
348
|
}
|
|
349
|
+
// Gemini 3.7 Flash — only the tiered variant exists. Unsupported
|
|
350
|
+
// virtual variants (low/medium/high) intentionally fall through to the
|
|
351
|
+
// generic Flash fallback below instead of resolving as supported models.
|
|
352
|
+
if (
|
|
353
|
+
lower.includes("gemini") &&
|
|
354
|
+
lower.includes("3.7") &&
|
|
355
|
+
lower.includes("flash") &&
|
|
356
|
+
lower.includes("-tiered")
|
|
357
|
+
) {
|
|
358
|
+
return "gemini-3.7-flash-tiered";
|
|
359
|
+
}
|
|
350
360
|
// Gemini 3.5 Flash — distinguish medium vs high
|
|
351
361
|
if (
|
|
352
362
|
lower.includes("gemini") &&
|
|
@@ -755,6 +765,18 @@ export const MODEL_PRICING: Record<
|
|
|
755
765
|
cachingPer1M: 0.15,
|
|
756
766
|
cachingStoragePer1MPerHour: 1.0,
|
|
757
767
|
},
|
|
768
|
+
// Gemini 3.7 Flash tiered — public Gemini API equivalent-value pricing,
|
|
769
|
+
// verified on the official Gemini API / Google Cloud pricing pages
|
|
770
|
+
// 2026-08-13. Introductory rates through 2026-12-31. From 2027-01-01
|
|
771
|
+
// these double to: input 1.50, output 7.50, cached input 0.15, cache
|
|
772
|
+
// storage 1.00 (USD per 1M tokens / per 1M tokens/hour) — update this
|
|
773
|
+
// static entry when the introductory period ends.
|
|
774
|
+
"gemini-3.7-flash-tiered": {
|
|
775
|
+
inputPer1M: 0.75,
|
|
776
|
+
outputPer1M: 3.75,
|
|
777
|
+
cachingPer1M: 0.075,
|
|
778
|
+
cachingStoragePer1MPerHour: 0.5,
|
|
779
|
+
},
|
|
758
780
|
"gpt-oss-120b-medium": { inputPer1M: 2.0, outputPer1M: 10.0 },
|
|
759
781
|
|
|
760
782
|
// OpenAI Codex GPT-5.6 models — official OpenAI API pricing checked
|
|
@@ -797,14 +819,13 @@ export const MODEL_PRICING: Record<
|
|
|
797
819
|
"nemotron-3-super": { inputPer1M: 0.60, outputPer1M: 1.80 },
|
|
798
820
|
"nemotron-3-ultra": { inputPer1M: 0.60, outputPer1M: 1.80 },
|
|
799
821
|
|
|
800
|
-
// OpenCode Zen free models
|
|
801
|
-
"deepseek-v4-flash-free": { inputPer1M: 0.
|
|
802
|
-
"nemotron-3.5-lightning-free": { inputPer1M: 0.
|
|
803
|
-
"nemotron-3-ultra-free": { inputPer1M: 0.
|
|
804
|
-
"mimo-v2.5-free": { inputPer1M: 0.
|
|
805
|
-
"hy3-free": { inputPer1M: 0.
|
|
806
|
-
|
|
807
|
-
"laguna-s-2.1-free": { inputPer1M: 0.0, outputPer1M: 0.0 },
|
|
822
|
+
// OpenCode Zen free models — equivalent market rates (USD per 1M tokens) for savings tracking
|
|
823
|
+
"deepseek-v4-flash-free": { inputPer1M: 0.14, outputPer1M: 0.28, cachingPer1M: 0.0028 },
|
|
824
|
+
"nemotron-3.5-lightning-free": { inputPer1M: 0.35, outputPer1M: 1.05 },
|
|
825
|
+
"nemotron-3-ultra-free": { inputPer1M: 0.60, outputPer1M: 1.80 },
|
|
826
|
+
"mimo-v2.5-free": { inputPer1M: 0.15, outputPer1M: 0.60 },
|
|
827
|
+
"hy3-free": { inputPer1M: 0.25, outputPer1M: 1.00 },
|
|
828
|
+
|
|
808
829
|
};
|
|
809
830
|
|
|
810
831
|
// Which Ollama Cloud models respond on which subscription tiers, verified
|
|
@@ -337,6 +337,10 @@ const MODEL_PRICING = {
|
|
|
337
337
|
"gemini-3.6-flash-medium": { inputPer1M: 1.50, outputPer1M: 7.50 },
|
|
338
338
|
"gemini-3.6-flash-low": { inputPer1M: 1.50, outputPer1M: 7.50 },
|
|
339
339
|
"gemini-3.6-flash-tiered": { inputPer1M: 1.50, outputPer1M: 7.50 },
|
|
340
|
+
// Gemini 3.7 Flash tiered — public Gemini API pricing, verified
|
|
341
|
+
// 2026-08-13. Introductory rates through 2026-12-31; from 2027-01-01
|
|
342
|
+
// these double to input 1.50 / output 7.50 per 1M tokens.
|
|
343
|
+
"gemini-3.7-flash-tiered": { inputPer1M: 0.75, outputPer1M: 3.75 },
|
|
340
344
|
"gpt-oss-120b-medium": { inputPer1M: 2.00, outputPer1M: 10.00 },
|
|
341
345
|
|
|
342
346
|
// Ollama Cloud models — mirrors MODEL_PRICING in src/types.ts
|
|
@@ -358,6 +362,15 @@ const MODEL_PRICING = {
|
|
|
358
362
|
"nemotron-3-nano:30b": { inputPer1M: 0.50, outputPer1M: 1.50 },
|
|
359
363
|
"nemotron-3-super": { inputPer1M: 0.60, outputPer1M: 1.80 },
|
|
360
364
|
"nemotron-3-ultra": { inputPer1M: 0.60, outputPer1M: 1.80 },
|
|
365
|
+
|
|
366
|
+
// OpenCode Zen free models — mirrors MODEL_PRICING in src/types.ts
|
|
367
|
+
"deepseek-v4-flash-free": { inputPer1M: 0.14, outputPer1M: 0.28 },
|
|
368
|
+
"nemotron-3.5-lightning-free": { inputPer1M: 0.35, outputPer1M: 1.05 },
|
|
369
|
+
"nemotron-3-ultra-free": { inputPer1M: 0.60, outputPer1M: 1.80 },
|
|
370
|
+
"mimo-v2.5-free": { inputPer1M: 0.15, outputPer1M: 0.60 },
|
|
371
|
+
"hy3-free": { inputPer1M: 0.25, outputPer1M: 1.00 },
|
|
372
|
+
"ling-3.0-tiny-free": { inputPer1M: 0.05, outputPer1M: 0.20 },
|
|
373
|
+
"laguna-s-2.1-free": { inputPer1M: 0.20, outputPer1M: 0.80 },
|
|
361
374
|
};
|
|
362
375
|
|
|
363
376
|
function getModelPricing(model) {
|
|
@@ -365,6 +378,7 @@ function getModelPricing(model) {
|
|
|
365
378
|
const lower = (model || "").toLowerCase();
|
|
366
379
|
if (lower.includes("opus")) return MODEL_PRICING["claude-opus-4-6-thinking"];
|
|
367
380
|
if (lower.includes("sonnet")) return MODEL_PRICING["claude-sonnet-4-6"];
|
|
381
|
+
if (lower.includes("3.7-flash")) return MODEL_PRICING["gemini-3.7-flash-tiered"];
|
|
368
382
|
if (lower.includes("3.6-flash")) return MODEL_PRICING["gemini-3.6-flash-high"];
|
|
369
383
|
if (lower.includes("3.5-flash")) return MODEL_PRICING["gemini-3.5-flash-high"];
|
|
370
384
|
if (lower.includes("flash")) return MODEL_PRICING["gemini-3-flash"];
|