fix: warn on silent MIME type fallback and propagate model in recursive calls#5207
Open
enjoykumawat wants to merge 3 commits intogoogle:mainfrom
Open
fix: warn on silent MIME type fallback and propagate model in recursive calls#5207enjoykumawat wants to merge 3 commits intogoogle:mainfrom
enjoykumawat wants to merge 3 commits intogoogle:mainfrom
Conversation
…ve calls LiteLLM silently fell back to application/octet-stream when file_uri MIME type could not be determined, using only a debug log that was easy to miss. Upgrade to warning level so developers notice the fallback. Also fix _content_to_message_param() to propagate the model parameter in recursive calls for mixed function_response + content parts, which caused incorrect provider detection on Vertex AI / Anthropic. Fixes google#5184
d149537 to
c03864d
Compare
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.
Summary
logger.debugtologger.warningwhen falling back toapplication/octet-streamfor file URIs without determinable MIME type_content_to_message_param()to propagatemodelparameter in recursive calls for mixed function_response + content partsRoot Cause
application/octet-streamfallback with only a debug log caused incorrect file handling on Vertex AImodel=modelin recursive call lost provider-specific behavior (e.g., Anthropic thinking blocks)Test Plan
Fixes #5184