#29138 [Bug]: Anthropic input_audio base64 leaks into Gemini text tokens causing inflated input token counts
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
**Description** When using LiteLLM to proxy requests from Anthropic format to Gemini Flash (via Google AI Studio), we are intermittently seeing a massive spike in input text tokens. The base64-encoded audio string from the input_audio block appears to be leaking into the text content of the request sent to Gemini, causing it to be tokenized as text in addition to being correctly processed as audio.
**What happened?** We pass audio as inline base64 in the Anthropic input_audio block. LiteLLM translates this to Gemini's native format. Intermittently (~25% of calls on peak days), the translation fails and the raw base64 string leaks into the text content of the Gemini request. Gemini then charges both audio tokens AND text tokens for the same audio data.
Expected text tokens per call: ~1,750 (system prompt only) Observed text tokens on spiked calls: ~8,500–10,000 Spurious extra tokens per call: ~6,800–8,500 Output quality is NOT affected — extraction results remain accurate
### Steps to Reproduce
1. Use LiteLLM v1.84.0 with a Gemini Flash mode…