Skip to content

fix(vertexai-batch): fix vertexai batch file format #13576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 18, 2025

Conversation

thiagosalvatore
Copy link
Contributor

Title

There's a logic inside managed files that replaces the model name inside the JSONL when using batch. This logic returns an InMemoryFile, which has a filename and content on it. The vertexai transformer (that turns an openai file into a valid vertexai file) only runs the transformation if the content type of the file being received is application/jsonl. However, because we are turning the file into an InMemoryFile and the fact that application/jsonl is not an actual mimetype, it was setting the content type as octet-stream, and the vertexai transformer was not modifying the file.

Relevant issues

Fixes #11080

Pre-Submission checklist

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

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix

Changes

Set the content type on the InMemoryFile to application/jsonl and handle this type of file inside the extract_data logic so we can set the actual values on it.

Copy link

vercel bot commented Aug 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
litellm Ready Preview Comment Aug 13, 2025 1:14pm

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

LGTM

@ishaan-jaff ishaan-jaff merged commit 169a174 into BerriAI:main Aug 18, 2025
5 checks passed
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.

[Bug]: the file format for vertexAI batch submission is incorrect
2 participants