Managed batches - Address PR bot comments from #22464 - #22666
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
Contributor
Greptile SummaryThis PR addresses three review bot comments from #22464 for the managed batches / Vertex AI files feature:
All changes are well-scoped to the Vertex AI provider directory (per custom rule on provider-specific code) and accompanied by mock-only regression tests. Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| litellm/files/main.py | Added "gemini" and "vertex_ai" to the Literal type for custom_llm_provider in file_retrieve, aligning it with afile_retrieve. Correct fix. |
| litellm/llms/vertex_ai/batches/handler.py | Removed unnecessary hasattr guard on httpx.HTTPStatusError (always has .response) and switched to lazy %-formatting for logger. Clean improvement. |
| litellm/llms/vertex_ai/files/transformation.py | Fixed transform_delete_file_response to include the GCS bucket name in the reconstructed gs:// URI by also splitting on /b/. Bug fix with good guard clause. |
| tests/test_litellm/llms/vertex_ai/files/test_file_retrieve_provider_routing.py | New mock-only test file for file_retrieve routing with vertex_ai and gemini providers. Tests are well-structured and use proper mocking. |
| tests/test_litellm/llms/vertex_ai/files/test_vertex_ai_files_transformation.py | Updated existing test assertion and added two regression tests for the bucket-in-delete-id fix. All mock-only, no network calls. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["afile_retrieve(custom_llm_provider='vertex_ai')"] --> B["file_retrieve(custom_llm_provider='vertex_ai')"]
B --> C{"Provider in OpenAI-compatible list?"}
C -->|No| D{"Provider == 'azure'?"}
D -->|No| E["ProviderConfigManager.get_provider_files_config()"]
E --> F["base_llm_http_handler.retrieve_file()"]
F --> G["GCS API call"]
G --> H["Return OpenAIFileObject"]
I["transform_delete_file_response()"] --> J{"URL contains /b/ and /o/?"}
J -->|Yes| K["Extract bucket from /b/ segment"]
K --> L["Extract object from /o/ segment"]
L --> M["Reconstruct gs://bucket/object"]
J -->|No| N["Fallback: id = 'deleted'"]
Last reviewed commit: b83373d
fzowl
pushed a commit
to fzowl/litellm
that referenced
this pull request
Jun 24, 2026
…es-mar3 Managed batches - Address PR bot comments from BerriAI#22464
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/test_litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test
Changes