litellm: register audio per-request prices at interpreter startup (#5)
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.
This commit is contained in:
1 parent
f66bedfb55
commit
2483715ef3
2 files changed
+40
No files matched your search
@@ -66,6 +66,11 @@ RUN python3 /app/code/patch_audio_router_pricing.py
|
||||
COPY patch_audio_cost_map.py /app/code/patch_audio_cost_map.py
|
||||
RUN python3 /app/code/patch_audio_cost_map.py
|
||||
|
||||
# Runtime registration: the build-time file edit above did not reach the deployed
|
||||
# gateway's model_cost map (issue #5), so register the entries in-process instead.
|
||||
# sitecustomize is imported before any application code.
|
||||
COPY sitecustomize.py /app/.venv/lib/python3.13/site-packages/sitecustomize.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.
|
||||
|
||||
Reference in new issue
Block a user