keepalive: bill the TTS warm ping to its own team (agent:audio-keepalive)

The ping ran on the master key, so every row logged team_id '' and ~$0.19/day
of real Tinfoil spend resolved to no alias: invisible on the panel, unseen by
the digest, and the unexplained half of the spend-guard delta.

audio_keepalive.py now reads the team key from /app/data/.keepalive_key
(model-scoped to tinfoil/voxtral-tts, team budget $10/30d) and falls back to
the master key, warning once, if the file is gone. README documents the key
and how to recreate it.
This commit is contained in:
inference-admin committed 2026-11-28 13:20:30 +00:00
1 parent 41b8560f46
commit 2e1e35d7fb
3 files changed
+69 -24

No files matched your search

+4 -2
View File
@@ -286,8 +286,10 @@ echo "Tinfoil proxy is up on 127.0.0.1:3301"
# app container, where the network namespace, the master key and the
# sidecar are all proven. Every 15 minutes ping tinfoil/voxtral-tts
# ($0.002/request) so voice mode skips the ~24s Tinfoil cold-start after
# idle. audio_keepalive.py is silent on success and prints on failure, so
# /app/data/keepalive.log only ever grows on failure.
# idle. The script uses the keepalive team's key (/app/data/.keepalive_key)
# so the spend bills to agent:audio-keepalive instead of landing in
# SpendLogs with no team. audio_keepalive.py is silent on success and prints
# on failure, so /app/data/keepalive.log only ever grows on failure.
(
while true; do
python3 /app/code/audio_keepalive.py >> /app/data/keepalive.log 2>&1 || true