v0.2.8 operator dashboard with per-call audit log + cost tracking
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user