chore: remove deprecated VCU balance tracking

VCU is no longer used by Venice API - only DIEM and USD are relevant.

Co-authored-by: jonisjongithub <jonisjongithub@users.noreply.github.com>
Co-authored-by: Clawdbot <bot@clawd.bot>
This commit is contained in:
jonisjongithub 2026-01-28 00:00:58 -08:00
parent ccf41ec519
commit 82de7bdc21
2 changed files with 0 additions and 6 deletions

View File

@ -32,14 +32,12 @@ describe("venice-balance", () => {
const headers = new Headers();
headers.set("x-venice-balance-diem", "44.32116826");
headers.set("x-venice-balance-usd", "10.50");
headers.set("x-venice-balance-vcu", "1000");
const balance = extractVeniceBalance(headers);
expect(balance).not.toBeNull();
expect(balance?.diem).toBeCloseTo(44.32116826);
expect(balance?.usd).toBeCloseTo(10.5);
expect(balance?.vcu).toBeCloseTo(1000);
expect(balance?.lastChecked).toBeGreaterThan(0);
});

View File

@ -4,7 +4,6 @@
* Extracts and tracks Venice API balance from response headers:
* - x-venice-balance-diem: DIEM token balance
* - x-venice-balance-usd: USD credit balance
* - x-venice-balance-vcu: VCU balance
*
* This module provides:
* - Balance extraction from response headers
@ -16,7 +15,6 @@
export interface VeniceBalance {
diem?: number;
usd?: number;
vcu?: number;
lastChecked: number;
/** Provider identifier (for multi-key scenarios) */
providerId?: string;
@ -82,7 +80,6 @@ export function extractVeniceBalance(headers: Headers | Record<string, string>):
if (isNaN(diem)) return null;
const usdRaw = get("x-venice-balance-usd");
const vcuRaw = get("x-venice-balance-vcu");
// Extract rate limit headers (tracks API key spending cap)
const limitRequestsRaw = get("x-ratelimit-limit-requests");
@ -104,7 +101,6 @@ export function extractVeniceBalance(headers: Headers | Record<string, string>):
return {
diem,
usd: usdRaw ? parseFloat(usdRaw) : undefined,
vcu: vcuRaw ? parseFloat(vcuRaw) : undefined,
rateLimit,
lastChecked: Date.now(),
};