6 views
-/https://github.com/berriai/litellm/issues/31087
GitHub ยท issue

#31087 Realtime WebSocket cost tracking returns $0 for gpt-realtime-mini-2025-12-15 and gemini-live-2.5-flash-native-audio โ€” missing model_cost entries + base_model/custom_pricing ignored in realtime path

  • State: open
  • Author: @jguokion
  • Labels: llm translation

## Summary

Realtime WebSocket calls (`_arealtime`) always report \$0 cost for two models because the model names sent in the `session.created` event are not in `model_prices_and_context_window.json`, and the realtime cost path does not fall back to `base_model` or custom pricing fields from config.

## Affected models

| Model | `session.created` model name | Key tried in `model_cost` | Present? | |---|---|---|---| | `azure/gpt-realtime-mini` (v2025-12-15 deployment) | `gpt-realtime-mini-2025-12-15` | `azure/gpt-realtime-mini-2025-12-15` | โŒ missing | | `vertex_ai/gemini-live-2.5-flash-native-audio` | `gemini-live-2.5-flash-native-audio` | `vertex_ai/gemini-live-2.5-flash-native-audio` | โŒ missing | | `azure/gpt-realtime` (v2025-08-28 deployment) | `gpt-realtime-2025-08-28` | `azure/gpt-realtime-2025-08-28` | โœ… works |

Note: `azure/gpt-realtime-mini-2025-10-06` **is** present, but Azure's current deployment returns version `2025-12-15` in `session.created`.

## Root cause

`handle_realtime_stream_cost_calculation()` (`cost_calculator.py`) only does direct `model_cost` dictionary lookups. It does **not** use: - `base_model` from model_info (the standard workaround for Azure model โ€ฆ

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 ยท 31d17h59m59s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #2860
The left issue is harder because it spans realtime streaming cost-calculation logic, provider-specific model resolution, pricing configuration fallbacks, and regression coverage across multiple integrations. The right issue is comparatively localized to role-selection logic and its associated permission-ordering tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search