litellm/tests/integration/cost_calculation
devin-ai-integration[bot] 68c0a972a7
fix(realtime): skip guardrail VAD session.update injection for transcription sessions (#44843)
* fix(realtime): skip guardrail VAD session.update injection for transcription sessions

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(realtime): flag transcription sessions from the route intent and backend events only

A client session.update declaring session.type transcription on a voice
session no longer sets the transcription flag, so it cannot switch off the
guardrail's create_response gate or skip the transcript guardrail

* fix(realtime): flag transcription sessions from provider-transformed session events

* test(integration): cover transcription sessions skipping the VAD auto-response injection

Adds the realtime transcript guardrail audit cells: transcription sessions on all three
realtime routes, the OpenAI SDK, the beta protocol, the whisper default deployment, the Azure
GA path over a TLS scripted upstream, and Meta Muse push-to-talk sessions keep the client's
session.update verbatim and get their transcript, while voice sessions keep the injected
create_response gate and a client-declared transcription type no longer bypasses it. Sad,
edge, and chaos cells cover malformed session fields, duplicate and older backend session
events, unauthenticated upgrades, repeated sessions, an upstream outage under open sessions,
and a worker kill with a proxy restart.

The scripted upstream now answers session.update the way the vendor does (session.updated,
or the missing turn_detection.type and session-type errors), records every websocket frame,
serves the Azure and Muse realtime paths, and can run over TLS from an owned upstream.

---------

Co-authored-by: gabriele <gabriele@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-06 22:42:00 -07:00
..
assertions.py test(integration): tighten batch and realtime cost assertions 2026-09-20 01:29:46 +00:00
conftest.py test(integration): wait for the batch retrieval row and drop the failed-only output file 2026-09-20 01:46:23 +00:00
cost_tracking_case.py fix(realtime): skip guardrail VAD session.update injection for transcription sessions (#44843) 2026-10-06 22:42:00 -07:00
cost_tracking_cases.json fix(cost): price batch image output tokens at the batch image rate (#44897) 2026-10-06 22:18:28 +00:00
test_batch_realtime_cost.py test(integration): wait for the batch retrieval row and drop the failed-only output file 2026-09-20 01:46:23 +00:00
test_cost_tracking.py fix(caching): key response cache by router model group in litellm_metadata (#44542) 2026-10-05 17:06:21 +00:00