Skip to content

fix(bridges): refuse audio output on Responses, Messages and Completions before the provider call - #49960

Merged
mateo-berri merged 12 commits into
BerriAI:mainfrom
norkelbyte:litellm_fix_gemini_audio_bridges
Nov 23, 2026
Merged

mateo-berri merged 12 commits into
BerriAI:mainfrom
norkelbyte:litellm_fix_gemini_audio_bridges

Conversation

@norkelbyte

@norkelbyte norkelbyte commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

Gemini TTS models only answer with audio, and /v1/responses, /v1/messages and /v1/completions have nowhere to put it, so callers got an empty 200 and still paid for the audio. Those endpoints now return a 400 pointing to /v1/chat/completions before anything is sent to the provider. A request that asks for audio on them through audio or modalities gets a 400 too, unless drop_params is on, in which case the audio part is dropped

Details

TLDR

Problem this solves:

  • Gemini TTS on the three bridged endpoints returns an empty 200
  • The audio tokens are still billed and logged as a success
  • gpt-audio requests asking for audio there do the same

How it solves it:

  • The three endpoints check for audio output before calling the provider
  • Gemini TTS on Gemini or Vertex AI gets a 400
  • An audio request gets a 400, or loses its audio under drop_params

Intentional product change: a text model asked for audio on these endpoints now answers 400 unless drop_params is on

User Flow

Before: a developer who calls a Gemini TTS model through /v1/responses gets an empty answer and still pays for it

  1. They send POST https://litellm-domain/v1/responses with "model": "gemini-tts" and "audio": {"voice": "Kore", "format": "pcm16"}, or the same through /v1/messages or /v1/completions
  2. They get 200 with "output": [] ("content": [] on /v1/messages, "text": null on /v1/completions)
  3. GET https://litellm-domain/spend/logs/v2 shows the audio tokens billed as a success

After: the same request is refused before it reaches Gemini, so nothing is billed

  1. They send the same POST https://litellm-domain/v1/responses
  2. They get 400 gemini/gemini-3.8-flash-tts returns audio, which /v1/responses cannot carry. Call /v1/chat/completions to get the audio.
  3. GET https://litellm-domain/spend/logs/v2 shows the call as a failure with 0 spend

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Last updated: 5620c61, which merges main c4b915b into this PR. QA ran again on both, before on c4b915b and after on 5620c61

Both legs ran the same client against a live 2-worker proxy with its own Postgres. Every call hit Gemini, Vertex or Azure

Case Before After
Gemini TTS, chat completions 200, audio 200, audio
Gemini TTS, three bridges 200 empty, billed 400, $0
Lyria, all four 200, lyrics 200, lyrics
Gemini Flash asking for audio, three bridges 200, text 400, $0
Gemini Flash + drop_params, all four 200, text 200, text
gpt-audio, /v1/messages and /v1/completions 200 empty, billed 400, $0
gpt-audio, /v1/responses Azure 400 Azure 400
gpt-audio + drop_params, messages and completions 200 empty, billed Azure 400, $0
Vertex AI TTS, three bridges Vertex 400 after the call 400 before the call
Prompt template with audio, /v1/responses 200, audio asked upstream 400, $0
Same + drop_params 200, audio asked upstream 200, text
How to run it

Run from the checked-out commit's root with GEMINI_API_KEY, AZURE_LIT6549_AUDIO_QA_API_BASE, AZURE_LIT6549_AUDIO_QA_API_KEY, VERTEXAI_PROJECT, GOOGLE_APPLICATION_CREDENTIALS, LITELLM_MASTER_KEY and DATABASE_URL in .env

Redis and --reload are left out because the check keeps no state between requests and each leg has to stay on its commit. Each proxy logged two worker processes, 1644027 and 1644028 before, 1644034 and 1644035 after

python litellm/proxy/proxy_cli.py --config $CONFIG --port $PORT --num_workers 2 --detailed_debug

$CONFIG is the file below, with no drop_params

Config

litellm-qa-gpt-audio-mini is an Azure gpt-audio-mini 2025-10-06 deployment. The run also pointed the Gemini deployments' api_base at a recording proxy that forwards each request to Gemini unchanged

model_list:
  - model_name: gemini-flash
    litellm_params:
      model: gemini/gemini-3.8-flash
      api_key: os.environ/GEMINI_API_KEY
  - model_name: gemini-tts
    litellm_params:
      model: gemini/gemini-3.8-flash-tts
      api_key: os.environ/GEMINI_API_KEY
  - model_name: gemini-lyria
    litellm_params:
      model: gemini/lyria-3.5
      api_key: os.environ/GEMINI_API_KEY
  - model_name: azure-gpt-audio
    litellm_params:
      model: azure/litellm-qa-gpt-audio-mini
      api_base: os.environ/AZURE_LIT6549_AUDIO_QA_API_BASE
      api_key: os.environ/AZURE_LIT6549_AUDIO_QA_API_KEY
      api_version: 2025-04-01-preview
    model_info:
      base_model: azure/gpt-audio-mini
  - model_name: vertex-tts
    litellm_params:
      model: vertex_ai/gemini-3.8-flash-tts
      vertex_project: os.environ/VERTEXAI_PROJECT
      vertex_location: global
prompts:
  - prompt_id: spoken-answer
    litellm_params:
      prompt_id: spoken-answer
      prompt_integration: dotprompt
      dotprompt_content: |
        ---
        modalities: ["text", "audio"]
        ---
        Answer in one cheerful sentence.
router_settings:
  disable_cooldowns: true
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

With PROXY and LITELLM_MASTER_KEY exported, the client sends one prompt to all four endpoints through the official SDKs. gemini-tts sends audio, gemini-flash sends modalities, gemini-lyria sends neither, azure-gpt-audio sends both, and drop adds drop_params: true

clients.py
import json
import os
import sys

import anthropic
import openai

BASE = os.environ["PROXY"]
KEY = os.environ["LITELLM_MASTER_KEY"]
MODEL = sys.argv[1] if len(sys.argv) > 1 else "gemini-tts"
AUDIO = {"voice": "Kore", "format": "pcm16"} if MODEL == "gemini-tts" else {"voice": "alloy", "format": "pcm16"}
DROP = {"drop_params": True} if sys.argv[2:] == ["drop"] else {}
EXTRA = {
    **(
        {"audio": AUDIO}
        if MODEL == "gemini-tts"
        else {"modalities": ["text", "audio"]}
        if MODEL == "gemini-flash"
        else {}
        if MODEL == "gemini-lyria"
        else {"audio": AUDIO, "modalities": ["text", "audio"]}
    ),
    **DROP,
}
PROMPT = "Say cheerfully: have a wonderful day"

oai = openai.OpenAI(base_url=f"{BASE}/v1", api_key=KEY, max_retries=0)
ant = anthropic.Anthropic(base_url=BASE, api_key=KEY, max_retries=0)


def show(label, raw, body):
    print(f"=== {label}")
    print(f"HTTP {raw.status_code} call_id={raw.headers.get('x-litellm-call-id')}")
    print(f"x-litellm-response-cost={raw.headers.get('x-litellm-response-cost')}")
    print(body)


def run(label, fn):
    try:
        fn()
    except (openai.APIStatusError, anthropic.APIStatusError) as e:
        print(f"=== {label}")
        print(f"HTTP {e.status_code} call_id={e.response.headers.get('x-litellm-call-id')}")
        print(e.response.text[:600])


def chat():
    raw = oai.chat.completions.with_raw_response.create(
        model=MODEL, messages=[{"role": "user", "content": PROMPT}], extra_body=EXTRA
    )
    msg = raw.parse().choices[0].message
    audio = msg.audio
    show(
        "/v1/chat/completions (control)",
        raw,
        f"content={msg.content!r} audio_bytes_b64_len={len(audio.data) if audio else None}",
    )


def responses():
    raw = oai.responses.with_raw_response.create(model=MODEL, input=PROMPT, extra_body=EXTRA)
    parsed = raw.parse()
    show(
        "/v1/responses",
        raw,
        f"status={parsed.status} output={json.dumps([o.model_dump() for o in parsed.output])[:300]} usage={parsed.usage}",
    )


def messages():
    raw = ant.messages.with_raw_response.create(
        model=MODEL, max_tokens=8192, messages=[{"role": "user", "content": PROMPT}], extra_body=EXTRA
    )
    parsed = raw.parse()
    show(
        "/v1/messages",
        raw,
        f"stop_reason={parsed.stop_reason} content={[c.model_dump() for c in parsed.content]} usage={parsed.usage}",
    )


def completions():
    raw = oai.completions.with_raw_response.create(model=MODEL, prompt=PROMPT, max_tokens=8192, extra_body=EXTRA)
    parsed = raw.parse()
    show(
        "/v1/completions",
        raw,
        f"choices={[(c.text, c.finish_reason) for c in parsed.choices]} usage={parsed.usage}",
    )


for name, fn in (
    ("/v1/chat/completions (control)", chat),
    ("/v1/responses", responses),
    ("/v1/messages", messages),
    ("/v1/completions", completions),
):
    run(name, fn)

Before (c4b915b)

Gemini TTS on each endpoint

The three bridges answer 200 with nothing in them and bill the audio
$ python -I -c "import openai, anthropic; print(\"openai\", openai.__version__, \"anthropic\", anthropic.__version__)"
openai 2.33.0 anthropic 0.84.0

$ python -I clients.py gemini-tts
=== /v1/chat/completions (control)
HTTP 200 call_id=ac065e54-2b6f-414b-aa74-9d57ac80849a
x-litellm-response-cost=0.00076
content=None audio_bytes_b64_len=225320
=== /v1/responses
HTTP 200 call_id=844e4b7b-da5a-452a-9f6c-8ea5732be330
x-litellm-response-cost=0.000661
status=completed output=[] usage=ResponseUsage(input_tokens=8, input_tokens_details=InputTokensDetails(cached_tokens=0, audio_tokens=None, cached_tokens_details=None, image_tokens=None, text_tokens=8, video_tokens=None), output_tokens=73, output_tokens_details=OutputTokensDetails(reasoning_tokens=0, audio_tokens=73, text_tokens=0), total_tokens=81, cost=None)
=== /v1/messages
HTTP 200 call_id=d6e3a32c-11a3-4fdd-b3f7-e8738777fd25
x-litellm-response-cost=0.000724
stop_reason=end_turn content=[] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=8, output_tokens=80, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=3d9798a9-9e40-45eb-8570-1cb2cb6fdb50
x-litellm-response-cost=0.000778
choices=[(None, 'stop')] usage=CompletionUsage(completion_tokens=86, prompt_tokens=8, total_tokens=94, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=86, reasoning_tokens=None, rejected_prediction_tokens=None, text_tokens=0, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=None, text_tokens=8, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), cache_read_input_tokens=None, cache_creation_input_tokens=None)

Lyria and Gemini Flash

Lyria answers lyrics, Gemini Flash answers text with or without drop_params
$ python -I clients.py gemini-lyria
=== /v1/chat/completions (control)
HTTP 200 call_id=53362e91-1bed-4275-adcc-3fa827904e66
x-litellm-response-cost=0.0
content="[[A0]]\n[:] (Ooh, yeah, a wonderful day)\n[:] (It's gonna be a good one!)\n[[B1]]\n[:] Open up your eyes to the morning light\n[:] The sky is looking big and the world is bright\n[:] Leave your worries all behind at the door\n[:] We're gonna make today something to adore!\n[:] Every little step is a brand new start\n[:] Feel the happy rhythm beating in your heart\n[[C2]]\n[:] So let the sunshine in, let it fill the room\n[:] Everything is fresh and about to bloom\n[:] Take a big breath in, let a smile just play\n[:] Because you know exactly what I'm gonna say!\n[[D3]]\n[:] HAVE A WONDERFUL DAY, let the music play!\n[:] Chasing all the clouds and the blue skies away!\n[:] HAVE A WONDERFUL DAY, smile along with me!\n[:] This is the very best place that we could ever be!\n[:] (Yeah, have a wonderful day!)\n[:] (Have a wonderful day!)\n[[B4]]\n[:] See the people passing, maybe say hello\n[:] Let that positive energy just start to flow\n[:] It's the little moments that can make us whole\n[:] Put a little extra sunshine in your soul!\n[:] Feel the wind is blowing, singing just for you\n[:] There is nothing today that we cannot do\n[[D5]]\n[:] HAVE A WONDERFUL DAY, let the music play!\n[:] Chasing all the clouds and the blue skies away!\n[:] HAVE A WONDERFUL DAY, smile along with me!\n[:] This is the very best place that we could ever be!\n[:] (Yeah, have a wonderful day!)\n[:] (Oh, have a wonderful day!)\n[[E6]]\n[:] And even if a little rain begins to fall\n[:] We will stand up smiling, we will stand up tall\n[:] Because a joyful heart is the greatest light of all\n[:] Yeah, we're gonna have a ball!\n[[D7]]\n[:] HAVE A WONDERFUL DAY, let the music play!\n[:] Chasing all the clouds and the blue skies away!\n[:] HAVE A WONDERFUL DAY, smile along with me!\n[:] This is the very best place that we could ever be!\n[:] (Oh, oh, have a wonderful day!)\n[:] (HAVE A WONDERFUL DAY!)\n[[F8]]\n[:] Go on and make it great, don't you wait...\n[:] (SAY CHEERFULLY: HAVE A WONDERFUL DAY!)" audio_bytes_b64_len=5786488
=== /v1/responses
HTTP 200 call_id=d4716692-cf27-4978-85af-619c9efb1f52
x-litellm-response-cost=0.0
status=completed output=[{"id": "msg_a9409ed9-a992-4464-ae96-7a63d7c88010", "content": [{"annotations": [], "text": "[[A0]]\n[[B1]]\n[:] Good morning to you, the sun is high and bright\n[:] Everything is beautiful in this morning light\n[:] Leave your cares behind, let's start a brand new page\n[:] The world is your oyster usage=ResponseUsage(input_tokens=8, input_tokens_details=InputTokensDetails(cached_tokens=0, audio_tokens=None, cached_tokens_details=None, image_tokens=None, text_tokens=8, video_tokens=None), output_tokens=1259, output_tokens_details=OutputTokensDetails(reasoning_tokens=0, audio_tokens=None, text_tokens=1259), total_tokens=1267, cost=None)
=== /v1/messages
HTTP 200 call_id=d146c5ab-939f-45db-8b46-e04f11a011e7
x-litellm-response-cost=0.0
stop_reason=end_turn content=[{'citations': None, 'text': "[[A0]]\n[[B1]]\n[:] Sun is shining, the sky is so blue\n[:] Everything's fresh and it's all brand new\n[:] Put on your smile, let the world see your light\n[:] Gonna make sure everything is alright\n[[C2]]\n[:] So step outside, let the feeling take hold\n[:] Story of joy just waiting to be told\n[:] Say cheerfully: Have a wonderful day!\n[:] Yes, have a wonderful day!\n[[B3]]\n[:] Feel the breeze and let go of your care\n[:] There's so much magic and love in the air\n[:] Each little moment is a brand new start\n[:] Keep all that sunshine right inside your heart\n[[C4]]\n[:] So step outside, let the feeling take hold\n[:] Story of joy just waiting to be told\n[:] Say cheerfully: Have a wonderful day!\n[:] Yes, have a wonderful day!\n[[D5]]\n[[C6]]\n[:] So step outside, let the feeling take hold\n[:] Story of joy just waiting to be told\n[:] Say cheerfully: Have a wonderful day!\n[:] Yes, have a wonderful day!\n[[E7]]\n[:] Say cheerfully: Have a wonderful day!\n[:] (Yeah, have a great one!)", 'type': 'text'}] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=8, output_tokens=2545, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=ce131769-69fd-4a32-89a0-fc316d9557ed
x-litellm-response-cost=0.0
choices=[("[[A0]]\n[0.0:] (Ooh-yeah, here we go!)\n[2.0:] (La la la, wonderful day!)\n[4.0:] Step out and let the sunshine in!\n[8.0:] A brand new morning is about to begin!\n[12.0:] Shake off the blues, let the good times roll!\n[[B1]]\n[16.0:] There's a beautiful fire inside your soul!\n[20.0:] HAVE A WONDERFUL DAY, LET YOUR SMILE LIGHT THE WAY!\n[24.0:] EVERYTHING'S GONNA BE ALRIGHT, JUST BELIEVE AND IT'S OKAY!\n[28.0:] SOAK UP THE JOY, LET IT RADIATE TRUE!\n[[C2]]\n[32.0:] SAY IT WITH ME, SAY IT CHEERFULLY TO YOU!\n[36.0:] Feel the music moving, let it take control!\n[40.0:] There's a beautiful melody deep in your soul!\n[44.0:] Every little moment is a chance to start anew!\n[48.0:] The whole wide world is just waiting for you!\n[52.0:] HAVE A WONDERFUL DAY, LET YOUR SMILE LIGHT THE WAY!\n[56.0:] EVERYTHING'S GONNA BE ALRIGHT, JUST BELIEVE AND IT'S OKAY!\n[60.0:] SOAK UP THE JOY, LET IT RADIATE TRUE!\n[[B3]]\n[64.0:] SAY IT WITH ME, SAY IT CHEERFULLY TO YOU!\n[[C4]]\n[[D5]]\n[[C6]]\n[140.0:] HAVE A WONDERFUL DAY, LET YOUR SMILE LIGHT THE WAY!\n[144.0:] EVERYTHING'S GONNA BE ALRIGHT, JUST BELIEVE AND IT'S OKAY!\n[148.0:] SOAK UP THE JOY, LET IT RADIATE TRUE!\n[152.0:] SAY IT WITH ME, SAY IT CHEERFULLY TO YOU!\n[[E7]]\n[160.0:] (Oh yeah, make it a good one!)\n[164.0:] (SMILE BRIGHT!)\n[168.0:] (HAVE A WONDERFUL DAY!)\n[172.0:] (EVERYBODY, EVERYWHERE!)\n[176.0:] (LA LA LA, YES INDEED!)", 'stop')] usage=CompletionUsage(completion_tokens=9345, prompt_tokens=8, total_tokens=9353, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=None, rejected_prediction_tokens=None, text_tokens=9345, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=None, text_tokens=8, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), cache_read_input_tokens=None, cache_creation_input_tokens=None)

$ python -I clients.py gemini-flash
=== /v1/chat/completions (control)
HTTP 200 call_id=a0993432-22e0-4aae-8657-0d5627e8d704
x-litellm-response-cost=0.00096975
content='Have a wonderful day! ☀️✨ Wishing you lots of smiles and good vibes today! 😊🎉' audio_bytes_b64_len=None
=== /v1/responses
HTTP 200 call_id=d4c2a0f7-7cb7-4775-8675-af004a719c9a
x-litellm-response-cost=0.00062475
status=completed output=[{"id": "msg_a8cae10a-5bcb-441a-83ab-d035c06b1ab6", "content": [{"annotations": [], "text": "Have a wonderful day! \ud83d\ude0a\u2728\u2600\ufe0f", "type": "output_text", "logprobs": null}], "role": "assistant", "status": "completed", "type": "message", "phase": null}] usage=ResponseUsage(input_tokens=8, input_tokens_details=InputTokensDetails(cached_tokens=0, audio_tokens=None, cached_tokens_details=None, image_tokens=None, text_tokens=8, video_tokens=None), output_tokens=165, output_tokens_details=OutputTokensDetails(reasoning_tokens=157, audio_tokens=None, text_tokens=8), total_tokens=173, cost=None)
=== /v1/messages
HTTP 200 call_id=416fc22e-b320-4cf4-8f3d-76b71f038b10
x-litellm-response-cost=0.0006622500000000001
stop_reason=end_turn content=[{'citations': None, 'text': 'Have an absolutely wonderful day! ☀️✨😊', 'type': 'text'}] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=8, output_tokens=175, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=516e5dd0-336e-48ee-9801-d986db87d97d
x-litellm-response-cost=0.000546
choices=[('Have an absolutely wonderful and fantastic day! ☀️✨😊', 'stop')] usage=CompletionUsage(completion_tokens=144, prompt_tokens=8, total_tokens=152, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=132, rejected_prediction_tokens=None, text_tokens=12, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=None, text_tokens=8, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), cache_read_input_tokens=None, cache_creation_input_tokens=None)

$ python -I clients.py gemini-flash drop
=== /v1/chat/completions (control)
HTTP 200 call_id=467371df-f9a1-43e8-af9d-b4a5ade7acfb
x-litellm-response-cost=0.00087975
content='Have a wonderful day! 😊☀️✨' audio_bytes_b64_len=None
=== /v1/responses
HTTP 200 call_id=f203ac85-6011-42b4-831a-0c37adfa7788
x-litellm-response-cost=0.0008160000000000001
status=completed output=[{"id": "msg_03bea81d-6f69-4447-a9ce-96ec8adb3729", "content": [{"annotations": [], "text": "Have a wonderful, fantastic day! \u2600\ufe0f Hope it's filled with lots of joy and big smiles! \ud83d\ude0a\u2728", "type": "output_text", "logprobs": null}], "role": "assistant", "status": "completed", "ty usage=ResponseUsage(input_tokens=8, input_tokens_details=InputTokensDetails(cached_tokens=0, audio_tokens=None, cached_tokens_details=None, image_tokens=None, text_tokens=8, video_tokens=None), output_tokens=216, output_tokens_details=OutputTokensDetails(reasoning_tokens=192, audio_tokens=None, text_tokens=24), total_tokens=224, cost=None)
=== /v1/messages
HTTP 200 call_id=5e00ce0e-d853-4bee-a0e3-c7ddbe9a117c
x-litellm-response-cost=0.0009622500000000001
stop_reason=end_turn content=[{'citations': None, 'text': 'Have a wonderful day! 😄✨', 'type': 'text'}] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=8, output_tokens=255, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=5ae627d0-d1fa-4c89-85f7-d66693a712e8
x-litellm-response-cost=0.000576
choices=[('Have a wonderful day! 😊☀️✨', 'stop')] usage=CompletionUsage(completion_tokens=152, prompt_tokens=8, total_tokens=160, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=144, rejected_prediction_tokens=None, text_tokens=8, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=None, text_tokens=8, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), cache_read_input_tokens=None, cache_creation_input_tokens=None)

gpt-audio asking for audio

/v1/messages and /v1/completions answer 200 with nothing in them, with or without drop_params
$ python -I clients.py azure-gpt-audio
=== /v1/chat/completions (control)
HTTP 200 call_id=439e5916-876f-491f-a68a-7f5e284b95ea
x-litellm-response-cost=0.0005954
content=None audio_bytes_b64_len=89600
=== /v1/responses
HTTP 400 call_id=48a4f64d-e5e9-4e5e-a234-24536a6e6d65
{"error":{"message":"litellm.BadRequestError: AzureException - {\n  \"error\": {\n    \"message\": \"The requested operation is unsupported.\"\n  }\n}\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
=== /v1/messages
HTTP 200 call_id=69e471e3-8822-4add-8b53-834d52b91521
x-litellm-response-cost=0.0010754
stop_reason=end_turn content=[] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=15, output_tokens=63, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=8ed8ebc7-a102-454f-afbc-b65ca10e2b3d
x-litellm-response-cost=0.0010802
choices=[(None, 'stop')] usage=CompletionUsage(completion_tokens=65, prompt_tokens=15, total_tokens=80, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=52, reasoning_tokens=0, rejected_prediction_tokens=0, text_tokens=13, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0, text_tokens=15, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), latency_checkpoint={'engine_tbt_ms': 4, 'engine_ttft_ms': 18, 'engine_ttlt_ms': 298, 'pre_inference_ms': 87, 'service_tbt_ms': 6, 'service_ttft_ms': 693, 'service_ttlt_ms': 1065, 'user_visible_ttft_ms': 606})

$ python -I clients.py azure-gpt-audio drop
=== /v1/chat/completions (control)
HTTP 200 call_id=daf0c3e7-3283-4b57-b28c-131bf8122ebd
x-litellm-response-cost=0.0009754000000000001
content=None audio_bytes_b64_len=150400
=== /v1/responses
HTTP 400 call_id=7152c39f-9a97-41c8-ae12-02db9f05fc1c
{"error":{"message":"litellm.BadRequestError: AzureException - {\n  \"error\": {\n    \"message\": \"The requested operation is unsupported.\"\n  }\n}\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
=== /v1/messages
HTTP 200 call_id=6e8a4058-dcf0-4fa6-a2ff-5e1aba500e25
x-litellm-response-cost=0.0008554000000000001
stop_reason=end_turn content=[] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=15, output_tokens=52, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=da853f72-3a43-4665-99a2-2f4cc845dc57
x-litellm-response-cost=0.0007402000000000001
choices=[(None, 'stop')] usage=CompletionUsage(completion_tokens=48, prompt_tokens=15, total_tokens=63, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=35, reasoning_tokens=0, rejected_prediction_tokens=0, text_tokens=13, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0, text_tokens=15, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), latency_checkpoint={'engine_tbt_ms': 4, 'engine_ttft_ms': 21, 'engine_ttlt_ms': 229, 'pre_inference_ms': 96, 'service_tbt_ms': 8, 'service_ttft_ms': 751, 'service_ttlt_ms': 1117, 'user_visible_ttft_ms': 656})

Prompt template asking for audio

Gemini gets responseModalities [TEXT, AUDIO] with or without drop_params

The recording proxy saw two Gemini requests, both with responseModalities: ["TEXT", "AUDIO"]. Under each command is its status line with LiteLLM's call id and cost headers

$ curl -sS $PROXY/v1/responses -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"gemini-flash","prompt_id":"spoken-answer","input":"Say cheerfully: have a wonderful day"}' | jq -c '{status, error: .error.message, text: [.output[]?.content[]?.text]}'
HTTP/1.1 200 OK call_id=a15fd34c-f963-4af5-bb92-1e9449674a41 cost=0.0010830000000000002
{"status":"completed","error":null,"text":["Have a wonderful day filled with boundless joy, bright sunshine, and great big smiles!"]}

$ curl -sS $PROXY/v1/responses -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"gemini-flash","prompt_id":"spoken-answer","input":"Say cheerfully: have a wonderful day","drop_params":true}' | jq -c '{status, error: .error.message, text: [.output[]?.content[]?.text]}'
HTTP/1.1 200 OK call_id=58bc9ddc-1614-4b60-878c-ce477f327c93 cost=0.0010605000000000002
{"status":"completed","error":null,"text":["Wishing you tons of sunshine and big smiles—have a wonderful day!"]}

Spend logs

Every bridged Gemini TTS and gpt-audio call is a billed success
$ curl -s "$PROXY/spend/logs/v2?start_date=2026-11-18%2000:06:47&end_date=2026-11-18%2000:11:17&page_size=50" -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq -r '.data | sort_by(.startTime)[] | select(.model | startswith("vertex") | not) | [.call_type, .model, .status, .spend, .completion_tokens] | @tsv'
acompletion	gemini/gemini-3.8-flash-tts	success	0.00076	84
aresponses	gemini/gemini-3.8-flash-tts	success	0.000661	73
anthropic_messages	gemini/gemini-3.8-flash-tts	success	0.000724	80
atext_completion	gemini/gemini-3.8-flash-tts	success	0.000778	86
acompletion	gemini/lyria-3.5	success	0.0	3278
aresponses	gemini/lyria-3.5	success	0.0	1259
anthropic_messages	gemini/lyria-3.5	success	0.0	2545
atext_completion	gemini/lyria-3.5	success	0.0	9345
acompletion	gemini/gemini-3.8-flash	success	0.00096975	257
aresponses	gemini/gemini-3.8-flash	success	0.00062475	165
anthropic_messages	gemini/gemini-3.8-flash	success	0.0006622500000000001	175
atext_completion	gemini/gemini-3.8-flash	success	0.000546	144
acompletion	gemini/gemini-3.8-flash	success	0.00087975	233
aresponses	gemini/gemini-3.8-flash	success	0.0008160000000000001	216
anthropic_messages	gemini/gemini-3.8-flash	success	0.0009622500000000001	255
atext_completion	gemini/gemini-3.8-flash	success	0.000576	152
acompletion	azure/litellm-qa-gpt-audio-mini	success	0.0005954	39
aresponses	azure/litellm-qa-gpt-audio-mini	failure	0.0	0
anthropic_messages	azure/litellm-qa-gpt-audio-mini	success	0.0010754	63
atext_completion	azure/litellm-qa-gpt-audio-mini	success	0.0010802	65
acompletion	azure/litellm-qa-gpt-audio-mini	success	0.0009754000000000001	58
aresponses	azure/litellm-qa-gpt-audio-mini	failure	0.0	0
anthropic_messages	azure/litellm-qa-gpt-audio-mini	success	0.0008554000000000001	52
atext_completion	azure/litellm-qa-gpt-audio-mini	success	0.0007402000000000001	48

Vertex AI TTS

Vertex rejects the request with its own 400 after the call, and chat completions returns audio

Ran with VERTEXAI_PROJECT and a service account key in GOOGLE_APPLICATION_CREDENTIALS

$ curl -sS http://127.0.0.1:28152/v1/chat/completions -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","messages":[{"role":"user","content":"Say cheerfully: have a wonderful day"}],"audio":{"voice":"Kore","format":"pcm16"},"modalities":["audio"]}'
HTTP/1.1 200 OK call_id=67acbbc9-ba4e-4659-8d4d-e262c3a44775 cost=0.0006785000000000001
{"id":"QO78ao2hGdnd6tkPzP6r6A4","created":1794960959,"model":"vertex-tts","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"role":"assistant","audio":{"id":"29becf77-da10-4874-b668-1552ff50b803","data":"UklGRpRQAgBXQVZFZm10IBAAAAABAAEAwF0AAIC7AAACABAAZGF0YYAyAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

$ curl -sS http://127.0.0.1:28152/v1/responses -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","input":"Say cheerfully: have a wonderful day","max_output_tokens":1024}'
HTTP/1.1 400 Bad Request call_id=d3acbf52-089c-4252-9379-593b8a08e56e cost=0
{"error":{"message":"litellm.BadRequestError: Vertex_aiException BadRequestError - {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Request contains an invalid argument.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n\n\nLiteLLM: model group 'vertex-tts' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}

$ curl -sS http://127.0.0.1:28152/v1/messages -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","max_tokens":1024,"messages":[{"role":"user","content":"Say cheerfully: have a wonderful day"}]}'
HTTP/1.1 400 Bad Request call_id=77821559-ff69-4fef-a2db-6f78f6c94137 cost=0
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: Vertex_aiException BadRequestError - {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Request contains an invalid argument.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n\n\nLiteLLM: model group 'vertex-tts' failed with the error above. No fallback was attempted."}}

$ curl -sS http://127.0.0.1:28152/v1/completions -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","prompt":"Say cheerfully: have a wonderful day","max_tokens":1024}'
HTTP/1.1 400 Bad Request call_id=a58625fa-062d-4d3b-9ca8-d73a2ead824f cost=
{"error":{"message":"litellm.BadRequestError: OpenAIException - {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Request contains an invalid argument.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n\n\nLiteLLM: model group 'vertex-tts' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}

After (5620c61)

Gemini TTS on each endpoint

The three bridges answer 400 before the call, and chat completions still returns audio
$ python -I -c "import openai, anthropic; print(\"openai\", openai.__version__, \"anthropic\", anthropic.__version__)"
openai 2.33.0 anthropic 0.84.0

$ python -I clients.py gemini-tts
=== /v1/chat/completions (control)
HTTP 200 call_id=6c8b7402-3a31-4f6f-9399-1f29b17a7c23
x-litellm-response-cost=0.000679
content=None audio_bytes_b64_len=202280
=== /v1/responses
HTTP 400 call_id=aa35f408-7f92-47d1-80a8-b925b7e780cc
{"error":{"message":"litellm.UnsupportedParamsError: gemini/gemini-3.8-flash-tts returns audio, which /v1/responses cannot carry. Call /v1/chat/completions to get the audio.\n\nLiteLLM: model group 'gemini-tts' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
=== /v1/messages
HTTP 400 call_id=994ca42f-94bb-4b79-b312-a8579e3d074d
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.UnsupportedParamsError: gemini/gemini-3.8-flash-tts returns audio, which /v1/messages cannot carry. Call /v1/chat/completions to get the audio.\n\nLiteLLM: model group 'gemini-tts' failed with the error above. No fallback was attempted."}}
=== /v1/completions
HTTP 400 call_id=abce518f-4793-411e-a5b4-030ca3b7721a
{"error":{"message":"litellm.UnsupportedParamsError: gemini/gemini-3.8-flash-tts returns audio, which /v1/completions cannot carry. Call /v1/chat/completions to get the audio.\n\nLiteLLM: model group 'gemini-tts' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}

Lyria and Gemini Flash

Lyria still answers lyrics, Gemini Flash asking for audio gets 400 unless drop_params is on
$ python -I clients.py gemini-lyria
=== /v1/chat/completions (control)
HTTP 200 call_id=79ded8fe-e071-41b3-8ce2-e5e7e204d7e7
x-litellm-response-cost=0.0
content="[[A0]]\n[[B1]]\n[:] The morning sun is shining through your window pane\n[:] Washing all your worries and the yesterday's rain\n[:] Step outside and feel the breeze against your skin\n[:] This is where the beautiful moments begin\n[[C2]]\n[:] Say cheerfully, oh let it out!\n[:] Have a wonderful day!\n[:] Sing it loud and clear, with no room for doubt!\n[:] Have a wonderful day!\n[:] Let the joy just take control, let it lift you high!\n[:] Have a wonderful day!\n[:] Paint your brightest smile right across the sky!\n[:] Have a wonderful day!\n[[B3]]\n[:] Find a reason to smile in the simplest of things\n[:] Listen to the beautiful song that the universe sings\n[:] Share a little kindness, let your inner light shine\n[:] Trust in yourself that you are doing just fine\n[[D4]]\n[:] (Oh, what a beautiful world we live in)\n[:] (Every moment's a gift to be given)\n[:] So open your heart and let the light in\n[:] Let your very best life now begin!\n[[C5]]\n[:] Say cheerfully, oh let it out!\n[:] Have a wonderful day!\n[:] Sing it loud and clear, with no room for doubt!\n[:] Have a wonderful day!\n[:] Let the joy just take control, let it lift you high!\n[:] Have a wonderful day!\n[:] Paint your brightest smile right across the sky!\n[:] Have a wonderful day!\n[[E6]]\n[:] (Have a wonderful day...)\n[:] Yeah, have a wonderful day!\n[:] Have a wonderful day." audio_bytes_b64_len=4125516
=== /v1/responses
HTTP 200 call_id=af86f848-f0a3-40c8-ae5a-4892b2c58209
x-litellm-response-cost=0.0
status=completed output=[{"id": "msg_ed7ceb57-d3bd-4c6b-acd8-7c83bf3ba12f", "content": [{"annotations": [], "text": "[[A0]]\n[:] HAVE A WONDERFUL DAY!\n[[B1]]\n[:] The sun is shining and the sky is blue\n[:] There's not a single thing that we can't do\n[:] So put a great big smile upon your face\n[:] Let's make this world  usage=ResponseUsage(input_tokens=8, input_tokens_details=InputTokensDetails(cached_tokens=0, audio_tokens=None, cached_tokens_details=None, image_tokens=None, text_tokens=8, video_tokens=None), output_tokens=1835, output_tokens_details=OutputTokensDetails(reasoning_tokens=0, audio_tokens=None, text_tokens=1835), total_tokens=1843, cost=None)
=== /v1/messages
HTTP 200 call_id=e99ec50d-e22a-4e63-9f09-ec0e62cc5908
x-litellm-response-cost=0.0
stop_reason=end_turn content=[{'citations': None, 'text': "[[A0]]\n[[B1]]\n[:] The sun is rising up so high and bright,\n[:] Washing away the darkness of the night.\n[:] A brand new day is waiting here for you,\n[:] With so many beautiful things to do.\n[:] So open up your heart and let it in,\n[:] This is where the magic will begin.\n[:] Put a big bright smile upon your face,\n[:] And find your own amazing, happy place.\n[[C2]]\n[:] Feel the magic in the air, oh so sweet,\n[:] A beautiful rhythm under your feet.\n[:] The world is waiting for your light to shine,\n[:] Everything is gonna be just fine.\n[[D3]]\n[:] Have a wonderful day, have a wonderful day!\n[:] Let all your worries just fade away!\n[:] Have a wonderful day, have a wonderful day!\n[:] Smile and laugh and come out to play!\n[:] It's a beautiful world, it's a beautiful life,\n[:] Leaving behind all the struggle and strife.\n[:] So have a wonderful day!\n[:] (Oh yeah, have a wonderful day!)\n[[B4]]\n[:] Listen to the birds and the songs that they sing,\n[:] Feel the joy and the happiness that they bring.\n[:] Every little moment is a gift and a grace,\n[:] To make this world a much brighter place.\n[:] So take a deep breath and just let it all go,\n[:] Let your inner light and your happiness show.\n[:] There's a whole lot of love just waiting for you,\n[:] In everything that you say and you do.\n[[E5]]\n[[D6]]\n[:] Have a wonderful day, have a wonderful day!\n[:] Let all your worries just fade away!\n[:] Have a wonderful day, have a wonderful day!\n[:] Smile and laugh and come out to play!\n[:] It's a beautiful world, it's a beautiful life,\n[:] Leaving behind all the struggle and strife.\n[:] So have a wonderful day!\n[:] (Yeah, you have a wonderful day!)\n[[F7]]\n[:] Have a wonderful day, have a wonderful day...\n[:] (Oh yeah, make it beautiful!)\n[:] Smile big, shine bright, let it show...\n[:] Have a wonderful day!", 'type': 'text'}] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=8, output_tokens=3204, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=279f5981-c6e0-476e-b7ce-a64410a94e20
x-litellm-response-cost=0.0
choices=[("[[A0]]\n[:] (Oh-oh-oh)\n[:] (Yeah, yeah!)\n[[B1]]\n[:] Have a wonderful day\n[:] Let the sunshine light your way\n[:] Have a wonderful day\n[:] Smile and everything's okay\n[[C2]]\n[[B3]]\n[:] Have a wonderful day\n[:] Let the sunshine light your way\n[:] Have a wonderful day\n[:] Smile and everything's okay", 'stop')] usage=CompletionUsage(completion_tokens=1149, prompt_tokens=8, total_tokens=1157, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=None, rejected_prediction_tokens=None, text_tokens=1149, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=None, text_tokens=8, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), cache_read_input_tokens=None, cache_creation_input_tokens=None)

$ python -I clients.py gemini-flash
=== /v1/chat/completions (control)
HTTP 200 call_id=cf9825a3-46de-4400-b31a-3fac431adcdc
x-litellm-response-cost=0.0007260000000000001
content='Have an absolutely wonderful day! 😊✨☀️' audio_bytes_b64_len=None
=== /v1/responses
HTTP 400 call_id=08c497e8-5d33-473f-aa74-f67457c71a2c
{"error":{"message":"litellm.UnsupportedParamsError: The request asks gemini/gemini-3.8-flash for audio through modalities, which /v1/responses cannot carry. Leave out modalities, or set drop_params: true to send the request without it. If gemini/gemini-3.8-flash can return audio, call /v1/chat/completions to get it.\n\nLiteLLM: model group 'gemini-flash' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
=== /v1/messages
HTTP 400 call_id=f3b29aa1-f3ce-43e8-aa57-9993b343ebad
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.UnsupportedParamsError: The request asks gemini/gemini-3.8-flash for audio through modalities, which /v1/messages cannot carry. Leave out modalities, or set drop_params: true to send the request without it. If gemini/gemini-3.8-flash can return audio, call /v1/chat/completions to get it.\n\nLiteLLM: model group 'gemini-flash' failed with the error above. No fallback was attempted."}}
=== /v1/completions
HTTP 400 call_id=f3e860db-186c-434d-931e-b52f5a70e0b8
{"error":{"message":"litellm.UnsupportedParamsError: The request asks gemini/gemini-3.8-flash for audio through modalities, which /v1/completions cannot carry. Leave out modalities, or set drop_params: true to send the request without it. If gemini/gemini-3.8-flash can return audio, call /v1/chat/completions to get it.\n\nLiteLLM: model group 'gemini-flash' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}

$ python -I clients.py gemini-flash drop
=== /v1/chat/completions (control)
HTTP 200 call_id=0965c853-17ee-4788-81ce-3b1a296cf04b
x-litellm-response-cost=0.0006810000000000001
content='Have a wonderful, fantastic day! ☀️😊✨' audio_bytes_b64_len=None
=== /v1/responses
HTTP 200 call_id=47faafd3-2095-44c4-bd85-89ed61586cae
x-litellm-response-cost=0.0007447500000000001
status=completed output=[{"id": "msg_8cf94d67-9a4b-40f4-a9b3-98dd2da1b5c1", "content": [{"annotations": [], "text": "Have a wonderful day! \u2600\ufe0f\ud83d\ude0a\u2728", "type": "output_text", "logprobs": null}], "role": "assistant", "status": "completed", "type": "message", "phase": null}] usage=ResponseUsage(input_tokens=8, input_tokens_details=InputTokensDetails(cached_tokens=0, audio_tokens=None, cached_tokens_details=None, image_tokens=None, text_tokens=8, video_tokens=None), output_tokens=197, output_tokens_details=OutputTokensDetails(reasoning_tokens=188, audio_tokens=None, text_tokens=9), total_tokens=205, cost=None)
=== /v1/messages
HTTP 200 call_id=0764cb18-b937-473d-b0f9-377f32bfcca6
x-litellm-response-cost=0.0009172500000000001
stop_reason=end_turn content=[{'citations': None, 'text': 'Have an absolutely wonderful day! ☀️😊✨', 'type': 'text'}] usage=Usage(cache_creation=None, cache_creation_input_tokens=None, cache_read_input_tokens=None, inference_geo=None, input_tokens=8, output_tokens=243, server_tool_use=None, service_tier=None)
=== /v1/completions
HTTP 200 call_id=0565bb01-7f06-43db-89e6-1225488c4084
x-litellm-response-cost=0.0005947500000000001
choices=[('Have a wonderful day! ☀️✨😊', 'stop')] usage=CompletionUsage(completion_tokens=157, prompt_tokens=8, total_tokens=165, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=148, rejected_prediction_tokens=None, text_tokens=9, image_tokens=None, video_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=None, text_tokens=8, image_tokens=None, video_tokens=None, initial_prompt_tokens=None), cache_read_input_tokens=None, cache_creation_input_tokens=None)

gpt-audio asking for audio

/v1/messages and /v1/completions answer 400 before the provider call, and Azure answers 400 once audio is dropped
$ python -I clients.py azure-gpt-audio
=== /v1/chat/completions (control)
HTTP 200 call_id=341a067a-8b06-4377-b827-ba852e8cee5e
x-litellm-response-cost=0.0013954
content=None audio_bytes_b64_len=217600
=== /v1/responses
HTTP 400 call_id=c25479c2-a8ef-4d27-aca3-33de6ce32194
{"error":{"message":"litellm.BadRequestError: AzureException - {\n  \"error\": {\n    \"message\": \"The requested operation is unsupported.\"\n  }\n}\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
=== /v1/messages
HTTP 400 call_id=fbdc6077-0faf-42b5-84d2-74f642f1568b
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.UnsupportedParamsError: The request asks azure/litellm-qa-gpt-audio-mini for audio through audio and modalities, which /v1/messages cannot carry. Leave out audio and modalities, or set drop_params: true to send the request without it. If azure/litellm-qa-gpt-audio-mini can return audio, call /v1/chat/completions to get it.\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted."}}
=== /v1/completions
HTTP 400 call_id=dd4a3203-80ba-4c98-93f6-3e18ab08dda1
{"error":{"message":"litellm.UnsupportedParamsError: The request asks azure/litellm-qa-gpt-audio-mini for audio through audio and modalities, which /v1/completions cannot carry. Leave out audio and modalities, or set drop_params: true to send the request without it. If azure/litellm-qa-gpt-audio-mini can return audio, call /v1/chat/completions to get it.\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}

$ python -I clients.py azure-gpt-audio drop
=== /v1/chat/completions (control)
HTTP 200 call_id=ba63e800-fffb-4f8e-aa64-a6787b4e1180
x-litellm-response-cost=0.0007554
content=None audio_bytes_b64_len=115200
=== /v1/responses
HTTP 400 call_id=095d7ce5-efd6-4655-8836-e5d3fb203c2d
{"error":{"message":"litellm.BadRequestError: AzureException - {\n  \"error\": {\n    \"message\": \"The requested operation is unsupported.\"\n  }\n}\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
=== /v1/messages
HTTP 400 call_id=6d276578-4416-4fea-8239-987cd2fa2214
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: AzureException BadRequestError - This model requires that either input content or output modality contain audio.\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted."}}
=== /v1/completions
HTTP 400 call_id=0a670003-76c2-4aa6-beae-730a849ec8ba
{"error":{"message":"litellm.BadRequestError: OpenAIException - This model requires that either input content or output modality contain audio.\n\nLiteLLM: model group 'azure-gpt-audio' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":"model","code":"400"}}

Prompt template asking for audio

400 before the call, and drop_params sends [TEXT]

The recording proxy saw one Gemini request, for the drop_params call, with responseModalities: ["TEXT"]

$ curl -sS $PROXY/v1/responses -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"gemini-flash","prompt_id":"spoken-answer","input":"Say cheerfully: have a wonderful day"}' | jq -c '{status, error: .error.message, text: [.output[]?.content[]?.text]}'
HTTP/1.1 400 Bad Request call_id=8c0d8622-fe1b-451d-b39d-8cc847914f21 cost=0
{"status":null,"error":"litellm.UnsupportedParamsError: The request asks gemini/gemini-3.8-flash for audio through modalities, which /v1/responses cannot carry. Leave out modalities, or set drop_params: true to send the request without it. If gemini/gemini-3.8-flash can return audio, call /v1/chat/completions to get it.\n\nLiteLLM: model group 'gemini-flash' failed with the error above. No fallback was attempted.","text":[]}

$ curl -sS $PROXY/v1/responses -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"gemini-flash","prompt_id":"spoken-answer","input":"Say cheerfully: have a wonderful day","drop_params":true}' | jq -c '{status, error: .error.message, text: [.output[]?.content[]?.text]}'
HTTP/1.1 200 OK call_id=923ae7e4-b10a-4c46-a392-8d2a4e2aae7d cost=0.0009855
{"status":"completed","error":null,"text":["Have a wonderful day filled with bright sunshine and lots of joy!"]}

Spend logs

The refused calls are failures with 0 spend, everything else is unchanged
$ curl -s "$PROXY/spend/logs/v2?start_date=2026-11-18%2000:11:17&end_date=2026-11-18%2000:14:02&page_size=50" -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq -r '.data | sort_by(.startTime)[] | select(.model | startswith("vertex") | not) | [.call_type, .model, .status, .spend, .completion_tokens] | @tsv'
acompletion	gemini/gemini-3.8-flash-tts	success	0.000679	75
aresponses	gemini/gemini-3.8-flash-tts	failure	0.0	0
anthropic_messages	gemini/gemini-3.8-flash-tts	failure	0.0	0
atext_completion	gemini/gemini-3.8-flash-tts	failure	0.0	0
acompletion	gemini/lyria-3.5	success	0.0	2721
aresponses	gemini/lyria-3.5	success	0.0	1835
anthropic_messages	gemini/lyria-3.5	success	0.0	3204
atext_completion	gemini/lyria-3.5	success	0.0	1149
acompletion	gemini/gemini-3.8-flash	success	0.0007260000000000001	192
aresponses	gemini/gemini-3.8-flash	failure	0.0	0
anthropic_messages	gemini/gemini-3.8-flash	failure	0.0	0
atext_completion	gemini/gemini-3.8-flash	failure	0.0	0
acompletion	gemini/gemini-3.8-flash	success	0.0006810000000000001	180
aresponses	gemini/gemini-3.8-flash	success	0.0007447500000000001	197
anthropic_messages	gemini/gemini-3.8-flash	success	0.0009172500000000001	243
atext_completion	gemini/gemini-3.8-flash	success	0.0005947500000000001	157
acompletion	azure/litellm-qa-gpt-audio-mini	success	0.0013954	79
aresponses	azure/litellm-qa-gpt-audio-mini	failure	0.0	0
anthropic_messages	azure/litellm-qa-gpt-audio-mini	failure	0.0	0
atext_completion	azure/litellm-qa-gpt-audio-mini	failure	0.0	0
acompletion	azure/litellm-qa-gpt-audio-mini	success	0.0007554	47
aresponses	azure/litellm-qa-gpt-audio-mini	failure	0.0	0
anthropic_messages	azure/litellm-qa-gpt-audio-mini	failure	0.0	0
atext_completion	azure/litellm-qa-gpt-audio-mini	failure	0.0	0

Vertex AI TTS

LiteLLM answers 400 before the call, and chat completions still returns audio

Same deployment and credentials as the before leg

$ curl -sS http://127.0.0.1:31802/v1/chat/completions -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","messages":[{"role":"user","content":"Say cheerfully: have a wonderful day"}],"audio":{"voice":"Kore","format":"pcm16"},"modalities":["audio"]}'
HTTP/1.1 200 OK call_id=d288a27c-cf02-4dfd-b12a-48c5a6656e91 cost=0.0006335000000000001
{"id":"RO78apu5IsaFodAP68mjmQI","created":1794960964,"model":"vertex-tts","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"role":"assistant","audio":{"id":"7932bc61-4089-4ad3-b049-e3bbf5e4d141","data":"UklGRhQrAgBXQVZFZm10IBAAAAABAAEAwF0AAIC7AAACABAAZGF0YQANAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAE

$ curl -sS http://127.0.0.1:31802/v1/responses -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","input":"Say cheerfully: have a wonderful day","max_output_tokens":1024}'
HTTP/1.1 400 Bad Request call_id=654ed8dd-6364-4a1f-8069-91079184d6ef cost=0
{"error":{"message":"litellm.UnsupportedParamsError: vertex_ai/gemini-3.8-flash-tts returns audio, which /v1/responses cannot carry. Call /v1/chat/completions to get the audio.\n\nLiteLLM: model group 'vertex-tts' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}

$ curl -sS http://127.0.0.1:31802/v1/messages -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","max_tokens":1024,"messages":[{"role":"user","content":"Say cheerfully: have a wonderful day"}]}'
HTTP/1.1 400 Bad Request call_id=d0194e91-93c8-402b-bf0d-0c6d51f45534 cost=0
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.UnsupportedParamsError: vertex_ai/gemini-3.8-flash-tts returns audio, which /v1/messages cannot carry. Call /v1/chat/completions to get the audio.\n\nLiteLLM: model group 'vertex-tts' failed with the error above. No fallback was attempted."}}

$ curl -sS http://127.0.0.1:31802/v1/completions -H 'Authorization: Bearer $LITELLM_MASTER_KEY' -H 'Content-Type: application/json' -d '{"model":"vertex-tts","prompt":"Say cheerfully: have a wonderful day","max_tokens":1024}'
HTTP/1.1 400 Bad Request call_id=3c1627a3-5351-4d8f-96a2-6158e5402a37 cost=
{"error":{"message":"litellm.UnsupportedParamsError: vertex_ai/gemini-3.8-flash-tts returns audio, which /v1/completions cannot carry. Call /v1/chat/completions to get the audio.\n\nLiteLLM: model group 'vertex-tts' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
What the run showed next to the fix
  • Azure's Responses API rejects gpt-audio itself, on both legs
  • gpt-audio with drop_params gets Azure's 400 instead of an empty 200
  • Before, /v1/completions billed gpt-audio's transcript but returned text: null
  • Lyria calls log 0 spend on both legs
Decisions
  • Refuse rather than carry. The Responses, Anthropic Messages and text completion response shapes have no audio output field, so there is nothing standard to put the audio in
  • A model only counts as answering audio alone when its provider is gemini, vertex_ai or vertex_ai_beta and LiteLLM's existing Gemini TTS name check matches, since those are the providers where LiteLLM turns a TTS model's answer into audio. A deployment on another provider whose name contains gemini and tts is not refused by name. The cost map's audio-only rows are not used, since the Lyria rows list only audio while Gemini also sends their lyrics as text
  • Lyria keeps answering its lyrics on these endpoints and its clip is still dropped, as before this PR. Refusing it would turn that 200 into a 400, and telling it apart needs the cost map rows this PR stopped using. /v1/chat/completions returns the clip
  • A request asks for audio when it sends audio, or modalities containing "audio". Following the usual convention, it answers 400 unless drop_params is on, or additional_drop_params names the param. That holds for text models too, since the caller asked for something the endpoint cannot return
  • Dropping removes audio and takes "audio" out of modalities, removing modalities when nothing is left
  • The check runs before the provider call, so a refused request is never billed
  • /v1/messages for openai/ models goes through the Responses API instead of chat completions, so this PR does not touch that path. Azure's Responses API rejected gpt-audio with its own 400 in this run
  • extra_body={"audio": ...} on the Python SDK's litellm.responses() is not checked. On the proxy those keys arrive at the top level and are covered
  • Native text completion providers (together_ai, fireworks_ai, hosted_vllm, text-completion-openai) sent audio now get this 400 instead of the 500 TypeError they returned before
  • Tests are in tests/unit/litellm_core_utils/test_bridged_audio_output.py. They send real HTTP to a respx route, and removing any one endpoint's check fails 10 of that endpoint's 15 cases, and removing the provider gate or either Vertex provider from it fails 3
  • allowed_openai_params does not skip this check. It says which params a provider accepts, while the problem here is the endpoint, whose response has no field for audio whatever the provider returns
/live-pr-risk at 5620c61

No regression outside the change this PR names. Base c4b915b and head ran 23 cells on 2-worker proxies with their own Postgres and a recording proxy in front of real Gemini, and the QA client above ran on both

Breaking

  • Gemini TTS on /v1/responses, /v1/messages and /v1/completions, streaming too, gets 400 with no upstream call instead of an empty 200 billed as a success. That is the fix
  • A prompt template whose modalities asks for audio gets the same 400 on /v1/responses, sync and streaming. With drop_params, Gemini gets [TEXT] instead of [TEXT, AUDIO]
  • allowed_openai_params: ["audio"] does not skip the refusal. Kept on purpose, see Decisions

Backward incompatible

  • A text model asked for audio gets 400 unless drop_params is on, the Medium caveat
  • Vertex TTS gets LiteLLM's 400 before the call instead of Vertex's 400 after it
  • Batch rows and non-chat health checks that send audio or use a TTS deployment on these routes get this 400

Regression risk

  • A prompt template's audio on /v1/messages is not checked, see Caveats. Gemini got [TEXT, AUDIO] on both legs
  • /v1/messages for openai/ models on the Responses route is not checked, see Decisions

Dependency graph. The three call sites, templates on /v1/responses, spend logs and the upstream request were driven live. A template without audio params sent the same request on both legs, and every cell made one upstream attempt. The Gemini TTS wire file passed 27 of 27 and the prompt routes file 18, 1 skipped as a known bug on main

Not verified. The A2A bridge, the Interactions API, batches and health checks were read, not driven

Type

🐛 Bug Fix

Caveats (if any)

Medium

  • Text models asked for audio now get 400 on these endpoints
    • Gemini Flash sent modalities with "audio" answered 200 with text before. It answers 400 now
    • This is on purpose and follows the drop_params convention. drop_params: true brings back the old answer
  • Lyria's music clip is still dropped without notice on these endpoints
    • They answer 200 with only the lyrics. A follow-up ticket tracks it

Low

  • A prompt template's audio or modalities skips the check on /v1/messages
    • The template is applied after the check, so Gemini still gets them, as on main. A follow-up ticket tracks it
  • With router fallbacks set, a refused call goes to the fallback model
    • fallback_on_unsupported_params defaults to true, so "nothing is billed" holds only when no fallback is configured
  • The refusal message can name the wrong endpoint or the wrong params
    • /v1/interactions callers on bridged providers read "/v1/responses cannot carry"
    • When audio or modalities comes from a deployment's litellm_params, the caller is told to leave out params they never sent
  • SDK extra_body audio on litellm.responses() skips the check
    • The upstream still receives modalities: ["text", "audio"] and audio

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
Bugbot summary

[!NOTE]
Medium Risk
Intentional behavior change on three high-traffic bridge routes (400 vs empty 200) affects billing and client error handling; scope is centralized but callers relying on silent audio drops may need drop_params.

Overview
Introduces bridged_audio_output, a shared pre-flight step for /v1/responses, /v1/messages (chat-completions bridge), and /v1/completions. Gemini/Vertex TTS models are rejected with UnsupportedParamsError (400) and a pointer to /v1/chat/completions. Requests that ask for audio via audio or modalities get the same 400 unless drop_params is enabled, in which case those fields are stripped and non-audio modalities are kept.

The Responses bridge funnels kwargs through _chat_completions_bridge_kwargs; Anthropic messages and text_completion in main.py apply the same helper before calling upstream. Integration and unit tests now expect early 400s (no upstream call) for TTS-on-bridge cases instead of empty 200s with spend.

Reviewed by Cursor Bugbot for commit 5620c61. Bugbot is set up for automated code reviews on this repo. Configure here.

…ons before the provider call

These surfaces bridge to chat completions and cannot carry audio output, so a Gemini TTS model or an audio or modalities ask returned 200 with empty output while billing audio tokens. They now answer 400 before any provider call, and drop_params strips the audio ask instead
@codspeed

codspeed Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 45 untouched benchmarks


Comparing norkelbyte:litellm_fix_gemini_audio_bridges (5620c61) with main (1b07f26)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (27b8563) during the generation of this report, so 1b07f26 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.43590% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
litellm/litellm_core_utils/bridged_audio_output.py 96.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

…/v1/completions bridges

These endpoints bridge into chat completions, and their response shapes
cannot carry message.audio. A model that answers only in audio, or a
request that asks for audio, used to return an empty 200 while the audio
was still billed.

The bridges now answer 400 UnsupportedParamsError before any provider
call. A request that asks for audio can opt out with drop_params or
additional_drop_params, which drops audio and removes "audio" from
modalities. /v1/chat/completions is unchanged.
…odule

Brings the branch up to 5bc25ff and takes the tree of the reworked fix,
which also refuses Gemini models whose cost map row answers audio and not
text (the Lyria rows), and shares that cost map read with the Gemini
max output tokens check
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge with no new blocking findings.

Summary

Adds a shared audio-output check before Responses, Messages, and text-completion requests cross into chat completions.

  • Bridged endpoints reject audio they cannot return before calling providers.

No new actionable issues found. mateo-berri accepted the existing Messages template bypass because it also occurs on main and has a follow-up ticket. The updated live proof uses the current base and head. norkelbyte also documents these known limits: Lyria clips remain omitted, configured fallbacks may still incur charges, SDK extra_body can bypass the check, and refusal messages can name the wrong endpoint or caller options.

Reviews (8) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…y models

The full model info lookup can fetch a Hugging Face model config or call a provider's model info API on every bridged text request. The audio-only check only needs the catalog's supported_output_modalities
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…eeps answering text

The cost map lists only audio output for the Lyria rows, but Gemini also
sends their lyrics as text, so refusing them turned a working 200 into a
400. The audio request refusal now names the param to leave out next to
drop_params and /v1/chat/completions
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

A model asked for audio it cannot produce got told to call /v1/chat/completions, which returns no audio for it either. The refusal now only names the params to leave out and drop_params

Tests also check that the Lyria lyrics reach the caller and that a request sending both audio and modalities names both
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…udio 400

The 400 for an audio request on the Responses, Messages and text completion bridges now tells callers whose model can return audio to call /v1/chat/completions to get it
The audio-only refusal on the Responses, Messages and text completion bridges now applies only when the provider is gemini, vertex_ai or vertex_ai_beta, where LiteLLM's own Gemini transformation turns a TTS model's answer into audio. A deployment on another provider whose name happens to contain gemini and tts, such as a custom_openai one, reaches its upstream as before
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@norkelbyte norkelbyte closed this Nov 10, 2026
@norkelbyte

Copy link
Copy Markdown
Contributor Author

Closed to free an open-PR slot. Branch kept. Reopen with gh pr reopen 49960 when ready for final CI and bot reviews

…dio_bridges

# Conflicts:
#	litellm/llms/anthropic/messages/native/handler.py
…ints

The bridged endpoints now refuse a Gemini TTS deployment before the
provider call, so the integration test that expected a 200 with the
deployment voice asserted the old empty, billed answer. It now checks
the 400, the endpoint named in the error, and that the scripted peer
got no request
A request asking for audio on the bridged endpoints drops it when the
global litellm.drop_params is on. No test covered that path, so a check
that only read the request's own drop_params passed every case
@norkelbyte norkelbyte reopened this Nov 16, 2026
@veria-ai

veria-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Reviews

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…dio_bridges

# Conflicts:
#	litellm/responses/main.py
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5620c61. Configure here.

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mateo-berri
mateo-berri merged commit c67e1fa into BerriAI:main Nov 23, 2026
94 checks passed
mateo-berri added a commit that referenced this pull request Nov 23, 2026
…ons before the provider call

Backport of #49960 to lts/1.108.x, folding its commits into one adapted commit

The /v1/messages check goes in litellm/llms/anthropic/pass_through/messages/handler.py, where this line keeps the chat bridge. The line has no litellm.utils.is_gemini_tts_model, so this adds the same name check main got in #31915. text_completion keeps the line's **optional_params spread

The test fixture drops register_model's add_to_provider_model_sets flag, which this line does not have

Cherry-picked from ec882be, c37c252, 9b6b65e, 16255e8, 675bf5d, 3d505a2, 22777c8, 3c5ed0a, a345bc4 (litellm_fix_gemini_audio_bridges)
mateo-berri added a commit that referenced this pull request Nov 23, 2026
fix(bridges): backport #49960 audio output refusal to lts/1.108.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants