litellm - 💡(How to fix) Fix [Bug]: Gemma 4 (26B/31B) via Google AI Studio rejects video with "Audio input modality is not enabled" [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25291Fetched 2026-04-08 03:02:04
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

GeminiException BadRequestError - { "error": { "code": 400, "message": "Audio input modality is not enabled for this model", "status": "INVALID_ARGUMENT" } }

Code Example

GeminiException BadRequestError - {
  "error": {
    "code": 400,
    "message": "Audio input modality is not enabled for this model",
    "status": "INVALID_ARGUMENT"
  }
}

---

- litellm_params:
    api_key: os.environ/GOOGLE_API_KEY
    model: gemini/gemma-4-26b-a4b-it
  model_name: gemma-4-26b-a4b-it

---

import litellm

response = litellm.completion(
    model="gemma-4-26b-a4b-it",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What is this video about?"},
            {"type": "image_url", "image_url": {"url": "https://example.com/video.mp4"}}
        ]
    }],
    max_tokens=100
)

---

litellm.BadRequestError: GeminiException BadRequestError - {
  "error": {
    "code": 400,
    "message": "Audio input modality is not enabled for this model",
    "status": "INVALID_ARGUMENT"
  }
}
Received Model Group=gemma-4-26b-a4b-it
Available Model Group Fallbacks=None
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

When sending video content to Gemma 4 models (gemma-4-26b-a4b-it, gemma-4-31b-it) via gemini/ provider, the Google AI Studio API returns:

GeminiException BadRequestError - {
  "error": {
    "code": 400,
    "message": "Audio input modality is not enabled for this model",
    "status": "INVALID_ARGUMENT"
  }
}

Per Google's model card, Gemma 4 26B and 31B support text, image, and video input. Audio is only supported on E2B/E4B. The error suggests the API is rejecting the audio track inside the .mp4, not the video frames themselves.


  • Image input (.jpg) works fine on both models
  • Video input (.mp4) fails with the audio modality error
  • Same .mp4 URL works with gemini/gemini-2.5-flash-lite (which supports audio)
  • Same .mp4 URL works with Qwen 3.5 models via openrouter/ provider

Steps to Reproduce

LiteLLM config:

- litellm_params:
    api_key: os.environ/GOOGLE_API_KEY
    model: gemini/gemma-4-26b-a4b-it
  model_name: gemma-4-26b-a4b-it

Python reproduction:

import litellm

response = litellm.completion(
    model="gemma-4-26b-a4b-it",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What is this video about?"},
            {"type": "image_url", "image_url": {"url": "https://example.com/video.mp4"}}
        ]
    }],
    max_tokens=100
)

Expected behavior

LiteLLM should either strip the audio track from the video or signal to the Gemini API to ignore it when routing to Gemma 4 models that support video but not audio.

Relevant log output

litellm.BadRequestError: GeminiException BadRequestError - {
  "error": {
    "code": 400,
    "message": "Audio input modality is not enabled for this model",
    "status": "INVALID_ARGUMENT"
  }
}
Received Model Group=gemma-4-26b-a4b-it
Available Model Group Fallbacks=None

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.80.8

Twitter / LinkedIn details

No response

extent analysis

TL;DR

Remove the audio track from the video input or use a model that supports audio to resolve the BadRequestError when sending video content to Gemma 4 models.

Guidance

  • Verify that the issue is specific to Gemma 4 models (26B and 31B) and that the error occurs only when sending video content with an audio track.
  • Check if the litellm library has an option to strip the audio track from the video input or to signal the Gemini API to ignore it.
  • Consider using a different model that supports audio input, such as the gemini-2.5-flash-lite model, as a temporary workaround.
  • Review the LiteLLM documentation and GitHub issues to see if there are any known workarounds or fixes for this specific error.

Example

No code snippet is provided as the issue is more related to the library's functionality and model compatibility rather than a specific code error.

Notes

The issue seems to be related to the Gemma 4 models not supporting audio input, and the litellm library not handling this case correctly. The solution may involve modifying the library or using a different model.

Recommendation

Apply workaround: Use a model that supports audio input, such as gemini-2.5-flash-lite, until the litellm library is updated to handle the audio track correctly for Gemma 4 models.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

LiteLLM should either strip the audio track from the video or signal to the Gemini API to ignore it when routing to Gemma 4 models that support video but not audio.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING