v0.2.8 operator dashboard with per-call audit log + cost tracking

This commit is contained in:
local
2026-05-12 00:26:59 -05:00
parent 9af70302b1
commit 05ebeb5d51
12 changed files with 924 additions and 13 deletions
+6
View File
@@ -120,6 +120,10 @@ export function createGeminiBackend({
// that handles this exact shape.
segments: [],
duration_seconds: 0,
// Pass usage + the model id back to the route so audit-log
// entries can include token counts + computed cost.
usage: result?.usageMetadata || null,
model: transcriptionModel,
};
} finally {
try { await fs.rm(tmpDir, { recursive: true, force: true }); } catch {}
@@ -138,6 +142,8 @@ export function createGeminiBackend({
});
return {
text: safeText(result) || "",
usage: result?.usageMetadata || null,
model: analysisModel,
};
}
+7 -1
View File
@@ -147,6 +147,8 @@ export function createHardwareBackend({
text: lines.join("\n"),
segments: shifted,
duration_seconds: data.duration || 0,
usage: null, // hardware backend doesn't expose token counts
model: transcribeModel,
};
},
@@ -194,7 +196,11 @@ export function createHardwareBackend({
const data = await res.json();
const text = data?.choices?.[0]?.message?.content || "";
return { text };
return {
text,
usage: null,
model: analyzeModel,
};
},
};
}