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.
The config header still claimed "EUR->USD FX = 1.16" and listed GreenPT/Regolo
EUR numerals with $ signs; the committed USD fallback was likewise generated
at 1.16 while the gateway has been applying the ECB daily rate since the boot
sync landed (live 1.0975 on 2026-11-26). Live billing was correct, but anyone
reading the config — members included — saw pre-conversion rates presented as
USD, and a first-install fallback over-billed by ~5.7%.
- Header now names eur_prices.json as the only source, says the USD numerals
are generated, and pins the fallback at 1.0975 (ECB 2026-11-26).
- All GreenPT/Regolo model_info regenerated at that pin; in-file price comments
relabelled EUR where they carried EUR numerals.
- check_eur_fx.py now reads eur_prices.json instead of a hardcoded list (which
silently omitted regolo/apertus-70b and regolo/qwen3.5-122b), takes FX from
FX_FALLBACK_USD, and fails if the config header pin disagrees.
eur_prices.json is the EUR source of truth; fx_sync.py converts at the ECB daily
rate before config validation and rewrites only the model_info cost fields. If the
feed is unreachable the config is left untouched and the boot continues.
deepseek-flash-green and glm-flash-green carried their own old model_info; the
deployment entries were converted but the aliases kept EUR numerals, so live spend
still billed the old rate.
Previous attempt forgot to multiply by the FX and could match a prefix sibling; reverted
and redone with exact model-name anchors. EUR remains the source of truth in comments
and docs; model_info now carries EUR x 1.16 USD so member billing covers cost.
LiteLLM's cost fields are dollar-shaped, but both providers quote EUR; the config
carried EUR numerals as USD, so members were billed ~14% under cost and the co-op
silently absorbed the difference. EUR stays the source of truth; model_info now
carries EUR x 1.16 USD, with the policy recorded in the pricing header. No backfill:
historical spend rows keep the old understated figures and are flagged in docs.
The container was restarted for OOM at the 2 GB cap; a fresh process is already at
1.74 GB peak, so the limit is the binding constraint, not a one-off spike.
The greenpt/deepseek-v4.1-flash block still advertised the pre-1017 rates
($0.22/$1.10/$0.011, and in euros). It now states $0.36/$1.45/$0.04 with the
snapshot and date. The audio note no longer says voxtral-tts is 'listed $0/$0';
it states the per-request charges and points at #5, now closed with a spend row.
Speech and transcription price per character/second/token and raise ValueError
when the model declares none of those rates — every Tinfoil per-request model.
The raise aborted cost calculation before the per-request charge was added, so
the gateway wrote spend 0.0 rows. Catch that case for declared per-request
audio models and price the base at 0, leaving the per-request charge as the
whole bill.
Build-time edits of the cost-map JSON never reached the running gateway, so the
audio prices now go in through sitecustomize — imported before LiteLLM prices
anything. Idempotent, non-fatal.
The per-request helper reads litellm.model_cost, which is built from
model_prices_and_context_window.json — not from model_info. Router-side patching
therefore never priced voxtral-tts speech, and every call logged $0. This build
step writes the prices where the calculator looks, and fails the build if the file
is missing instead of warning.
response_cost_calculator returns provider_response_cost as soon as the response
carries one in hidden params and no custom pricing is attached. That return sits
ABOVE the per-request splice, so tts calls exited at 0.0 and never reached it —
which is why whisper billed $0.01/request and speech billed nothing, with no
[coop-audio] debug line to show for it.
The early return now adds the declared per-request charge. Guarded by the
DECLARATION (input_cost_per_request), not the call type, so token-priced models
like voxtral-small-24b stay inert.
GreenPT no longer recommends the base V4.1 Flash release, so the default model now
serves the 1017 snapshot. The deployment keeps model_name greenpt/deepseek-v4.1-flash
(and the deepseek-flash-green alias): only the upstream pointer and the cost move.
openai/deepseek-v4.1-flash -> openai/deepseek-v4.1-flash-1017
$0.22/$1.10/$0.011 per 1M -> $0.36/$1.45/$0.04 per 1M
Why not the rename PR #8 proposes: two days of spend logs show 3,014 calls on the
prefixed id against 84 on the alias, spread across member keys. A rename turns every
one of those into 400 Invalid model name, and member client configs are not visible to
us. Keeping the name means members get the new snapshot and price with no config edit.
Credit: slomo, who found the deprecation and supplied the rates (co-op/support#7, PR #8).
The -green/-tee pair should read as the same model on two routes; 'glm-green'
named the route but not the tier, so it sat oddly beside deepseek-flash-green.
deepseek-flash-latest -> deepseek-flash-green, glm-flash-latest -> glm-green.
'latest' described how fresh a version is; what a member actually needs to choose
between is the route, and -green / -tee says it. The version-free property is
unchanged — it comes from the alias being re-pointed, not from the word in the
name — and is now stated in the comment rather than encoded in the label.
Renamed while the previous names were hours old and nothing depended on them.
Four version-free names, mapped to the models we serve today:
deepseek-flash-latest -> greenpt/deepseek-v4.1-flash (renewable, policy-private)
deepseek-flash-tee -> tinfoil/deepseek-v4-1-flash (TEE)
glm-flash-latest -> greenpt/glm-5.3-flash (renewable, policy-private)
glm-tee -> tinfoil/glm-5.3 (TEE; Tinfoil deprecated flash)
Config-only, per the proposal in co-op/support#47: a model_name is a label, so an
alias is another entry pointing at the same upstream model. Pricing is stated at
the alias, since LiteLLM bills the model_info of the name that was called — a
transition that changes price is then visible in the model list and in budgets.
glm-tee rather than glm-flash-tee: the TEE route for this family is the flagship.
Validator: config OK (litellm), 21 models, no duplicate model_name.
Operator-approved 2026-11-13. Rates and context read live from Regolo's own
model catalog (regolo.ai/models): mistral-small-4-119b $0.20 in / $0.70 out
per 1M, 60K in / 60K out; gemma4-31b $0.40 in / $0.60 out, 100K in / 100K out.
Routing: same Regolo api_base + REGOLO_API_KEY as the existing regolo entries.
models.md member-facing mirror updated in the docs repo separately.
The scheduler task ran audio_keepalive.py in its own container every 10 min
in parallel with the in-container loop (8 min): two warm paths billing the
same ping twice, and the scheduler container's access to 127.0.0.1:4000 and
/app/data was never proven. Keep the proven in-container path only, at a
15-minute interval (sleep 900).
- Dockerfile FROM v1.103.2 -> v1.108.3; manifest upstreamVersion follows.
- Carries main's newer build patches (patch_transcription_response_format.py,
patch_audio_default_mp3.py, audio_keepalive.py) that the v1.108.0 branch
predates, plus the 1.108.x CORS anchor fallback from that branch.
- Re-validated all ten patch scripts against the real v1.108.3 wheel sources:
every anchor matched and the patched files compile. patch_expose_cost_headers
applies via its 1.108.x anchor; patch_audio_request_cost needs
LITELLM_COST_CALCULATOR when run outside a full install (noted in README).
- Stop tracking __pycache__.
- patch_audio_default_mp3.py: default /v1/audio/speech to response_format=mp3
when the caller omits it. LibreChat sends no response_format, and Tinfoil's
voxtral-tts then serves WAV: measured ~8-17s warm (145-300KB) vs ~2.6-3.1s
for mp3 (28-39KB, provider streams it). LibreChat labels the reply
audio/mpeg regardless, so WAV bytes rode under an mp3 label. Explicit
response_format from any caller still wins.
- start.sh: scheduler tasks arrive as ARGUMENTS to this ENTRYPOINT script
(docker run <image> <command>); they were booting a second tinfoil-proxy +
LiteLLM and dying on the bind FATAL every run, so audio_keepalive never
executed. Detect the arg and exec the task directly.
- start.sh: own the warm path in the app container regardless of the
scheduler container: ping tinfoil/voxtral-tts every 480s in the background
(silent on success; failures append to /app/data/keepalive.log).
LiteLLM's openai transcription transformation force-injects
response_format=verbose_json when the caller omits it (to obtain a duration
for per-second pricing). Tinfoil rejects verbose_json for
voxtral-small-24b with a 400, so every bare transcription call failed —
including the file+model shape members and Open WebUI dictation send.
patch_transcription_response_format.py (new build-time patch, non-fatal):
skip the injection for deployments whose model_info declares
coop_no_verbose_json, with an explicit model-name gate as the reliable
mechanism. Its billing (per-token via chat, per-request via the audio
patch) does not need the duration. whisper-large-v3-turbo is untouched:
Tinfoil serves verbose_json for it and dictation depends on the injection.
- Remove the team_id scoping on tinfoil/nomic-embed-text: member keys can now
call the TEE-protected embedding the co-op's own docs-RAG runs on (co-op
traffic unaffected).
- Correct nomic's declared price to Tinfoil's published rate ($0.016/1M in,
was declared $0.05) and declare its 8K context.
- Add greenpt/green-embeddings ($0.20/1M, 2560-dim, 32K ctx) — the only
genuinely distinct other embedding model in GreenPT's catalog; their
green-embedding slug is the same model (identical vectors verified live).
- 15 models served; docs models.md updated in the co-op/docs repo.
Tinfoil's catalog prices exactly one audio model per token: voxtral-small-24b
($0.20 in / $0.60 out per 1M, $0 per request). Wiring it gives members an
STT route without the whisper $0.01/request floor (co-op/support#48).
Two billing shapes on one model entry:
- chat route (input_audio): returns real token usage -> bills exactly per token.
- /v1/audio/transcriptions: Tinfoil returns NO token counts (duration only),
so per-token billing cannot fire; Tinfoil also tokenizes audio in ~30s
chunks (~375-380 tokens each regardless of clip length), making the
chunk-equivalent ~$0.00008/request. Declared input_cost_per_request with
that measured value, added by patch_audio_request_cost.py.
patch_audio_request_cost.py: scope the per-request charge to the audio call
types (transcription/atranscription/speech/aspeech) so this model's chat
calls bill per token and are not double-billed; extend the diagnostic
name-gate to 'voxtral'.
Measured on the live catalog + sidecar 2026-11-06 (see issue #48 follow-up).
A member with API-spend history for tinfoil/nomic-embed-text reported the
model 'missing'. It was never removed: it has been admin-team scoped
(model_info.team_id) since it was added 2026-10-07 for the co-op's own
docs-RAG, and team-scoped models are hidden from every /v1/models listing
by design — the member's dashboard row was their own refused call. Tinfoil
still serves nomic-embed-text upstream; nothing to restore.
What WAS missing is a member-callable embedding model. GreenPT serves
qwen3-embedding-8b (id verbatim, type EMBEDDINGS): $0.25/1M input from
GreenPT's own /v1/pricing, no output charge, 32K context. Added as a
regular model_list entry (no team_id) so any member key can call it via
/v1/embeddings; the portal filters mode:embedding out of the chat picker.
max_input_tokens declared from the provider's contextWindowTokens.
Additive change only: every pre-existing model_info byte-identical,
fallbacks and pass-through untouched; boot-proved on a spare port in the
container before deploy.
Wire-verified on the pinned v1.103.2 (2026-11-05): NO_DOCS/NO_REDOC/
NO_OPENAPI do disable /docs, /redoc and /openapi.json (live 404s), but
DISABLE_ADMIN_UI only disables the UI's SSO login-redirect routes in this
version — the static /ui/ bundle is mounted unconditionally and still
serves (login stays master-key-gated). README 'Admin access' and the
start.sh comment now say exactly that, with the build-patch path if the
bundle itself should ever be removed. There is no env/flag for it on
this version, so the README is corrected instead (M4).
CORS reality recorded: LITELLM_CORS_ORIGINS is set at the app level to *
by co-op decision (co-op/support#38); start.sh's chat-origin fallback
applies only if the app env omits it. PublicAI (removed 2026-10-16,
replaced by Regolo) dropped from the provider lists; chat is LibreChat,
not Open WebUI. The embedded first-boot fallback config cannot be served
(overwritten by the same boot's image sync) — noted inline.
Manifest contactEmail: botbot@hermes -> info@inference.coop (L6).
The pass-through row for /v1/systemone carried the correct spend but
prompt_tokens/completion_tokens/total_tokens were all 0: the generic
pass-through success handler hands the spend writer a
StandardPassThroughResponseObject with no usage, and the generic branch
builds no standard_logging_object usage, so anything summing tokens for
the route under-reported.
patch_passthrough_token_cost.py now also sets combined_usage_object (a
litellm.Usage carrying prompt_tokens=input_tokens, completion_tokens=0,
total_tokens=input_tokens) on the logging object -- the same override the
streaming handler uses for recovered partial usage, which the spend
writer reads before the response object. Spend is unchanged.
Defect 2 (a second zero-spend row with call_type=/v1/systemone) is NOT
duplication: it is upstream LiteLLM's failure row for a rejected
(missing/invalid key) request, written by
ProxyLogging._handle_logging_proxy_only_error on the pristine image. One
authenticated call produces exactly one priced row. Documented in the
README; no code change.