feat(model-profiles): add input/output MIME type fields to ModelProfile#37351
Draft
open-swe[bot] wants to merge 1 commit into
Draft
feat(model-profiles): add input/output MIME type fields to ModelProfile#37351open-swe[bot] wants to merge 1 commit into
ModelProfile#37351open-swe[bot] wants to merge 1 commit into
Conversation
Adds informational input_mime_types and output_mime_types dict fields
to ModelProfile, keyed by models.dev modality names ('image', 'audio',
'pdf', 'video'). Augments the CLI to dispatch provider-level vs
model-level overrides by ModelProfile field name so non-scalar
provider-level fields (like the new MIME maps) are routed correctly.
Backfills anthropic, openai, and perplexity profile_augmentations.toml
with documented MIME types and regenerates their _profiles.py.
Co-authored-by: Mason Daugherty <61371264+mdrxy@users.noreply.github.com>
Merging this PR will not alter performance
Comparing Footnotes
|
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.
Adds informational
input_mime_typesandoutput_mime_typesdict fields toModelProfile, keyed by models.dev modality names ('image','audio','pdf','video'). Values are lists of IANA media types (e.g.'image/png'). Both are informational — presence implies a known-good MIME type, but absence is not a guarantee of rejection.The CLI in
langchain-model-profilespreviously usedisinstance(value, dict)under[overrides]to decide "is this a provider-level field or a model id?". That heuristic breaks once a provider-level field's value is itself a TOML table (as the new MIME maps are). The loader now dispatches against the declaredModelProfilefield names: keys matching declared fields are provider-level; anything else is treated as a model id.profile_augmentations.tomlfor anthropic, openai, and perplexity is backfilled with documented MIME types, and the generated_profiles.pyfor each is regenerated via the refresh CLI.Release Note
Added
input_mime_typesandoutput_mime_typesfields to model profiles for OpenAI, Anthropic, and Perplexity integrations.Disclaimer: opened collaboratively by Mason Daugherty and open-swe.
Opened collaboratively by Mason Daugherty and open-swe.