litellm: put Tinfoil's per-request audio prices in the shared cost map (#5)

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.
This commit is contained in:
inference-admin committed 2026-11-17 08:32:56 +00:00
1 parent d96df6fd5a
commit b81177c3ad
2 files changed
+71

No files matched your search

+7
View File
@@ -59,6 +59,13 @@ RUN python3 /app/code/patch_audio_request_cost.py
COPY patch_audio_router_pricing.py /app/code/patch_audio_router_pricing.py
RUN python3 /app/code/patch_audio_router_pricing.py
# Audio per-request prices must live in the SHARED cost map, which is built from
# model_prices_and_context_window.json — the per-request helper reads that map, not
# model_info, so a router-only patch left every speech call at $0 (issue #5).
# This patch fails the build rather than warning.
COPY patch_audio_cost_map.py /app/code/patch_audio_cost_map.py
RUN python3 /app/code/patch_audio_cost_map.py
# SECURITY (2026-10-27, member-disclosure finding 4): LiteLLM forwards every
# provider response header to callers as `llm_provider-*`, which leaked the
# co-op's remaining provider balance (x-credits-remaining) to any member API key.