Repository navigation
Conversation
6 of 9 tasks
This branch has not been deployed
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
Closes #1730. Part of #1347.
Attachment("photo.avif")raisedUnsupported attachment format: .avifbecause.avifwas missing from_EXTENSION_MIME_MAP, while the same image as base64 is detected asimage/avifsince #1623. This adds the.avifentry, so local files and base64 now agree, and a URL ending in.avifgetsmime_type="image/avif"instead of falling through with none.On the provider question from the issue: I went with adding it now rather than waiting for the per-provider allowlists. Base64 AVIF already reaches providers today, so this doesn't open a new path, it just makes the local-file path consistent with it. OpenAI, Anthropic and Gemini will reject it at request time with the generic
LLMError; the modalities page now says so. When the allowlists from #1347 land,.avifcan be restricted there along with the base64 case.Type of change
Checklist
ruff check . && ruff format .)pytest tests)Notes
Added
.avifto the local-file format cases and atest_url_avifnext totest_url; both fail without the change. The unit suite otherwise matches main locally (the Portkey tests and the modules needing extras I don't have installed fail the same way before and after).