tuxevil-rotator 4.0.0 → 4.1.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 +37 -0
- package/README.md +6 -1
- package/package.json +1 -1
- package/src/audio-transcription.ts +44 -4
- package/src/compat.ts +196 -222
- package/src/config-defaults.ts +5 -0
- package/src/dashboard-live.ts +10 -8
- package/src/dashboard-types.ts +39 -1
- package/src/dashboard.ts +156 -1
- package/src/model-catalog-revision.ts +17 -0
- package/src/model-catalog.ts +302 -0
- package/src/providers/adapter.ts +18 -0
- package/src/providers/google-antigravity/catalog.ts +190 -1
- package/src/providers/google-antigravity/forward.ts +2 -0
- package/src/providers/google-antigravity/index.ts +11 -0
- package/src/providers/google-antigravity/translators.ts +4 -0
- package/src/providers/ollama/index.ts +11 -1
- package/src/providers/ollama/quota-poll-store.ts +22 -1
- package/src/providers/ollama/quota.ts +95 -23
- package/src/providers/openai-codex/index.ts +18 -2
- package/src/providers/opencode-zen/index.ts +11 -2
- package/src/proxy.ts +143 -28
- package/src/rotator.ts +219 -10
- package/src/settings-repository.ts +36 -5
- package/src/types.ts +68 -26
- package/src/validators.ts +35 -0
- package/src/web/app.tsx +4 -0
- package/src/web/components/icons.tsx +29 -0
- package/src/web/components/ui.tsx +6 -1
- package/src/web/lib/accounts.ts +1 -0
- package/src/web/lib/attention.ts +12 -0
- package/src/web/lib/models.ts +279 -0
- package/src/web/lib/pools.ts +53 -9
- package/src/web/lib/status.ts +13 -3
- package/src/web/nav.ts +1 -0
- package/src/web/pages/AccountDetail.tsx +16 -2
- package/src/web/pages/Models.tsx +852 -0
- package/src/web/pages/Overview.tsx +31 -15
- package/src/web/pages/Usage.tsx +3 -3
- package/src/web/state/api.ts +18 -0
- package/src/web/state/model-catalog.ts +103 -0
- package/src/web/state/router.ts +24 -16
- package/src/web/state/store.ts +6 -6
- package/src/web/styles/app.css +294 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { JSX } from "preact";
|
|
4
4
|
import type { AccountTier, ModelQuota } from "../../types.js";
|
|
5
5
|
import type { DashboardAccount, DashboardOverview } from "../../dashboard-types.js";
|
|
6
|
-
import { formatCount } from "../lib/format.js";
|
|
6
|
+
import { formatCount, formatUsd } from "../lib/format.js";
|
|
7
7
|
import {
|
|
8
8
|
ACCOUNT_TIERS,
|
|
9
9
|
accountStatus,
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
Button,
|
|
28
28
|
Countdown,
|
|
29
29
|
KeyValue,
|
|
30
|
+
Link,
|
|
30
31
|
Meter,
|
|
31
32
|
Pill,
|
|
32
33
|
ProviderTags,
|
|
@@ -34,6 +35,7 @@ import {
|
|
|
34
35
|
StatusPill,
|
|
35
36
|
} from "../components/ui.js";
|
|
36
37
|
import { accountMenuItems } from "./Accounts.js";
|
|
38
|
+
import { providerPath } from "../state/router.js";
|
|
37
39
|
|
|
38
40
|
export function AccountDetail({ email, onClose }: { email: string; onClose: () => void }): JSX.Element {
|
|
39
41
|
const data = overview.value!;
|
|
@@ -210,7 +212,8 @@ function ProviderProblems({ account }: { account: DashboardAccount }): JSX.Eleme
|
|
|
210
212
|
const invalid = Object.entries(account.invalidProviders || {});
|
|
211
213
|
const cooldowns = Object.entries(account.providerCooldowns || {}).filter(([, until]) => until > now.value);
|
|
212
214
|
const modelCooldowns = Object.entries(account.cooldownsByModel || {}).filter(([, until]) => until > now.value);
|
|
213
|
-
|
|
215
|
+
const turnedOff = account.disabledProviders ?? [];
|
|
216
|
+
if (invalid.length === 0 && cooldowns.length === 0 && modelCooldowns.length === 0 && turnedOff.length === 0) return null;
|
|
214
217
|
return (
|
|
215
218
|
<section class="callout tone-warn">
|
|
216
219
|
<Icon name="clock" size={16} />
|
|
@@ -230,6 +233,11 @@ function ProviderProblems({ account }: { account: DashboardAccount }): JSX.Eleme
|
|
|
230
233
|
<strong>{providerLabel(provider)}</strong> credential rejected: {masker.value.text(reason)}
|
|
231
234
|
</div>
|
|
232
235
|
))}
|
|
236
|
+
{turnedOff.map((provider) => (
|
|
237
|
+
<div key={`o-${provider}`}>
|
|
238
|
+
<strong>{providerLabel(provider)}</strong> is turned off for this account. <Link href={providerPath(provider)}>Manage</Link>
|
|
239
|
+
</div>
|
|
240
|
+
))}
|
|
233
241
|
</div>
|
|
234
242
|
</section>
|
|
235
243
|
);
|
|
@@ -248,6 +256,12 @@ function QuotaRow({ account, quota, inactive }: { account: DashboardAccount; quo
|
|
|
248
256
|
<span class="num quota-pct">{quota.percentRemaining}%</span>
|
|
249
257
|
</div>
|
|
250
258
|
<Meter value={quota.percentRemaining} label={`${quota.displayName} quota remaining`} />
|
|
259
|
+
{quota.credits && (
|
|
260
|
+
<p class="cell-sub num">
|
|
261
|
+
{formatUsd(quota.credits.balanceUsd)} / {formatUsd(quota.credits.allowanceUsd)} included credits remaining
|
|
262
|
+
{quota.credits.purchasedUsd > 0 && <> · {formatUsd(quota.credits.purchasedUsd)} purchased credits</>}
|
|
263
|
+
</p>
|
|
264
|
+
)}
|
|
251
265
|
<div class="quota-meta">
|
|
252
266
|
<span>{TIMER_LABELS[quota.timerType] ?? quota.timerType}</span>
|
|
253
267
|
{quota.timerType !== "fresh" && resetAt && resetAt > now.value && (
|