Skip to content

fix: fallback invalid attached file with gemini#5472

Open
Lin-Nikaido wants to merge 6 commits intogoogle:mainfrom
Lin-Nikaido:feat/fallback-invalid-attached-file-with-gemini
Open

fix: fallback invalid attached file with gemini#5472
Lin-Nikaido wants to merge 6 commits intogoogle:mainfrom
Lin-Nikaido:feat/fallback-invalid-attached-file-with-gemini

Conversation

@Lin-Nikaido
Copy link
Copy Markdown
Contributor

@Lin-Nikaido Lin-Nikaido commented Apr 24, 2026

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

Problem:
gemini crash when invalid attached file type. raise 400 Error.
No fallback.

Solution:
Add fallback same as LiteLlm

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Add 2 tests

  • tests.unittests.models.test_google_llm.test_preprocess_request_unsupported_mime_type
  • tests.unittests.models.test_google_llm.test_preprocess_request_supported_mime_type

And also passed tests

Manual End-to-End (E2E) Tests:
send and ask detail with attach file sample.pptx

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

Lin-Nikaido added 5 commits April 24, 2026 23:51
…ile-with-gemini' into feat/fallback-invalid-attached-file-with-gemini
@adk-bot adk-bot added the models [Component] Issues related to model support label Apr 24, 2026
@Lin-Nikaido Lin-Nikaido changed the title Feat/fallback invalid attached file with gemini fix: fallback invalid attached file with gemini Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models [Component] Issues related to model support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google gemini raises a raw API error when invalid attached file type google gemini crash when invalid attached file type

2 participants